diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3df37c100915..7aa8e61eb96b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -11985,28 +11985,27 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-F4KBzJWHJ5xl98pUJNPft9sAouJTQ7gYwOra8wt/2KcziB3lnR5wgEOFZoxy/BX3L3ggA9hGOxl7mVlsnk6FYg==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-Pc0v7RFeSZEkESjZXX6VVWHU8L1DrN+xItbC9YyFCp1MoS8wMUP2+gkBCaGyCzN/AEZv7R0aY7JJyLK9DjtLFw==, tarball: file:projects/arm-monitor.tgz} name: '@rush-temp/arm-monitor' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 - '@microsoft/api-extractor': 7.18.11 - '@rollup/plugin-commonjs': 21.1.0_rollup@2.72.0 - '@rollup/plugin-json': 4.1.0_rollup@2.72.0 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.72.0 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.72.0 + '@microsoft/api-extractor': 7.23.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.72.0 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.72.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.4.0 typescript: 4.2.4 uglify-js: 3.15.4 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color diff --git a/sdk/monitor/arm-monitor/CHANGELOG.md b/sdk/monitor/arm-monitor/CHANGELOG.md index bfeec604b551..864b6fb1b2ab 100644 --- a/sdk/monitor/arm-monitor/CHANGELOG.md +++ b/sdk/monitor/arm-monitor/CHANGELOG.md @@ -1,11 +1,81 @@ # Release History - -## 7.0.1 (2022-04-25) - + +## 8.0.0-beta.1 (2022-05-10) + **Features** - - Bug fix + - 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 ActionGroup + - 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 ActivityLogAlertsListByResourceGroupNextOptionalParams + - Added Interface ActivityLogAlertsListBySubscriptionIdNextOptionalParams + - Added Interface AlertRuleAllOfCondition + - Added Interface AlertRuleLeafCondition + - Added Interface AlertRuleList + - Added Interface AlertRulePatchObject + - Added Interface AzureResourceAutoGenerated + - Added Interface ColumnDefinition + - Added Interface DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams + - Added Interface DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams + - Added Interface ErrorResponseAutoGenerated + - Added Interface IisLogsDataSource + - Added Interface LogFilesDataSource + - Added Interface LogFileSettings + - Added Interface LogFileTextSettings + - Added Interface Metadata + - Added Interface StreamDeclaration + - Added Type Alias ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse + - Added Type Alias ActionGroupsCreateNotificationsAtResourceGroupLevelResponse + - Added Type Alias ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse + - Added Type Alias ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse + - Added Type Alias ActivityLogAlertsListByResourceGroupNextResponse + - Added Type Alias ActivityLogAlertsListBySubscriptionIdNextResponse + - Added Type Alias AlertRuleAnyOfOrLeafCondition + - Added Type Alias DataCollectionRuleAssociationMetadata + - Added Type Alias DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse + - Added Type Alias DataCollectionRuleAssociationsListByDataCollectionEndpointResponse + - Added Type Alias DataCollectionRuleMetadata + - Added Type Alias KnownColumnDefinitionType + - Added Type Alias KnownLogFilesDataSourceFormat + - Added Type Alias KnownLogFileTextSettingsRecordStartTimestampFormat + - Added Type Alias LogFilesDataSourceSettings + - Added Type Alias LogFileSettingsText + - 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 + - Add parameters of AzureResourceAutoGenerated to TypeAlias ActivityLogAlertResource + - Added Enum KnownKnownColumnDefinitionType + - Added Enum KnownKnownLogFilesDataSourceFormat + - Added Enum KnownKnownLogFileTextSettingsRecordStartTimestampFormat + +**Breaking Changes** + - Operation ActivityLogAlerts.update has a new signature + - Delete parameters of Resource in TypeAlias ActivityLogAlertResource + + ## 7.0.0 (2021-12-20) The package of @azure/arm-monitor is using our next generation design principles since version 7.0.0, which contains breaking changes. diff --git a/sdk/monitor/arm-monitor/README.md b/sdk/monitor/arm-monitor/README.md index 1615606dab01..685d61325377 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) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-monitor?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -16,8 +16,6 @@ Monitor Management Client - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { MonitorClient } = require("@azure/arm-monitor"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new MonitorClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new MonitorClient(credential, subscriptionId); ``` diff --git a/sdk/monitor/arm-monitor/_meta.json b/sdk/monitor/arm-monitor/_meta.json index 02b1685fdd11..18a0bb85366a 100644 --- a/sdk/monitor/arm-monitor/_meta.json +++ b/sdk/monitor/arm-monitor/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d967edeee8fd6af6d40bffe53cceed1bd053d7ad", - "readme": "specification\\monitor\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\monitor\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "a5265c2e41b328d4b0cbf09d23e541b7987c7cf2", + "readme": "specification/monitor/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" +} \ No newline at end of file diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json index bdf270bf14ee..e5a27fda7a00 100644 --- a/sdk/monitor/arm-monitor/package.json +++ b/sdk/monitor/arm-monitor/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MonitorClient.", - "version": "7.0.1", + "version": "8.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.5.0", + "@azure/core-client": "^1.0.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,25 +28,21 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-monitor.d.ts", "devDependencies": { - "@microsoft/api-extractor": "7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2", - "@azure/arm-eventhub": "^5.0.0", - "@azure/arm-logic": "^8.0.0", - "@azure/arm-operationalinsights": "^8.0.0", - "@azure/arm-storage": "^17.0.0" + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor", "repository": { @@ -102,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/monitorClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-monitor?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_create_parameters_for_diagnosticsettings.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_create_parameters_for_diagnosticsettings.js deleted file mode 100644 index 487cb417bb3f..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_create_parameters_for_diagnosticsettings.js +++ /dev/null @@ -1,2781 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "02ca73f3ad782f78e65ae22eb28c3fad"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '823055ed-b003-4ce7-b900-896218b30a00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Ago5vzdt1_xLhDOJgiyIGXc; expires=Thu, 20-Jan-2022 01:07:48 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrToy3olp0EevEsIOF16l4XMiHEUGfF-rN8ssGgcqMvD0CsKUW6hB_Ud2IDumoJYGken0SQsWDx0Hn9jBZBZf51LuCx7rbrNBU_lu6HltUWN5L_rXSeMut28FOBygr61a0IYkPhnsUrwQTcjGhSpD4-KmT12ImbRRZpuQUC1FiJZIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:07:48 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f9d8b77c-5495-4058-a16d-afdd4f970a00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AklZIVWycmxJkXyzMST6dyg; expires=Thu, 20-Jan-2022 01:07:48 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrPeSKXUdVuDjODx0VxXosq5kYjuAbukAGrsD5n4CdbF9QojV5xTLxDE0cvqKIfgzjNwFGV-PYG791l_UG18IuSWE0RaS4A1kpMrh3Wgu000Clbcd-wq6odZLz7xGKxen6kJ938ArJqUAxiyJAXHvo0wzEvvVgfI-o4mlaGN2EbMAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:07:48 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=7ca9e68e-d184-4b26-80bd-e6334d8c3008&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '308adc6f-5ac2-4a02-b79a-da335d620000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AlLvtpfXqX5Jhys5xiT3NKrLj78gAQAAAOQfU9kOAAAA; expires=Thu, 20-Jan-2022 01:07:49 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:07:49 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx', {"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":{}}}}) - .query(true) - .reply(201, {"properties":{"provisioningState":"Succeeded","createdTime":"2021-12-21T01:07:57.6079665Z","changedTime":"2021-12-21T01:07:57.6078532Z","state":"Enabled","version":"08585615580078899009","accessEndpoint":"https://prod-29.eastus.logic.azure.com:443/workflows/d3b1a62cbcd04683b50e9f0edffa009e","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 "}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"}]},"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"}]}}},"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx","name":"myworkflowxxx","type":"Microsoft.Logic/workflows","location":"eastus"}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '1444', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'x-ms-request-id', - 'eastus:16a5668a-7430-429a-97c4-ddc627a94b64', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-correlation-request-id', - '57059458-5306-4e4d-a8c4-90571f53478e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010759Z:57059458-5306-4e4d-a8c4-90571f53478e', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:07:59 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy', {"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"}}}) - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'baa6cc39-873b-46b0-bbfb-6685281dcf3b', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-writes', - '1198', - 'x-ms-correlation-request-id', - '6ce31e9a-3985-4521-be0c-5ab1df9fe36e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010804Z:6ce31e9a-3985-4521-be0c-5ab1df9fe36e', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:04 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e35790d8-6a43-46b4-8f4c-1c0fcd3bd31f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'x-ms-correlation-request-id', - '90766c99-a2b8-4431-81de-4cd714c75735', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010805Z:90766c99-a2b8-4431-81de-4cd714c75735', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:04 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'b3564875-96fe-481a-a76a-831d9e21a62e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11998', - 'x-ms-correlation-request-id', - '004b816d-61a0-4c78-b346-d385b0725f95', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010805Z:004b816d-61a0-4c78-b346-d385b0725f95', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:05 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'aed54f2a-657b-492f-9708-593ec75dd18e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11997', - 'x-ms-correlation-request-id', - 'defa6408-4c7a-41c5-90e5-d89eef4094e1', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010805Z:defa6408-4c7a-41c5-90e5-d89eef4094e1', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:05 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'bd21e2d6-d921-4f85-8d2f-e097311d394a', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11996', - 'x-ms-correlation-request-id', - '7e705577-ad45-4cd0-8740-fc3c25805e4e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010806Z:7e705577-ad45-4cd0-8740-fc3c25805e4e', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:05 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '44445cd1-1603-4ec4-a00b-7c07e863d6ce', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11995', - 'x-ms-correlation-request-id', - 'ad5866e6-3a4c-464b-b11d-8863aa321611', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010806Z:ad5866e6-3a4c-464b-b11d-8863aa321611', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:06 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '9412fc3a-d1e2-4bdb-957a-d2a7b2e92bd0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11994', - 'x-ms-correlation-request-id', - 'd8f8c365-eb8f-466e-8d02-c5d2e92c65c4', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010806Z:d8f8c365-eb8f-466e-8d02-c5d2e92c65c4', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:06 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '3ea4fb30-0217-45d3-b9e3-73185894eb9d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11993', - 'x-ms-correlation-request-id', - '6dc37659-cf6e-4978-8e18-7330b19f6e46', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010807Z:6dc37659-cf6e-4978-8e18-7330b19f6e46', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:06 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'dc655575-475b-429a-9928-b04b49e8893d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11992', - 'x-ms-correlation-request-id', - '822260a6-d2cc-4dc1-a877-1cad384d9674', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010807Z:822260a6-d2cc-4dc1-a877-1cad384d9674', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:07 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '7a10f78a-f1f2-4e56-9c2c-ab75add5a84b', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11991', - 'x-ms-correlation-request-id', - '912baf56-4926-4216-ba98-32b8521707d0', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010807Z:912baf56-4926-4216-ba98-32b8521707d0', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:07 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '1c28be92-6116-48d0-92ca-14d9d0f7efa1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11990', - 'x-ms-correlation-request-id', - '28fdc93d-da75-4e55-b525-4f6c19831f0d', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010808Z:28fdc93d-da75-4e55-b525-4f6c19831f0d', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:07 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '286acb01-5fa8-4a15-93db-31bb1e3d590b', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11989', - 'x-ms-correlation-request-id', - '202237d7-9d23-45e8-8abe-c35f9fee5abb', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010808Z:202237d7-9d23-45e8-8abe-c35f9fee5abb', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:08 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '23191c97-94cb-49bb-9b94-8a5bfce5e462', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11988', - 'x-ms-correlation-request-id', - '9ab69aaa-2ab5-475c-83bb-4d5b6dbba0e5', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010808Z:9ab69aaa-2ab5-475c-83bb-4d5b6dbba0e5', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:08 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '51c08f9b-158d-4e4e-9a16-10bdb372d841', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11987', - 'x-ms-correlation-request-id', - 'ec12f6cd-c94c-45a6-926f-23c464c80aa7', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010809Z:ec12f6cd-c94c-45a6-926f-23c464c80aa7', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:08 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'b9de6cbd-addc-4b64-a3c5-81015fd9da2c', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11986', - 'x-ms-correlation-request-id', - 'cfc3b965-9df5-4c8e-a2bf-06f0731021ff', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010809Z:cfc3b965-9df5-4c8e-a2bf-06f0731021ff', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:09 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'ec672567-59d5-4c45-a8a0-491abb7a71f2', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11985', - 'x-ms-correlation-request-id', - 'c1d02698-f500-4199-888d-8cd38f6f069b', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010809Z:c1d02698-f500-4199-888d-8cd38f6f069b', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:09 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '6b9a5c32-fc57-463c-9ec9-cac17e6cbbe0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11984', - 'x-ms-correlation-request-id', - 'e1b1dcb7-987c-46a5-af11-84aa5d6bb853', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010810Z:e1b1dcb7-987c-46a5-af11-84aa5d6bb853', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:09 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'd3cfbf55-c87c-47d1-a631-0651bc629bc5', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11983', - 'x-ms-correlation-request-id', - '11b17c4b-8742-472c-9d30-7eee65c1834c', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010810Z:11b17c4b-8742-472c-9d30-7eee65c1834c', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:10 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'c69911db-a227-4b85-b02f-19c03f43641a', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11982', - 'x-ms-correlation-request-id', - '611b7a6a-b465-4b9b-913e-beb6ff66aa0e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010810Z:611b7a6a-b465-4b9b-913e-beb6ff66aa0e', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:10 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '80eb4ac9-2a21-4bfc-b309-1a76a24e1743', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11981', - 'x-ms-correlation-request-id', - 'f56ef244-b0e2-446d-ba98-9c5126d3c819', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010811Z:f56ef244-b0e2-446d-ba98-9c5126d3c819', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:10 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '96341c55-1784-460f-adf0-f70873f3713e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11980', - 'x-ms-correlation-request-id', - '4f45976e-34d2-44c6-ae42-fafaf442b5e9', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010811Z:4f45976e-34d2-44c6-ae42-fafaf442b5e9', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:11 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'c96a7582-91cc-4c90-96ea-c04b0f86eec0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11979', - 'x-ms-correlation-request-id', - '3c2f3957-975b-44ab-b96f-5b39f860780a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010811Z:3c2f3957-975b-44ab-b96f-5b39f860780a', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:11 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '9c74547a-65e2-40cd-b5d1-69200694f9af', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11978', - 'x-ms-correlation-request-id', - '715685f8-2eb2-4965-be50-0c377f3c5613', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010812Z:715685f8-2eb2-4965-be50-0c377f3c5613', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:11 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e6864a36-d797-4a15-8c45-7942f15d5aff', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11977', - 'x-ms-correlation-request-id', - 'fa48befd-d8ab-4284-ac9c-222ab3c1f709', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010812Z:fa48befd-d8ab-4284-ac9c-222ab3c1f709', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:12 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '194b56d7-5810-4fc1-ae61-7d3cf9d6a200', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11976', - 'x-ms-correlation-request-id', - '0d54916b-4247-4061-9bb9-d67b7a95b561', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010813Z:0d54916b-4247-4061-9bb9-d67b7a95b561', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:12 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'afa35a98-1f20-4ad0-aa03-76719cb7e566', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11975', - 'x-ms-correlation-request-id', - '9d8829df-bee2-49e1-9d91-fe356db416ba', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010813Z:9d8829df-bee2-49e1-9d91-fe356db416ba', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:13 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '6d7f9fa2-843e-446a-8afb-acee8c819f97', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11974', - 'x-ms-correlation-request-id', - '9ee6c4b5-395f-4991-8147-95af26e33ddb', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010813Z:9ee6c4b5-395f-4991-8147-95af26e33ddb', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:13 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '4136dbf1-e57d-4083-9745-5c24812684da', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11973', - 'x-ms-correlation-request-id', - '9e5343d5-aba5-407f-aae1-0372a8b1b327', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010814Z:9e5343d5-aba5-407f-aae1-0372a8b1b327', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:13 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '91a0fd99-98de-4c61-abcc-4c9b1218e0da', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11972', - 'x-ms-correlation-request-id', - 'a6d9ed92-eb20-4983-8fd5-d726ee53fc7a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010814Z:a6d9ed92-eb20-4983-8fd5-d726ee53fc7a', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:14 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e9e02f84-4cef-405e-b463-3d7345caa2d0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11971', - 'x-ms-correlation-request-id', - 'c0f8678b-5c55-4295-97a3-2645634180fc', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010814Z:c0f8678b-5c55-4295-97a3-2645634180fc', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:14 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'db7c3426-1c0d-4759-906d-8431ed3956cf', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11970', - 'x-ms-correlation-request-id', - '2c66ba4a-0a50-43c3-b829-d321dbbe8f04', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010815Z:2c66ba4a-0a50-43c3-b829-d321dbbe8f04', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:14 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e0b9c5a0-5e22-487f-bbe7-ff5a55662add', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11969', - 'x-ms-correlation-request-id', - 'ba57a9c1-a098-4af2-8642-f509246fde6c', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010815Z:ba57a9c1-a098-4af2-8642-f509246fde6c', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:15 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'b4924b1b-d5ca-478f-9d5b-03c204b537dc', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11968', - 'x-ms-correlation-request-id', - '17eef50f-7bd2-4d32-b5eb-690a1c116ade', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010815Z:17eef50f-7bd2-4d32-b5eb-690a1c116ade', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:15 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '31b5c1d9-cd5f-46bc-a8ac-02182791a497', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11967', - 'x-ms-correlation-request-id', - '78f72d20-84ad-4f7c-ae88-0a124a270956', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010816Z:78f72d20-84ad-4f7c-ae88-0a124a270956', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:15 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '704b7158-a4d1-4587-bd21-d51dcedd38aa', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11966', - 'x-ms-correlation-request-id', - 'dcfac6b1-56f5-47ff-9cee-d9ccce1d8bde', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010816Z:dcfac6b1-56f5-47ff-9cee-d9ccce1d8bde', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:16 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'd58ba0c5-4fb1-4a08-afe5-a9b6057b4222', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11965', - 'x-ms-correlation-request-id', - '18f7119d-c516-464d-9a29-5599d610e3ee', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010816Z:18f7119d-c516-464d-9a29-5599d610e3ee', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:16 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '5dbb6cc4-7962-47e2-b072-78aa89efbdf0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11964', - 'x-ms-correlation-request-id', - 'b8dc5050-7af3-4e58-8a19-3140400d1739', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010817Z:b8dc5050-7af3-4e58-8a19-3140400d1739', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:16 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'd73c64c5-2295-43ce-8ee5-a1b69a854f4f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11963', - 'x-ms-correlation-request-id', - '1c0175fa-f4db-4518-aa6c-11befca9a1ed', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010817Z:1c0175fa-f4db-4518-aa6c-11befca9a1ed', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:17 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '1defae60-1670-4585-944b-42fae2d44328', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11962', - 'x-ms-correlation-request-id', - '125f518b-dbce-4a54-8e31-99df61bbc885', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010817Z:125f518b-dbce-4a54-8e31-99df61bbc885', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:17 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'b874524a-d8de-46f0-86b9-c2a5ad44836f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11961', - 'x-ms-correlation-request-id', - '72f2546d-deda-4b23-985b-e3062fb203ed', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010818Z:72f2546d-deda-4b23-985b-e3062fb203ed', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:17 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'cc196d36-4252-4240-bbcd-72928c663fe3', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11960', - 'x-ms-correlation-request-id', - '378bd28a-27b6-4008-a273-865e99820aa6', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010818Z:378bd28a-27b6-4008-a273-865e99820aa6', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:18 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'ecf34875-67fe-445e-a5af-6dd7d22af105', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11959', - 'x-ms-correlation-request-id', - '2c7bd00e-71ed-4ea4-a253-a75c07ecbed9', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010818Z:2c7bd00e-71ed-4ea4-a253-a75c07ecbed9', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:18 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'f257284b-33a3-48c6-89f8-7ec5083e5c2b', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11958', - 'x-ms-correlation-request-id', - 'df5845e7-b8ff-4c0c-b157-0fdbfb373c80', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010819Z:df5845e7-b8ff-4c0c-b157-0fdbfb373c80', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:18 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '4ba1db53-03ba-4110-a4b4-3c00b04b09b2', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11957', - 'x-ms-correlation-request-id', - '26d3d8d5-3020-4409-bd9c-bc3a8dbe836f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010819Z:26d3d8d5-3020-4409-bd9c-bc3a8dbe836f', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:19 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '2039b225-57b6-4176-a812-cbca52663ba5', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11956', - 'x-ms-correlation-request-id', - '7f4fcfba-3ebb-4b01-a561-3f16c8d61131', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010819Z:7f4fcfba-3ebb-4b01-a561-3f16c8d61131', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:19 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '243898fe-b58a-4258-b582-6b922ebf6351', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11955', - 'x-ms-correlation-request-id', - '42b68fa3-2abe-497c-a329-0337dbcb4497', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010820Z:42b68fa3-2abe-497c-a329-0337dbcb4497', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:19 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'c4d8db0b-fe5e-4155-b34f-9e6fef0fa50d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11954', - 'x-ms-correlation-request-id', - '5339b4b0-88a5-4198-8993-e95f575650f3', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010820Z:5339b4b0-88a5-4198-8993-e95f575650f3', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:20 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - '9acc66d6-a012-45b5-9931-f366a4fca392', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11953', - 'x-ms-correlation-request-id', - '1e1d8d99-2bb3-49b0-8f0d-212783c3c4bc', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010820Z:1e1d8d99-2bb3-49b0-8f0d-212783c3c4bc', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:20 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b?monitor=true&api-version=2021-06-01', - 'Retry-After', - '0', - 'x-ms-request-id', - 'b3b74211-73b9-4060-ad39-027823e76a64', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11952', - 'x-ms-correlation-request-id', - '5a0407e7-31a6-42bf-a0c0-bc82e9f4da23', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010821Z:5a0407e7-31a6-42bf-a0c0-bc82e9f4da23', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:20 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/baa6cc39-873b-46b0-bbfb-6685281dcf3b') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5ecf7fffcd5eb8f461fb5455e7b9f7ef44b461fbd2d9633fea8aab38bfc27f7a855810fee36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7dae1dd467e1e4fa7d57ad9e225fd24934faeafaf09251d4efccbf67a852f6f844d4dcb6a9a6140d43ccf9a768dcfdaeca201c9dee6d7bbf4f96556aef35dfa9cfede337fef8154348c555e130d4df3933a67686f0a60c71f01c2decedeeef6eedef6deee9b9ddd473b078f76ee8df7eeed7cba7befe14f39b81b5b716fc565d6e6a7cbd9aa2a96ed49b55ce653f446bd7feffba38f16c5b258ac176fcae62789b2f439c17cf3fcf5eeefbf437d6465595d3d29abc9cbf5a42ca64481bca1f7da7a9d1331f3f6aaaadf1e4f4bfae8177f34b95e65f8f2a3e31facebfc755e5f16d49a805c1675bbceca17d2fcd5baa44fb9eb62e5fd31cbcfb375d91e336e8082ae318066bd5a5575db7cbb6d57cd9b3a3b3f2fa65f2ecb6b8346be9cd6d7cc5ec0a231fdd2efe74569e8f946e69606802924a4f265362973e2500152d22c9eca47320b37d2754254f959024ed009ea6b96016adc6348744f9c4b53f14604f1db157a25beba2c3083c5f28244b3c5bbafd7d42e9f112ea38fa6019b4570d81b3fd8dd7ff860ef01d88bf86691d5d7866f98a0b373faf1d11c13f1e86e4cc4c6d4623cadea7c7c45faa0ba6ac6c4247709da554ec4daf8e60f76ef8da955f46da1f5c6d7d124faee2f5ae76b0c77d3cbdc26fa768b59bbe16d6e137d5b1870e3cb68127997665827e07944d53434bbebe6cbf397d284beca2eb3a2041ef8369f56d0cbfeab57a43f83575f9b46f4a57bf997fc","92ff075e0e8bbdfa050000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '153979dd-8ab4-4c19-b082-51f092d70790', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11951', - 'x-ms-correlation-request-id', - 'd4e38a64-5708-46a9-8b17-538753993e80', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010821Z:d4e38a64-5708-46a9-8b17-538753993e80', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:21 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx', {"location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"sku":{"name":"Standard","tier":"Standard"}}) - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'fbd3276c-7af9-403e-93e8-2f25b58c9129_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-resource-requests', - '49', - 'x-ms-correlation-request-id', - 'a29275c7-be6b-4f20-afcc-0434439ee82e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010828Z:a29275c7-be6b-4f20-afcc-0434439ee82e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:28 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'db440cfb-81a2-4a8a-b99c-261dea3ff1ce_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11950', - 'x-ms-correlation-request-id', - 'c967851b-704c-43c4-b0db-88651027c620', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010829Z:c967851b-704c-43c4-b0db-88651027c620', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:28 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'e2043ea5-33ea-48ab-b4a7-5e0cda31cbe2_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11949', - 'x-ms-correlation-request-id', - '56123883-630f-459c-b275-8103dbf152c8', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010831Z:56123883-630f-459c-b275-8103dbf152c8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:31 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '7868e631-b20a-4c24-ae80-57c63e578b2d_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11948', - 'x-ms-correlation-request-id', - '7d5ffcb6-6354-4494-8a8a-834a5fbcf6a0', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010833Z:7d5ffcb6-6354-4494-8a8a-834a5fbcf6a0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:33 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '6018ad9b-1042-426e-94be-8e52aa962cc0_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11947', - 'x-ms-correlation-request-id', - '92c20c7c-7218-4081-b6d5-b4b78b966cd0', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010836Z:92c20c7c-7218-4081-b6d5-b4b78b966cd0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:36 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '94d96a81-966d-4cc1-8ad4-615d513e7f9f_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11946', - 'x-ms-correlation-request-id', - '67345c60-4453-43fa-ae88-aff442a0e239', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010839Z:67345c60-4453-43fa-ae88-aff442a0e239', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:38 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'b29c45c9-327f-482e-8021-4e91c251a1a7_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11945', - 'x-ms-correlation-request-id', - '0dec4b78-3854-4cb1-b900-ce17434f320f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010842Z:0dec4b78-3854-4cb1-b900-ce17434f320f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:41 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'e76ba989-2bb3-4046-9089-e7042cc3adcb_M10CH3_M10CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11944', - 'x-ms-correlation-request-id', - '4a65c510-cc64-40f6-a21c-a84b55ceb81a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010844Z:4a65c510-cc64-40f6-a21c-a84b55ceb81a', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:43 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '066bcc7c-c726-47a6-abbf-ec9541b6d1be_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11943', - 'x-ms-correlation-request-id', - 'ef1bd61d-6835-4b93-9a48-a95d14fcab42', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010847Z:ef1bd61d-6835-4b93-9a48-a95d14fcab42', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:47 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '5693d32b-18f9-4142-8e19-883c764f570d_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11942', - 'x-ms-correlation-request-id', - 'fe2e99eb-150b-42c3-8949-4d1a0872e944', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010850Z:fe2e99eb-150b-42c3-8949-4d1a0872e944', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:49 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '1bfaa98b-06db-47f7-a1c9-6422001e3dfc_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11941', - 'x-ms-correlation-request-id', - 'ab2ce24f-a391-40d5-a087-6b630803acec', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010852Z:ab2ce24f-a391-40d5-a087-6b630803acec', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:52 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '4a6e8b2b-3f55-4821-b220-a83d8d68f02a_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11940', - 'x-ms-correlation-request-id', - '3bbc9671-11c2-4630-8847-cfe839756eb1', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010856Z:3bbc9671-11c2-4630-8847-cfe839756eb1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:56 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '324114aa-4853-4d63-b22c-35177ef6a2ac_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11939', - 'x-ms-correlation-request-id', - 'cab82b6f-660f-4f66-a82f-838295c5e841', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010900Z:cab82b6f-660f-4f66-a82f-838295c5e841', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:08:59 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '405864a0-05c4-458f-ba89-61a4dabe1515_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11938', - 'x-ms-correlation-request-id', - '193093c0-ec2d-4698-8e4f-00fbe5ed735b', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010903Z:193093c0-ec2d-4698-8e4f-00fbe5ed735b', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:02 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '15d606d9-5159-40c6-a092-7bfcd944247b_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11937', - 'x-ms-correlation-request-id', - '175888bf-9bf9-46bf-ba45-2ef1fb77e52e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010905Z:175888bf-9bf9-46bf-ba45-2ef1fb77e52e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:04 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '66a197bd-76a2-4394-a2ba-87d680c695ce_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11936', - 'x-ms-correlation-request-id', - '0db48c1d-3605-4b6d-9f20-3a11a4df7310', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010908Z:0db48c1d-3605-4b6d-9f20-3a11a4df7310', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:07 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518fa499dd32f98bb45ded6c5f48c5a7f749b497ad423e654401d13f21fededeced6eefee6defedbed9d97db473f0686f7f7cffd39fa256ebd5ec16ad9abcbe2ca6f9937573ba9cadaa0214f968deb6abe6d1ddcef48eb5ed64dd8caf8ae5acba6ac6cbbc7db4bf7fef2e20d140d744938f8ea76d7149d3b8bcf8e897fc","92ff07d887b4ecd6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '1d3d8017-c8a2-4a00-aa30-54dc9f216e0a_M7SN1_M7SN1', - 'Server-SB', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Service-Bus-Resource-Provider/SN1', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11935', - 'x-ms-correlation-request-id', - 'dc3bbca0-5cc4-4bb5-ad28-b207363b4e83', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010911Z:dc3bbca0-5cc4-4bb5-ad28-b207363b4e83', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:10 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cddbf5478f7ef147cb6c917ff4e8a3d76db69c65f5eca3d1476d91d7e127d36c954d8bf6faa347bbbf64f45131a36fef36eb4933ad8b555b54cbe6eec3bdf387f76707e7dbf7a69f3ed8dedfdddbdf7eb83b7db07d303ddf79309d4dcef7f677efd67953adeb69fe795dad57cdddc5f54f376ddeb47757757559ccf2bab9fb4531adaba63a6fc7a797f9b2fdf67a7217f835d47d8e17ec1fefdebd23bcf027e1d2fbbcbd5ee1f308b417a66143cdca6a9a017d6a7a9a356dfad56bfab0cd2e1ad0857eeed2179759b9ce77e5f33df3f7de474406c27a95d7442c6e3e2b9a6c52e6cf096479bc6ee71f3d3acfca261f7df4836a99bfca676ba2e5b2b59f160d35aace96e765d6e6a74bbc4a54d52f17d9bb62b15ebc99139d2ee6ab75fbd5b268a9979dd1476fb3f3b7996ddfd66b6a4e885c160d8da3585ed0a4b518faebf5749ae7336a44e0f2b62ea667d4fea3db4cd3a31e39a7754e5067c784fe477b3b7bbbdbbb7bdb7bbb6f76761fed1c3cdadb1fdffff4a7a8d57a351b6af5f0d1eedef8febd7b68d6e4f56531cd9fac9bd3e56c551520ca47f3b65d358fee766678ac6d27eb667c552c67d555335ee6eda3fdfd7b770189c6ba26b27c743c6d8bcbfca35ff24b","fe1f39da6550d5020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'cd6ffe93-64ad-4e22-83d3-d1218da78663_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11934', - 'x-ms-correlation-request-id', - '7cf20872-5b95-4863-b0c5-c367b39aa87e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010914Z:7cf20872-5b95-4863-b0c5-c367b39aa87e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:13 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/authorizationRules/myauthorizationRulexxx', {"properties":{"rights":["Listen","Send","Manage"]}}) - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4f2ff365fbedf5e4ee325be4cd2a9be678c1fef1eeddbbbbd9ba9d5775f1830c28bc5a97dca2f721b5fc68f4115e24ac07bf6faf57f83ed2ff0b7a93bb6cee1e77df6de8cdb29af2dff4f669d6b4e957afe9431ad12aafdb825a3cfac51fd5c5c5bca5dfbef7d1f38246bca406aff3e58c7e7c912db38bfca3efff925f","f2ff008a15baa857010000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '6f70af00-4c42-454f-bd91-12b62f8108ca_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-writes', - '1197', - 'x-ms-correlation-request-id', - 'e2b77eed-c768-4583-879c-edf6769579cf', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010923Z:e2b77eed-c768-4583-879c-edf6769579cf', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:22 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/eventhubs/myeventhubxxx', {"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}"}}}}}) - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4f2ff365fbedf5e4ee325be4cd2a9be678c1fef1eeddbbbb399acc090dfac2fc4e9f7f34fa08cd08c7eec7edf50a1f473a79412f30dce6aef9aca117ca6a9a617cf4d269d6b4e957afe943c27695d76d91371f3dfac51fd17b4d7691bfca5b7a8d9a9e2d9f66d7f4cd3e35cca8153e3ba9d6cb963f6adaac5dd3b71f1d4fdbe2322768d33acfda7c764cdf7fb4b7b3b7bbbdbbb7bdb7fb6667f7d1cec3477b9f8eef7ffa53d46abd9a6d6c7570700fcd6c8f6733eae47b1fedd067bbf4ff3dfaffbd8fbe4fbd65ab765de74f733b751843becc26654eb3dad6eb7c447f4eab59b1bca0be8e2feb8ade9dd12c154b25c52f36e435943aaea7731accf8f80704fa09d1ec2dfd33a1d7424a356d5513a58ea75390e395f2c21975fbb3ce4cafa5ebbb210a78493fc9e493ebeb6b427b42d89f54cb362b96794dd84dedefa38f32192bf8e559552f324cc82fc65fcc3dbfe4ee2f3644a15f5fbad9a0bf7e9f3cabe9c717046c4e3f894be8df6fd310e8c717c572dde2edd7397536fb251ffd925f32faa858b6797d9995674bf99488b8bbb7433c54fc207f5e2c8af66cf9e49a864c1fefec1fdc7ff0e9bd5ff24b7e","c9ff03ebbaa4059e030000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '1bea7f27-4643-42e1-9864-7192ad1d4450_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-writes', - '1196', - 'x-ms-correlation-request-id', - '97e06ba6-5a50-4fd0-a339-28f4906ec33f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010927Z:97e06ba6-5a50-4fd0-a339-28f4906ec33f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:27 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/Microsoft.OperationalInsights/workspaces/myworkspacexxx', {"tags":{"tag1":"value1"},"location":"eastus","properties":{"sku":{"name":"PerNode"},"retentionInDays":30}}) - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef16f9ca4e947abba5ae5755be4cd478f52fe883e6caa753dcde9838f8e7fb0aef38f46faf974ddb4d522afcf66f8eec1defe24db9d9c6fdf3bc8f7b7f71fec4cb70feee7bbdbf9debdecfec1f4e0dec38707f655eae7b2688a6a592c2f5eb759cbd05fafa7d33c9fe533dbac79bba62f140ffa7b992db825e17831d9dbd9b500e9bb326bdad76fd75fad660aee8b6a394af776d2a7f9947eeceda63b0f1fdddf7974ffd3f4f32fde7c24effd127dffa33a6ff3654b089d2d9f66d718fdbd1df3dd799eb5346e7ce85029f38b6c7a4d1f9966f4599367f574fe93798d91d157bbeeab7c994dcafc7975714c636c9aaf1a1af897cbf2fa552ed47d99d78ba2c17be8a6add7b9bc6a11bcaaeab7cd2a9be627d96a452f532b87cc2c2bcaeb9f58576df6f984bed8de1d7b58fd227cfe227fd7525f79fba61012be59e7449d5d8f3af71eedecd0ff983aee6da26676b6bcc81b100753b506821f11ac553e6db9cf2e2d57eb49594c5fe42d7096f13eab6a0b04af9f3239dc44c75ff989755e83c4bde6d39aa6249f3da57ff0f5e699362f2daa59715eb8b7fa14d87db4f3e9a3bd037e0b2fc9883e2a98bfef36eb4933ad8b15c6d0dc7db877fef0feec80d87dfae983edfdddbdfded87bbd307db07d3f39d07d3d9e47c6f7ff72e310dcfee455dad57cdddc5f54f372d11e12eb3ff8cf8e4eea298d655539db763085e06d859592c9be262de3677410d9e746a786dff78f7ee9d0ccaca43f4cbf67ac55f7e61bbf8d27571d6ef425f2bab29b7c1ab39c914cdb77cd16617987ae53afcb94b7f7e749995eb7c57e8f51b27bf","e4ff01787df38c48040000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '466e0ff0-a615-4481-bb04-9de9dfc0ccb5', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Server', - 'Microsoft-IIS/10.0', - 'Server', - 'Microsoft-IIS/10.0', - 'X-Powered-By', - 'ASP.NET', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-writes', - '1195', - 'x-ms-correlation-request-id', - 'b3d091b9-b02b-469b-be4a-c03d70b354c5', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010936Z:b3d091b9-b02b-469b-be4a-c03d70b354c5', - 'Date', - 'Tue, 21 Dec 2021 01:09:36 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_delete_parameters_for_diagnosticsettings.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_delete_parameters_for_diagnosticsettings.js deleted file mode 100644 index 7aa1b1a6816f..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_delete_parameters_for_diagnosticsettings.js +++ /dev/null @@ -1,1515 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "6ad9e1d53be216c62c5ec5d0c50d467c"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f480e226-70a1-4283-a533-9f5ebcea0900', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AoY-1PX7oHhLiw8axASjWRQ; expires=Thu, 20-Jan-2022 01:09:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrkuj23ZxsIV-iceKOULwiB6FFSSaj89-uhESXyaEZ6dlDQzR1yBS_-_GJhNOWr0uvfXp8fD0h9ds-45KWn1rmY_eyUVDTgMzvk1mpcktW28ZW7nv1cH2Qis_JaHYt2SAX-hlgP_Psd8wd_8zx0OiWsVDIJFWrpAnRHFpm9CcpgaEgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:58 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '1bd63f88-8ecd-4df1-9d86-9bcf78e20d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AgDPl1uH6CNGjftdEfqq5j0; expires=Thu, 20-Jan-2022 01:09:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrGuCB1ODPdGG-3hADCdx_opNybMuxB_wQVEVvPw1zoXtZPEJGD76zbY5vbb2OKVLUULzvVcfHD2dxrp2_FR1s7ZN83boynKv_BloO1osF_-F_yD5-qbpXmwFlQRC3et-Ihrex0vb_BeR1txNBoK5IqSb1KQkJYWG21JgHljjbxGkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:58 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=b1d96b53-5e7a-44b9-8a1b-0636aff506bc&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '308adc6f-5ac2-4a02-b79a-da3325660000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ag3SUNHvmtFIgp7tSTR6XO7Lj78gAQAAAGYgU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:58 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'x-ms-request-id', - 'eastus:ce6a4bf1-9cfb-4f79-86e4-ce56008318c8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'x-ms-correlation-request-id', - '0b86ac75-8e8d-45f8-9176-0d0816000ebf', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011005Z:0b86ac75-8e8d-45f8-9176-0d0816000ebf', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:05 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'text/plain; charset=utf-8', - 'Expires', - '-1', - 'x-ms-request-id', - '3a743b4b-0a53-422a-a35d-802febd9f118', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Server', - 'Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14998', - 'x-ms-correlation-request-id', - '70b361a7-559a-49ad-9fbe-05f334e964c2', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011011Z:70b361a7-559a-49ad-9fbe-05f334e964c2', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:11 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx') - .query(true) - .reply(202, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - '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', - 'x-ms-request-id', - 'c5d34695-407b-4f6d-abd6-b10f4e6297d7_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14997', - 'x-ms-correlation-request-id', - 'ae8d2155-b39d-41a3-a64f-cb65083a20e1', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011014Z:ae8d2155-b39d-41a3-a64f-cb65083a20e1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:14 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '8eb09d8b-637b-4b46-9e8f-d3cd3c50d6da_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11933', - 'x-ms-correlation-request-id', - '25562576-ed1c-444d-9575-751de9242832', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011015Z:25562576-ed1c-444d-9575-751de9242832', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:14 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '098b1966-522d-47f5-9843-b83666c31812_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11932', - 'x-ms-correlation-request-id', - 'aee6eabf-b688-47be-bb31-dc28aa97df1f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011015Z:aee6eabf-b688-47be-bb31-dc28aa97df1f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:15 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'cbcee6b3-cc1a-48e5-b8db-a71f31b949cc_M1CH3_M1CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11931', - 'x-ms-correlation-request-id', - 'f6c88cb5-d74e-49e3-866b-8dcfffef77f6', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011016Z:f6c88cb5-d74e-49e3-866b-8dcfffef77f6', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:15 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'eaca589f-ff36-40c7-9548-68a27551a3ab_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11930', - 'x-ms-correlation-request-id', - '20338e79-aafb-4955-a5ac-cf406f3e684d', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011016Z:20338e79-aafb-4955-a5ac-cf406f3e684d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:16 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '33fb2cd0-51b2-46b6-b3bc-39e582600a3c_M7CH3_M7CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11929', - 'x-ms-correlation-request-id', - 'f9e3aabd-9441-46d1-8a84-8690701c612d', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011017Z:f9e3aabd-9441-46d1-8a84-8690701c612d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:17 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '1dc4dd45-965a-436a-9b1d-50e9afbbc8f9_M10CH3_M10CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11928', - 'x-ms-correlation-request-id', - '7a639624-814b-4f9d-b6d0-787cc683abd8', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011018Z:7a639624-814b-4f9d-b6d0-787cc683abd8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:17 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '3f58f7b7-f087-45aa-afff-a96938dd565f_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11927', - 'x-ms-correlation-request-id', - 'a50212f3-1860-488e-88cb-9ce0c5c05b19', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011018Z:a50212f3-1860-488e-88cb-9ce0c5c05b19', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:18 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'b57e4bee-0ae8-4190-a75b-a4c90e9b3e2f_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11926', - 'x-ms-correlation-request-id', - '816b3a15-a6fa-456b-beb2-62cd6fd05e83', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011019Z:816b3a15-a6fa-456b-beb2-62cd6fd05e83', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:19 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'a7820b91-9ed5-40d7-aa90-9b08a32adf4c_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11925', - 'x-ms-correlation-request-id', - '320de92e-3286-4793-ba19-70482a0dcfc5', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011019Z:320de92e-3286-4793-ba19-70482a0dcfc5', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:19 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'edfbf0eb-dfd3-4814-bde5-e918636f6c8a_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11924', - 'x-ms-correlation-request-id', - 'd859e9ad-f139-491d-96ad-0f072a2d83ce', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011020Z:d859e9ad-f139-491d-96ad-0f072a2d83ce', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:20 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '5185c5a9-96d7-41df-9500-0e0c4b0cb6f2_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11923', - 'x-ms-correlation-request-id', - '29e2dd1a-0b2b-408d-97ed-a5fee9e107a6', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011020Z:29e2dd1a-0b2b-408d-97ed-a5fee9e107a6', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:20 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '31ff4812-11c2-4289-83a9-3d3becfd9ef6_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11922', - 'x-ms-correlation-request-id', - '2b8a77ca-1279-489e-a03b-f47caaecb7c9', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011021Z:2b8a77ca-1279-489e-a03b-f47caaecb7c9', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:20 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'a9033657-084a-4a2b-a794-022e33e6029c_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11921', - 'x-ms-correlation-request-id', - '8ebf76d5-884b-4edd-ab36-9d1a96c11277', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011021Z:8ebf76d5-884b-4edd-ab36-9d1a96c11277', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:21 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '2d1f7cdb-ac56-4d6c-aa09-75d5f9add38b_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11920', - 'x-ms-correlation-request-id', - '104f0898-650c-41ed-b7ca-56c2e6992310', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011022Z:104f0898-650c-41ed-b7ca-56c2e6992310', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:21 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'a8202ae0-fe71-4e44-b64c-edec309c0765_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11919', - 'x-ms-correlation-request-id', - '413000c2-8908-4ec7-83e8-35c955efe662', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011023Z:413000c2-8908-4ec7-83e8-35c955efe662', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:22 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e9965a08-716a-45eb-acee-801d7f6e11e2_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11918', - 'x-ms-correlation-request-id', - 'a0b11385-ec32-42ef-9106-ed888aa39237', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011028Z:a0b11385-ec32-42ef-9106-ed888aa39237', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:27 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '500e4043-a8b0-411b-8078-b87ddf334409_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11917', - 'x-ms-correlation-request-id', - '62aba6e3-f5a2-4fc5-9074-cd669a641def', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011028Z:62aba6e3-f5a2-4fc5-9074-cd669a641def', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:28 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '60adf7e6-e3d1-4597-bf9e-8d558a2adc61_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11916', - 'x-ms-correlation-request-id', - 'feba902d-b544-4d23-b58e-d11763deacd8', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011029Z:feba902d-b544-4d23-b58e-d11763deacd8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:28 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '3e1996f1-5ced-423e-911b-f9f945c30e4b_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11915', - 'x-ms-correlation-request-id', - 'f099f1cc-c8f5-4b67-87ed-1a2159772787', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011029Z:f099f1cc-c8f5-4b67-87ed-1a2159772787', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:29 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '79f81a6d-f4d6-475d-b415-9cfbe3015fc7_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11914', - 'x-ms-correlation-request-id', - '739e93eb-7a19-4190-ba55-91d3a96afc91', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011029Z:739e93eb-7a19-4190-ba55-91d3a96afc91', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:29 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '61a7fba4-61c8-49f5-a753-cb6f58e27ae5_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11913', - 'x-ms-correlation-request-id', - '0d9ab8c1-3df5-4d9f-aca1-da431e3da4a0', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011030Z:0d9ab8c1-3df5-4d9f-aca1-da431e3da4a0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:30 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e8551c1a-6c00-460c-91e5-6e8b7a6129e1_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11912', - 'x-ms-correlation-request-id', - '23460a87-5e17-4f73-ab77-ebf0c4b7fa00', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011031Z:23460a87-5e17-4f73-ab77-ebf0c4b7fa00', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:31 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'cd73b224-835c-44ff-8c3f-cf3c25e2468d_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11911', - 'x-ms-correlation-request-id', - '0c016692-6639-4165-89b9-9023a7ff5af7', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011032Z:0c016692-6639-4165-89b9-9023a7ff5af7', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:31 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '91fa7d61-bfec-4b5d-8ea6-114d01484ef3_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11910', - 'x-ms-correlation-request-id', - '85dc1a3c-5bbc-4c49-801d-0f5902164fc7', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011032Z:85dc1a3c-5bbc-4c49-801d-0f5902164fc7', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:32 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e6d9f381-34de-4ef7-85e1-e94126780259_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11909', - 'x-ms-correlation-request-id', - 'a399bb3c-2867-4a5f-8d8d-1a88004f75c3', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011033Z:a399bb3c-2867-4a5f-8d8d-1a88004f75c3', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:32 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '0156884b-1656-4ee1-b9b7-4708574cf691_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11908', - 'x-ms-correlation-request-id', - 'db708acf-73b5-4a08-8548-c19f71e97cf3', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011033Z:db708acf-73b5-4a08-8548-c19f71e97cf3', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:33 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '3a42b869-e6ca-453e-8355-e9b8d51ad4b6_M4CH3_M4CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11907', - 'x-ms-correlation-request-id', - 'b3a20d25-b783-42a8-aeaf-25d472f7ad9c', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011033Z:b3a20d25-b783-42a8-aeaf-25d472f7ad9c', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:33 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '357954f6-f5d5-4df5-895d-29d56afcfac9_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11906', - 'x-ms-correlation-request-id', - '78cee178-5f9c-4039-8925-78cbac053f0a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011034Z:78cee178-5f9c-4039-8925-78cbac053f0a', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:33 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '900924dd-9ab4-40f7-9291-7fe2799842f4_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11905', - 'x-ms-correlation-request-id', - '014e348c-d95e-4742-9ceb-33eba079629d', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011034Z:014e348c-d95e-4742-9ceb-33eba079629d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:34 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - '8d238ec0-3aae-46a6-9539-6b77745f6e4a_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11904', - 'x-ms-correlation-request-id', - 'd0bd5ddc-a83f-45ac-adf4-65986924d3b2', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011035Z:d0bd5ddc-a83f-45ac-adf4-65986924d3b2', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:34 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(202, {"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":"2021-12-21T01:08:24.56Z","updatedAt":"2021-12-21T01:10:14.533Z","serviceBusEndpoint":"https://mynamespacexxx.servicebus.windows.net:443/","status":"Removing"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '727', - 'Content-Type', - 'application/json; charset=utf-8', - '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', - 'Retry-After', - '0', - 'x-ms-request-id', - 'e90cbf37-8a3f-4e1e-9f61-8c6194acf683_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11903', - 'x-ms-correlation-request-id', - '317423b1-dc98-4891-8623-7499776ead23', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011035Z:317423b1-dc98-4891-8623-7499776ead23', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:35 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'x-ms-request-id', - '554176be-1198-44a4-80f0-eb0d47920835_M0CH3_M0CH3', - 'Server-SB', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Service-Bus-Resource-Provider/CH3', - 'Server', - 'Microsoft-HTTPAPI/2.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11902', - 'x-ms-correlation-request-id', - '6b62b077-9544-4db2-85ce-4d2af8b7b789', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011036Z:6b62b077-9544-4db2-85ce-4d2af8b7b789', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:36 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/Microsoft.OperationalInsights/workspaces/myworkspacexxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'x-ms-request-id', - '1e5fe01b-4237-4e1c-aa7b-53340d9e6b96', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Server', - 'Microsoft-IIS/10.0', - 'Server', - 'Microsoft-IIS/10.0', - 'X-Powered-By', - 'ASP.NET', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14996', - 'x-ms-correlation-request-id', - 'f69a055c-7d92-4a9d-b7b7-3d1537a9e077', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011042Z:f69a055c-7d92-4a9d-b7b7-3d1537a9e077', - 'Date', - 'Tue, 21 Dec 2021 01:10:41 GMT', - 'Content-Length', - '0' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_create_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_create_test.js deleted file mode 100644 index 20da2ee82006..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_create_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "be8b70b1cabdd7abecf0ed222b77007a"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f480e226-70a1-4283-a533-9f5e47ea0900', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AimzkkBKk7NHmHJ4OAV5JMo; expires=Thu, 20-Jan-2022 01:09:36 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrwdEzVP5bFTb0k6gEt_sA2ylhp2w7OATp8Urp9wWF2G0LKc8mfFUqdKdh1QHmF4Y8Hsu35Xy96bFrTYUu4Wunqh_FhYfAv7tVJrc5N2xPCb4x-q3cTQTCMgBSDMTHpMweGcWYBYwUcaUDKNwtXhBYi5YNNxFanfv_W-B333WtLRUgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:36 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'c7025f87-5230-4b1b-a3d3-5a8e72c80d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AgvBMZONOZZNjkpXLCDzi8s; expires=Thu, 20-Jan-2022 01:09:37 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrz1h4_Cp_cZgEaEVRgYkZ8YNEzB-iDm3bA-SSSbKyefqCOnv3M1b9y4Zog8VGsq58nl_LX3I974_j2vWIm0SRKklNK_P-LBvhDTiphC62HMNQpyJT1Mr_BLEFAmsGOyqCuQE4sVOqSu4LTNB4mdWiJ9-jhhLWmahqxVXuipB0EOwgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:37 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=3ca54be3-fdd9-43af-b166-0aad51bb1e54&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f9d8b77c-5495-4058-a16d-afdd5f9a0a00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AuMP2tykBOxBsud3GV31tlbLj78gAQAAAFAgU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:37 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:37 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings/mydiagnosticxxxx', {"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"}}) - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fca2aed6abe6eee2faa79b366fdabbabbaba2c66794d1f15d3ba6aaaf3765c5617c5f4ee5555bf3d2fab2bfae6dafcfeeeddbbe81bc5b2292ee66d7377566417cbaa698be9ebbc6d8be505b5ba761fd2fbef3e1a7dd45eaf721ac717f6fdb3e1f7a9f9325ba0790450594d3310e1a347cb75598e3e7a5b2c8940f27b9bd1cbfa3be1bccaebb6c8e9935ffc51d3567576911f4fa7d57ad99ed11b1f44d2cf0749ea06f85ababc1b768d97f4934c3eb9bebea66135797d594cf327ebe6d5bacc81a00c03d3d0acb2297ff44138df860d4032a66e56daf9b5185043e60afe432623bfcc97edb7d793e3753bafeae207fcae19c007617b1b0a9f6aef77c12d8c155eb07f108a77b32e6268d1fb905a7a8379410008fbc5357f305f4fe4eb45ded6c594b8e97bdf071782d3bef78b3f2266cc2faafa9a5ef82ed10612f38a26b5201023fb250fc6cc68becc26654ef469eb753efaa8ce5bea8510795995c594e0fc62d7e23c2b1b6a32cbaea9b39d5ff24ba4e3639a9d6b1288e62911a658f228deb078a1835f32228d01882dc1e20f","fe1ffd84939e43040000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - '3673d1eb-6c44-4670-9975-3d54d4dc52d5', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-resource-requests', - '149', - 'x-ms-correlation-request-id', - '3519146d-a248-46a0-9a15-94551eb3f81c', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010945Z:3519146d-a248-46a0-9a15-94551eb3f81c', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:45 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_delete_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_delete_test.js deleted file mode 100644 index 82393338d6c9..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_delete_test.js +++ /dev/null @@ -1,141 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "f2b5c9e7e531ccd40203b4a85e21f039"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '7777f699-653d-4eb0-b230-12e51c680000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AraAIsU_hcBEsxudktyx0IA; expires=Thu, 20-Jan-2022 01:09:48 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr4mZI5dhpuLkhF6UImi_UlbJyu70aC4XfhYZ5O4qvFQvzGZQuc2JLDFPLBAtRFk4HtHW7_OJLsdf1leseSBdpbfAAZ9w3uUWuNzNl53-4r5j1daEdnYwH2Q5N2GayYYRbGz76Qv1OVP9MJbJ9nu8urcZazuA_cvjUQTiwzOybAlogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:48 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '32ea23f5-8af6-4214-946f-0c696a1e0800', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Aufs7dfYz0BJgafRds9cQFA; expires=Thu, 20-Jan-2022 01:09:48 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrQKR4oxFXcuY_jIr2Y-Os5v5NyQR3ptmdyUDZiVNupbgm2ronzGE6xdZ9vnXD36Qro0_8gkZAZYjagHI184xIQ_8_4xjRujrScaGc7YOepDwPklEMvMhuzNUCCUxmGvEhl4OhnzFZ_MVjmZyrKNu6wIzkpsW6gQiv6M6rLjpK_08gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:48 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=7bee6459-1567-453a-a245-b3bbb181a2f9&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '308adc6f-5ac2-4a02-b79a-da33d7650000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ArgrK9RphX5MtPOaEvdgatDLj78gAQAAAFsgU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:48 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:48 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings/mydiagnosticxxxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - 'b0cb5e28-43e7-4578-95a7-ccd2bf0dbc91', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'x-ms-correlation-request-id', - '789f9e21-79c5-45e4-a3f5-e7c22ce87115', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010951Z:789f9e21-79c5-45e4-a3f5-e7c22ce87115', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:51 GMT', - 'Content-Length', - '0' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_get_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_get_test.js deleted file mode 100644 index 26c7d3726b10..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_get_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "5a8754ebee23b7c4fd673a1551927580"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '65eed48d-5688-4f85-96c3-e74025100000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AmDIXkyL5U9ImVSQf-NiokM; expires=Thu, 20-Jan-2022 01:09:45 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8TAjbuxIU8tmGsaqp7ROyB_syPyz2YcGkJrmpCcTMb0Mc3oso93TrYEM0g95lgbFe1_GEauTSlhD1ow7OFWtzFf5_iRRyWdB4PcCswQu8Cw5v1SilYQv1sQ990hB0c-kroyd8kxalEQD3BvsqKA8U0VzadWStTS9sws5Iy7zctEgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:45 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f9d8b77c-5495-4058-a16d-afdd979a0a00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AmBS43sV12JPomZu7CvpPB4; expires=Thu, 20-Jan-2022 01:09:46 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8bwUV9Bp8lRTM4-J-nWzNQPQALgY9HqlHxDHtvzTQORsIOQAZIhdZSD7-CKAVB8jSRHFkAtV30p_ZeVY_Wndpam5A5N1q9HCDH4eUe94v9rszSqt1jTCULoec6VrUSLmqCZ1vtZVtXmYYz9yBR4syCvncwRFn6IK-x988FEagnEgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:46 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=c1f1d8d9-f6eb-4fca-ada8-39ae697e76f7&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '7777f699-653d-4eb0-b230-12e50e680000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AvbGyLYa7oBIrYmxhjlG6sXLj78gAQAAAFogU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:46 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:46 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings/mydiagnosticxxxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fca2aed6abe6eee2faa79b366fdabbabbaba2c66794d1f15d3ba6aaaf3765c5617c5f4ee5555bf3d2fab2bfae6dafcfeeeddbbe81bc5b2292ee66d7377566417cbaa698be9ebbc6d8be505b5ba761fd2fbef3e1a7dd45eaf721ac717f6fdb3e1f7a9f9325ba0790450594d3310e1a347cb75598e3e7a5b2c8940f27b9bd1cbfa3be1bccaebb6c8e9935ffc51d3567576911f4fa7d57ad99ed11b1f44d2cf0749ea06f85ababc1b768d97f4934c3eb9bebea66135797d594cf327ebe6d5bacc81a00c03d3d0acb2297ff44138df860d4032a66e56daf9b5185043e60afe432623bfcc97edb7d793e3753bafeae207fcae19c007617b1b0a9f6aef77c12d8c155eb07f108a77b32e6268d1fb905a7a8379410008fbc5357f305f4fe4eb45ded6c594b8e97bbff82362c1fca2aaafa9d971597ea1df1088653629731afb795636f9e8a33a6f0904f5f2b22a8b2935ffc5bd26b3ec9a60eefc925ff27df036f83784ff5da238e4f015b14a41888dec974c22c327166c5baf09eafb777c4c737e4d62d63c2572174ba6cd1b165a74f04b46a48700b12558","fcc1ff03eb189dfd99040000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - '5f551377-df00-4293-a443-86d43e9a22d4', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'x-ms-correlation-request-id', - '71b171b7-5a44-49f0-ae6e-e47ec4f5e63f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010947Z:71b171b7-5a44-49f0-ae6e-e47ec4f5e63f', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:46 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_list_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_list_test.js deleted file mode 100644 index beac0996fcfa..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_list_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7cf4fbdc9b57dfb28a2aee73be78bc47"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '308adc6f-5ac2-4a02-b79a-da33cd650000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=At3bm6_Oh5tOmljgfI91-_I; expires=Thu, 20-Jan-2022 01:09:47 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevruXPZLszYr0_cw9Z9lr53hdmPdnj4Y8299bjF_0UOGM3QIwELGgKpUZoVy9q9PhIPExVR3_fMhZyaFIOoXe8dZ-GZN9E30mIXCDCX5wdd7hq1mXJgFoYuXPM5LdSpjEy7E7DIpQ1YYCfh_pSwrbdLQaeLY9KCOzxy6V1dkGEyUJcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:47 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '7777f699-653d-4eb0-b230-12e513680000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Auix_QK-iHdBpOvQOOaVKic; expires=Thu, 20-Jan-2022 01:09:47 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8giCshtSkGIvGXsVWszEZ8O7sraR9YeSj8h23oa_NxCaYTf8NXwbzfv5axWEJuJIMp5Yp76ggUFPati2Kjfq7Gj9vc3ngAfiCOhjmvwN8IqKZnth8SVSslt8uHTzds0PKZhk67L8ZD3ICzmqNRWPiPZlq31s2tiWYCWhC7j_WOggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:47 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=8de68596-6fe3-43c7-9f84-33497b08148f&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '308adc6f-5ac2-4a02-b79a-da33cf650000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AlBUA6dquvZGpfxFke3DZszLj78gAQAAAFogU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:47 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:47 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534bfa8abf5aab9bbb8fee9a6cd9bf6eeaaae2e8b595ed347c5b4ae9aeabc1d97d54531bd7b55d56fcfcbea8abeb936bfbf7bf72efa46b16c8a8b79dbdc9d15d9c5b26ada62fa3a6fdb627941adaedd87f4febb8f461fb5d72b1ace475fd8f7cf86dfa7e6cb6c81e611406535cd40848f1e2dd76539fae86db12402c9ef6d462febef84f32aafdb22a74f7ef1474d5bd5d9457e3c9d56eb657b466f7c10493f1f24a91be06be9f26ed8355ed24f32f9e4fafa9a86d5e4f56531cd9fac9b57eb320782320c4c43b3caa6fcd107e17c1b3600c998ba5969e7d762400d992bf80f998cfc325fb6df5e4f8ed7edbcaa8b1ff0bb66001f84ed6d287caabddf05b7305678c1fe4128decdba88a145ef436ae90de6050120ec17d7fcc17c3d91af17795b1753e2a6ef7d1f5c084e23e92466cc2faafa9a5ef82ed10612f38a26b5201023fb250fc6cc68becc26654ef469eb753efaa8ce5bea8510795995c594e0fc62d7e23c2b1b6a32cbaea9b39d5ff24ba4e3639a9d6b1288e62911a658f228deb078a1835f32228d01882dc1e20fbeff4b","fe1fc6e841354f040000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - '7ff81124-18ae-4d76-809e-18dbb61029ca', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11998', - 'x-ms-correlation-request-id', - 'af6cab94-4448-4ac6-be63-271c4b683bcf', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010948Z:af6cab94-4448-4ac6-be63-271c4b683bcf', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:48 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_create_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_create_test.js deleted file mode 100644 index 64fb4cf684a8..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_create_test.js +++ /dev/null @@ -1,183 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "f50f0a93cb0fc2a82e3f58d8ce41030c"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '1bd63f88-8ecd-4df1-9d86-9bcf46e20d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AqPuYC9CKvFBkCbNqrU2u_E; expires=Thu, 20-Jan-2022 01:09:51 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrfqQSXc0T-D6Vc4eR_jhEOJPpeqDjbyytFDST010mWp8UYv6yd2TFdivRXZ6W40klopvip1EDjB4WNn5AKw-2clRga8oGS2Lq5ylLFLthWV85JLXUCTdSizfWB1rfogJPAdtLRJi1mJVwip50C6eFlL5WoZIwrqzx4UrbJWAicvQgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:51 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f480e226-70a1-4283-a533-9f5e92ea0900', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AvqS6beB4itEqe30P_GLiYc; expires=Thu, 20-Jan-2022 01:09:51 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrZR_v4DTfH4ksUDupZx4bys1yu1z6uzBdu-SfFlSdH-1fknbQ3fdxuxz-lbtt9fxYaUfJ0rff2tDGBYuNa5H6TQlXzzPj05SNAeXmwyUrdA5ThSMsyaX3LCgh1k2hhHWSLOsBVB3PYMQFmH5FLfeVfkjBnFwT4ZXWI_5CFyLR2ZQgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:51 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=81dc69b2-7a4f-43e0-abd6-eeb23e9a85cd&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '32ea23f5-8af6-4214-946f-0c69781e0800', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AtShQFY14QlDmjRBa8LETH7Lj78gAQAAAF8gU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:51 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:51 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff","92ff0742ea40440c000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - 'e4d8f6c0-85d1-4073-a2bb-2fe4170c6e05', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11997', - 'x-ms-correlation-request-id', - 'cc7a1d1b-cf3d-4abb-a77b-3c78f7c3b2b2', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010952Z:cc7a1d1b-cf3d-4abb-a77b-3c78f7c3b2b2', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:52 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles/mylogProfilexxx', {"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}}}) - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefde5dd5d56531cbebe6eea298d655539db7e362d91417f3b6b95b5617f4fd7951e6f4f535fdf552fe7af7eedd47a38fdaeb55fed1a3e5ba2c471f2db305fdfe51bf51594d33a0435fd25f6f8b25212aafb4d945637ea75e5679dd16397df28b3f6adaaace2ef2e3e9b45a2fdb337ae36b0dadce9b6a5d4ff3cfeb6abdc2007eba69f3a6f586fc851df26be9f26ed8355ed24f32f9e4fafa9a86d1e4f56531cd9fac9b57eb320782320c33581ac5f73eba28ab49567ef4fdd147f4617e51d53cbaef7df4ddba687302f2342f73fee5788a77d0b0a60f96f8e3655516d36bd0225f669332a71eda7a9d8f3e9a65d704e4de2ff925239a72b46da9153aff","25ff0fc8e4c52804020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - 'd28d107e-7e36-42d5-a4af-83afbd6efea9', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-correlation-request-id', - '1c56e16f-c9d3-492d-a4ad-401f34f2ea41', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010955Z:1c56e16f-c9d3-492d-a4ad-401f34f2ea41', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:55 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_delete_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_delete_test.js deleted file mode 100644 index 35b7bf044e79..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_delete_test.js +++ /dev/null @@ -1,177 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "54e0652050f188da606aca236328130c"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '1bd63f88-8ecd-4df1-9d86-9bcffae30d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AkzWJ4-n5XZHkVI8CmhqEDc; expires=Thu, 20-Jan-2022 01:10:42 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrEma5ODf0A0asMw0diHScqMioiwW70zbqo80pFBbKOUfEVtLbiHXAPpZhK1txDlGN1Y9kmxNLMqJaghnRbZJeQSC3z7s0Wwnn6M4yHI3GECOYUflFBnut2BfMW-qMRUfLEpRdg9kGeaVIgXZOqvtlYpupC8dlp3bvHnW1ALbxD5IgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:10:42 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '7777f699-653d-4eb0-b230-12e59e690000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AnLCIqJx3GZOpkcWWz7BIHE; expires=Thu, 20-Jan-2022 01:10:42 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrhuUJUgXxz3higrKHGJjsmcRiyWv25rqqicJkAkzanm2vzyEuivk_1lxIL3iNBAbxBCERNLOBRGGAZ51YGN8p_Gr9nsig5pLlSq3WDkKX8_Ec49XNPK1DcmYpSU66sAmcwtLX0_lvQFMHlx-2xjzzcF-8L7SXE_LxRjiw8G8xVhYgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:10:42 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=af6e8a47-96f0-43b3-8114-cfcbcb4440a2&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '7777f699-653d-4eb0-b230-12e5a0690000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AqiquvZIiBFIogIGgj95KAHLj78gAQAAAJEgU9kOAAAA; expires=Thu, 20-Jan-2022 01:10:42 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:10:42 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles/mylogProfilexxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - '43403d68-5160-48d7-8d3f-a624301a564b', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14998', - 'x-ms-correlation-request-id', - 'c8030238-4a5d-4d15-9e1f-faf9a6e1f741', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011044Z:c8030238-4a5d-4d15-9e1f-faf9a6e1f741', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:43 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb7757757559ccf2bab9bb28a675d554e7edb85836c5c5bc6dee96d5057d7f5e94397d7dedfe7af7eedd47a38fdaeb1575be5c97e5e8a365b6a0df3fea372aab6906744cc3b7c5925095dfdbeca231bfd34babbc6e8b9c3ef9c51f356d556717f9f1745aad97ed19bdf1b50657e74db5aea7f9e775b55e61083fddb479d37a83fec20efab5747937ec1a2fe927997c727d7d4dc36af2fab298e64fd6cdab759903411986192e8de27b1f5d94d5242b3ffafee823fa30bfa86a1eddf73efa6e5db43901799a9739ff723cc53b6858d3074bfcf1b22a8be93568912fb34999530f6dbdce471fcdb26b0272ef97fc92114d3adab6d40a9dff92efff","92ff0705693e3812020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - '9fb7f576-41e5-4f64-bc50-27a6eb795380', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11994', - 'x-ms-correlation-request-id', - '218dd1c5-f932-4759-b857-4878d1a49ec7', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T011044Z:218dd1c5-f932-4759-b857-4878d1a49ec7', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:10:44 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_get_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_get_test.js deleted file mode 100644 index 73d276a49f54..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_get_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "251acfbf914de4e1222908427cd4e7f6"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '1bd63f88-8ecd-4df1-9d86-9bcf5de20d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AruvSSUHOU9PmRcmcr8p2F0; expires=Thu, 20-Jan-2022 01:09:55 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrMn11AyV4fz5S86ZnI_XV8p6AtXOpoD6R2YxKamqPikNfaG41Q3T3_SgHTg8HnSTVLtBnDMa_Y473JN7NiSip3nZgGsha1Pv94D3WXJwVQfdQJf8EbiBUzIvaqy4qblu6Oqgsi-Lq0lL84Fx8ebot4TFhpVTwLcVLoJ_4mN5dabYgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:55 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '1bd63f88-8ecd-4df1-9d86-9bcf60e20d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AprAqq2wP_hCrdLT3Glhf7c; expires=Thu, 20-Jan-2022 01:09:55 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrdB-VktVrPY5oEMnVgXRDb5EWUnlq9U-Gb5ZSkwQpWMGjs24VvAEKpk8a0Vg1UM_X0xNw7X4uhICVT0et6r3gptzYoJS4A6F6rL69wKOBZtkk-UpG5HXwpAwZMLWCkcvQMejv_hUMlsKbKjva3Ayd5Ns5MCOndiQhS0P12PbjFVwgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:55 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=cddd46a6-588d-4ac2-85fe-659ca5ff73d8&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '65eed48d-5688-4f85-96c3-e74056100000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AlraLCO4H35MsZKtIyZYhbTLj78gAQAAAGMgU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:56 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:55 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles/mylogProfilexxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefde5dd5d56531cbebe6eea298d655539db7e362d91417f3b6b95b5617f4fd7951e6f4f535fdf552fe7af7eedd47a38fdaeb55fed1a3e5ba2c471f2db305fdfe51bf51594d33a0631abe2d9684aafcde66178df99dfa59e5755be4f4c92ffea869ab3abbc88fa7d36abd6ccfe88daf35b83a6faa753dcd3fafabf50a43f8e9a6cd9bd61bf41776d0afa5cbbb61d778493fc9e493ebeb6b1a5693d797c5347fb26e5eadcb1c08ca30cc706914dffbe8a2ac2659f9d1f7471fd187f94555f3e8bef7d177eba2cd09c8d3bcccf997e329de41c39a3e58e28f9755594caf418b7c994dca9c7a68eb753efa68965d13907bbfe4978c68d2d1b6a556e8fc","97fc3f79f5843106020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - '54634d34-4e10-43dd-a3e8-51bb845f586e', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11996', - 'x-ms-correlation-request-id', - '52e59238-649b-4e9e-a362-023156656e3c', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010956Z:52e59238-649b-4e9e-a362-023156656e3c', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:56 GMT' -]); diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_list_test.js b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_list_test.js deleted file mode 100644 index 302946515b39..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_list_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "2e5adf68a7c814d701c68d451fb72ac4"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f9d8b77c-5495-4058-a16d-afdddc9a0a00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AqfpWIn5KodBjLlsIV9oMQE; expires=Thu, 20-Jan-2022 01:09:56 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr9GxiW8WfbCBGXeMW1SPIGpZGyFQKdH4iWtTi0oOMeMV_wATtcvIHj84vrIcJ6vYnKSsTbUAQeQyTQ18MZUqA7anzR7mH4axHNvT-RX0Zi7FP43fCpmz2JmvgjP6rQ5mSHpcESIjGsQCQGdljCUmyH1EXlo5cUM2Njc5aFOecM4MgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:56 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '1bd63f88-8ecd-4df1-9d86-9bcf6fe20d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Akrxfx1wNkVKsVQ22i-lnu0; expires=Thu, 20-Jan-2022 01:09:57 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrPFHASVSHMBOLLsMXNCEiRyvK3AMY8_2A9a91DdkkSLZuXSRLbOzD9L5NRb0M85bZBse3pKEr_c4saoE1XRzieC0xOXJTR7HwZWvHZqaSR9azX9NGTgaU6rJRd_KydWxpPQByhVyYTVHGkBuF6ORI9zarAbLai7JKEc75wMIQ3vcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:57 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=581a2153-09b7-463a-8f32-4defbe05f080&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '65eed48d-5688-4f85-96c3-e7405b100000', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ArLI4QTpO-5DifglHYs-YpvLj78gAQAAAGUgU9kOAAAA; expires=Thu, 20-Jan-2022 01:09:57 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 01:09:57 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb7757757559ccf2bab9bb28a675d554e7edb85836c5c5bc6dee96d5057d7f5e94397d7dedfe7af7eedd47a38fdaeb1575be5c97e5e8a365b6a0df3fea372aab6906744cc3b7c5925095dfdbeca231bfd34babbc6e8b9c3ef9c51f356d556717f9f1745aad97ed19bdf1b50657e74db5aea7f9e775b55e61083fddb479d37a83fec20efab5747937ec1a2fe927997c727d7d4dc36af2fab298e64fd6cdab759903411986192e8de27b1f5d94d5242b3ffafee823fa30bfa86a1eddf73efa6e5db43901799a9739ff723cc53b6858d3074bfcf1b22a8be93568912fb34999530f6dbdce471fcdb26b0272ef97fc92114d3adab6d40a9dff92efff","92ff0705693e3812020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-request-id', - 'e3da8a3f-ccf6-461c-8952-08d6823e229f', - 'Server', - 'Microsoft-IIS/10.0', - 'x-ms-ratelimit-remaining-subscription-reads', - '11995', - 'x-ms-correlation-request-id', - '601764b9-a92e-4eed-8bff-4e38c6490074', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T010958Z:601764b9-a92e-4eed-8bff-4e38c6490074', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 01:09:57 GMT' -]); diff --git a/sdk/monitor/arm-monitor/review/arm-monitor.api.md b/sdk/monitor/arm-monitor/review/arm-monitor.api.md index d52a01ce9267..56f8465e5045 100644 --- a/sdk/monitor/arm-monitor/review/arm-monitor.api.md +++ b/sdk/monitor/arm-monitor/review/arm-monitor.api.md @@ -25,6 +25,14 @@ export interface ActionDetail { subState?: string; } +// @public +export interface ActionGroup { + actionGroupId: string; + webhookProperties?: { + [propertyName: string]: string; + }; +} + // @public export interface ActionGroupList { nextLink?: string; @@ -58,6 +66,10 @@ export type ActionGroupResource = AzureResource & { // @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; @@ -65,11 +77,41 @@ export interface ActionGroups { 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 = ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders; + +// @public +export interface ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders { + location?: string; +} + +// @public +export interface ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ActionGroupsCreateNotificationsAtResourceGroupLevelResponse = ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders; + // @public export interface ActionGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { } @@ -93,100 +135,86 @@ export interface ActionGroupsGetOptionalParams extends coreClient.OperationOptio export type ActionGroupsGetResponse = ActionGroupResource; // @public -export interface ActionGroupsGetTestNotificationsOptionalParams extends coreClient.OperationOptions { +export interface ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsGetTestNotificationsResponse = TestNotificationDetailsResponse; +export type ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse = TestNotificationDetailsResponse; // @public -export interface ActionGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsListByResourceGroupResponse = ActionGroupList; +export type ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse = TestNotificationDetailsResponse; // @public -export interface ActionGroupsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { +export interface ActionGroupsGetTestNotificationsOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsListBySubscriptionIdResponse = ActionGroupList; +export type ActionGroupsGetTestNotificationsResponse = TestNotificationDetailsResponse; // @public -export interface ActionGroupsPostTestNotificationsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ActionGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsPostTestNotificationsResponse = TestNotificationResponse; +export type ActionGroupsListByResourceGroupResponse = ActionGroupList; // @public -export interface ActionGroupsUpdateOptionalParams extends coreClient.OperationOptions { +export interface ActionGroupsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsUpdateResponse = ActionGroupResource; - -// @public (undocumented) -export type ActionUnion = Action | AlertingAction | LogToMetricAction; +export type ActionGroupsListBySubscriptionIdResponse = ActionGroupList; // @public -export interface ActivityLogAlertActionGroup { - actionGroupId: string; - webhookProperties?: { - [propertyName: string]: string; - }; +export interface ActionGroupsPostTestNotificationsHeaders { + location?: string; } // @public -export interface ActivityLogAlertActionList { - actionGroups?: ActivityLogAlertActionGroup[]; +export interface ActionGroupsPostTestNotificationsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface ActivityLogAlertAllOfCondition { - allOf: ActivityLogAlertLeafCondition[]; -} +export type ActionGroupsPostTestNotificationsResponse = ActionGroupsPostTestNotificationsHeaders; // @public -export interface ActivityLogAlertLeafCondition { - equals: string; - field: string; +export interface ActionGroupsUpdateOptionalParams extends coreClient.OperationOptions { } // @public -export interface ActivityLogAlertList { - nextLink?: string; - value?: ActivityLogAlertResource[]; -} +export type ActionGroupsUpdateResponse = ActionGroupResource; // @public -export interface ActivityLogAlertPatchBody { - enabled?: boolean; - tags?: { - [propertyName: string]: string; - }; +export interface ActionList { + actionGroups?: ActionGroup[]; } +// @public (undocumented) +export type ActionUnion = Action | AlertingAction | LogToMetricAction; + // @public -export type ActivityLogAlertResource = Resource & { +export type ActivityLogAlertResource = AzureResourceAutoGenerated & { scopes?: string[]; + condition?: AlertRuleAllOfCondition; + actions?: ActionList; enabled?: boolean; - condition?: ActivityLogAlertAllOfCondition; - actions?: ActivityLogAlertActionList; description?: string; }; // @public export interface ActivityLogAlerts { - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: ActivityLogAlertResource, options?: ActivityLogAlertsCreateOrUpdateOptionalParams): Promise; + 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, activityLogAlertPatch: ActivityLogAlertPatchBody, options?: ActivityLogAlertsUpdateOptionalParams): Promise; + update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRulePatch: AlertRulePatchObject, options?: ActivityLogAlertsUpdateOptionalParams): Promise; } // @public @@ -207,19 +235,33 @@ export interface ActivityLogAlertsGetOptionalParams extends coreClient.Operation // @public export type ActivityLogAlertsGetResponse = ActivityLogAlertResource; +// @public +export interface ActivityLogAlertsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActivityLogAlertsListByResourceGroupNextResponse = AlertRuleList; + // @public export interface ActivityLogAlertsListByResourceGroupOptionalParams extends coreClient.OperationOptions { } // @public -export type ActivityLogAlertsListByResourceGroupResponse = ActivityLogAlertList; +export type ActivityLogAlertsListByResourceGroupResponse = AlertRuleList; + +// @public +export interface ActivityLogAlertsListBySubscriptionIdNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActivityLogAlertsListBySubscriptionIdNextResponse = AlertRuleList; // @public export interface ActivityLogAlertsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { } // @public -export type ActivityLogAlertsListBySubscriptionIdResponse = ActivityLogAlertList; +export type ActivityLogAlertsListBySubscriptionIdResponse = AlertRuleList; // @public export interface ActivityLogAlertsUpdateOptionalParams extends coreClient.OperationOptions { @@ -264,6 +306,16 @@ export type AlertingAction = Action & { trigger: TriggerCondition; }; +// @public +export interface AlertRuleAllOfCondition { + allOf: AlertRuleAnyOfOrLeafCondition[]; +} + +// @public +export type AlertRuleAnyOfOrLeafCondition = AlertRuleLeafCondition & { + anyOf?: AlertRuleLeafCondition[]; +}; + // @public export interface AlertRuleIncidents { get(resourceGroupName: string, ruleName: string, incidentName: string, options?: AlertRuleIncidentsGetOptionalParams): Promise; @@ -284,6 +336,27 @@ export interface AlertRuleIncidentsListByAlertRuleOptionalParams extends coreCli // @public export type AlertRuleIncidentsListByAlertRuleResponse = IncidentListResult; +// @public +export interface AlertRuleLeafCondition { + containsAny?: string[]; + equals?: string; + field?: string; +} + +// @public +export interface AlertRuleList { + nextLink?: string; + value?: ActivityLogAlertResource[]; +} + +// @public +export interface AlertRulePatchObject { + enabled?: boolean; + tags?: { + [propertyName: string]: string; + }; +} + // @public export type AlertRuleResource = Resource & { namePropertiesName: string; @@ -546,6 +619,17 @@ export interface AzureResource { 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; @@ -578,6 +662,12 @@ export type BaselinesListResponse = MetricBaselinesResponse; // @public export type CategoryType = "Metrics" | "Logs"; +// @public +export interface ColumnDefinition { + name?: string; + type?: KnownColumnDefinitionType; +} + // @public export type ComparisonOperationType = "Equals" | "NotEquals" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual"; @@ -728,12 +818,17 @@ export type DataCollectionEndpointsUpdateResponse = DataCollectionEndpointResour // @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 @@ -741,9 +836,13 @@ export interface DataCollectionRuleAssociation { dataCollectionEndpointId?: string; dataCollectionRuleId?: string; description?: string; + readonly metadata?: DataCollectionRuleAssociationMetadata; readonly provisioningState?: KnownDataCollectionRuleAssociationProvisioningState; } +// @public +export type DataCollectionRuleAssociationMetadata = Metadata & {}; + // @public export interface DataCollectionRuleAssociationProxyOnlyResource { dataCollectionEndpointId?: string; @@ -751,6 +850,7 @@ export interface DataCollectionRuleAssociationProxyOnlyResource { description?: string; readonly etag?: string; readonly id?: string; + readonly metadata?: DataCollectionRuleAssociationMetadata; readonly name?: string; readonly provisioningState?: KnownDataCollectionRuleAssociationProvisioningState; readonly systemData?: DataCollectionRuleAssociationProxyOnlyResourceSystemData; @@ -774,6 +874,7 @@ 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; } @@ -797,6 +898,20 @@ export interface DataCollectionRuleAssociationsGetOptionalParams extends coreCli // @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 { } @@ -831,8 +946,12 @@ export type DataCollectionRuleDataSources = DataSourcesSpec & {}; // @public export type DataCollectionRuleDestinations = DestinationsSpec & {}; +// @public +export type DataCollectionRuleMetadata = Metadata & {}; + // @public export interface DataCollectionRuleResource { + dataCollectionEndpointId?: string; dataFlows?: DataFlow[]; dataSources?: DataCollectionRuleDataSources; description?: string; @@ -842,8 +961,12 @@ export interface DataCollectionRuleResource { 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; @@ -936,12 +1059,16 @@ export interface DataContainer { // @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[]; @@ -1122,6 +1249,12 @@ export interface ErrorResponse { message?: string; } +// @public +export interface ErrorResponseAutoGenerated { + readonly code?: string; + readonly message?: string; +} + // @public export type ErrorResponseCommon = ErrorResponse & { readonly details?: ErrorResponseCommon[]; @@ -1218,6 +1351,13 @@ export interface HttpRequestInfo { uri?: string; } +// @public +export interface IisLogsDataSource { + logDirectories?: string[]; + name?: string; + streams: string[]; +} + // @public export interface Incident { readonly activatedTime?: Date; @@ -1279,6 +1419,9 @@ export enum KnownBaselineSensitivity { Medium = "Medium" } +// @public +export type KnownColumnDefinitionType = string; + // @public export enum KnownConditionalOperator { // (undocumented) @@ -1370,6 +1513,24 @@ export enum KnownEnabled { // @public export type KnownExtensionDataSourceStreams = string; +// @public +export enum KnownKnownColumnDefinitionType { + // (undocumented) + Boolean = "boolean", + // (undocumented) + Datetime = "datetime", + // (undocumented) + Dynamic = "dynamic", + // (undocumented) + Int = "int", + // (undocumented) + Long = "long", + // (undocumented) + Real = "real", + // (undocumented) + String = "string" +} + // @public export enum KnownKnownDataCollectionEndpointProvisioningState { // (undocumented) @@ -1456,6 +1617,34 @@ export enum KnownKnownExtensionDataSourceStreams { MicrosoftWindowsEvent = "Microsoft-WindowsEvent" } +// @public +export enum KnownKnownLogFilesDataSourceFormat { + // (undocumented) + Text = "text" +} + +// @public +export enum KnownKnownLogFileTextSettingsRecordStartTimestampFormat { + // (undocumented) + DdMMMYyyyHHMmSsZzz = "dd/MMM/yyyy:HH:mm:ss zzz", + // (undocumented) + DdMMyyHHMmSs = "ddMMyy HH:mm:ss", + // (undocumented) + ISO8601 = "ISO 8601", + // (undocumented) + MDYyyyHHMMSSAMPM = "M/D/YYYY HH:MM:SS AM/PM", + // (undocumented) + MMMDHhMmSs = "MMM d hh:mm:ss", + // (undocumented) + MonDDYyyyHHMMSS = "Mon DD, YYYY HH:MM:SS", + // (undocumented) + YyMMddHHMmSs = "yyMMdd HH:mm:ss", + // (undocumented) + YyyyMMDDHHMMSS = "YYYY-MM-DD HH:MM:SS", + // (undocumented) + YyyyMMDdTHHMmSsK = "yyyy-MM-ddTHH:mm:ssK" +} + // @public export enum KnownKnownPerfCounterDataSourceStreams { // (undocumented) @@ -1554,6 +1743,12 @@ export enum KnownKnownWindowsEventLogDataSourceStreams { MicrosoftWindowsEvent = "Microsoft-WindowsEvent" } +// @public +export type KnownLogFilesDataSourceFormat = string; + +// @public +export type KnownLogFileTextSettingsRecordStartTimestampFormat = string; + // @public export enum KnownMetricClass { // (undocumented) @@ -1716,6 +1911,31 @@ export interface LogAnalyticsDestination { workspaceResourceId?: string; } +// @public +export interface LogFilesDataSource { + filePatterns: string[]; + format: KnownLogFilesDataSourceFormat; + name?: string; + settings?: LogFilesDataSourceSettings; + streams: string[]; +} + +// @public +export type LogFilesDataSourceSettings = LogFileSettings & {}; + +// @public +export interface LogFileSettings { + text?: LogFileSettingsText; +} + +// @public +export type LogFileSettingsText = LogFileTextSettings & {}; + +// @public +export interface LogFileTextSettings { + recordStartTimestampFormat: KnownLogFileTextSettingsRecordStartTimestampFormat; +} + // @public export interface LogicAppReceiver { callbackUrl: string; @@ -1858,6 +2078,11 @@ export type ManagementEventRuleCondition = RuleCondition & { aggregation?: ManagementEventAggregationCondition; }; +// @public +export interface Metadata { + readonly provisionedBy?: string; +} + // @public export interface MetadataValue { name?: LocalizableString; @@ -2929,6 +3154,11 @@ export interface Source { queryType?: QueryType; } +// @public +export interface StreamDeclaration { + columns?: ColumnDefinition[]; +} + // @public export interface SyslogDataSource { facilityNames?: KnownSyslogDataSourceFacilityNames[]; @@ -2986,13 +3216,6 @@ export interface TestNotificationDetailsResponse { state: string; } -// @public -export interface TestNotificationResponse { - correlationId: string; - createdTime: string; - notificationId: string; -} - // @public export type ThresholdRuleCondition = RuleCondition & { odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"; diff --git a/sdk/monitor/arm-monitor/rollup.config.js b/sdk/monitor/arm-monitor/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/monitor/arm-monitor/rollup.config.js +++ b/sdk/monitor/arm-monitor/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/monitor/arm-monitor/sample.env b/sdk/monitor/arm-monitor/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/monitor/arm-monitor/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-dev/actionGroupsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 6ab3f7dcd049..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateOrUpdateSample.ts +++ /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. -import { ActionGroupResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/createOrUpdateActionGroup.json - */ -async function createOrUpdateAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -createOrUpdateAnActionGroup().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 cbbb0a976559..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/deleteActionGroup.json - */ -async function deleteAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -deleteAnActionGroup().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 6e5b36f9c3b8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsEnableReceiverSample.ts +++ /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. -import { EnableRequest, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/enableReceiver.json - */ -async function enableTheReceiver() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -enableTheReceiver().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 eb284a69b070..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/getActionGroup.json - */ -async function getAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -getAnActionGroup().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 a23533024ede..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/getTestNotifications.json - */ -async function getNotificationDetails() { - const subscriptionId = "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); -} - -getNotificationDetails().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 1fa849732cd5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/listActionGroups.json - */ -async function listActionGroups() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -listActionGroups().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 bbadd2c17395..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/listActionGroups.json - */ -async function listActionGroups() { - const subscriptionId = "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); -} - -listActionGroups().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 247f2f81cc11..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsPostTestNotificationsSample.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/postTestNotifications.json - */ -async function listActionGroups() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - 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); -} - -listActionGroups().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 3a474f9a38aa..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsUpdateSample.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 { ActionGroupPatchBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/patchActionGroup.json - */ -async function patchAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -patchAnActionGroup().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 a14b32a4ce75..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsCreateOrUpdateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActivityLogAlertResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create a new activity log alert or update an existing one. - * - * @summary Create a new activity log alert or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/createOrUpdateActivityLogAlert.json - */ -async function createOrUpdateAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const activityLogAlert: ActivityLogAlertResource = { - description: "Sample activity log alert description", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/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, - activityLogAlert - ); - console.log(result); -} - -createOrUpdateAnActivityLogAlert().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 2b09c0550d99..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Delete an activity log alert. - * - * @summary Delete an activity log alert. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/deleteActivityLogAlert.json - */ -async function deleteAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.delete( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -deleteAnActivityLogAlert().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 7724ad45f338..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Get an activity log alert. - * - * @summary Get an activity log alert. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/getActivityLogAlert.json - */ -async function getAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.get( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -getAnActivityLogAlert().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 14a283f5ece4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a list of all activity log alerts in a resource group. - * - * @summary Get a list of all activity log alerts in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json - */ -async function listActivityLogAlerts() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - 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); -} - -listActivityLogAlerts().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 f6d77abd3dc5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Get a list of all activity log alerts in a subscription. - * - * @summary Get a list of all activity log alerts in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json - */ -async function listActivityLogAlerts() { - const subscriptionId = "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); -} - -listActivityLogAlerts().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 027db8c22c76..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsUpdateSample.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 { ActivityLogAlertPatchBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/patchActivityLogAlert.json - */ -async function patchAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const activityLogAlertPatch: ActivityLogAlertPatchBody = { - 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, - activityLogAlertPatch - ); - console.log(result); -} - -patchAnActivityLogAlert().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 bfe0834c38d5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogsListSample.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 { - ActivityLogsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getActivityLogsWithFilter().catch(console.error); - -/** - * 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 = "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); -} - -getActivityLogsWithFilterAndSelect().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 63b490c82b03..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getASingleAlertRuleIncident().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 f4c64d9d78c4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsListByAlertRuleSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAlertRuleIncidents().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 84504952c1ab..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesCreateOrUpdateSample.ts +++ /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. -import { AlertRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRule().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 8dc25f8e8d3d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -deleteAnAlertRule().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 15bb81680a64..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getAnAlertRule().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 574e1e4af6a1..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAlertRules().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 463d30dd0c95..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -listAlertRules().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 a48a50c7afed..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -patchAnAlertRule().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 e04f96a1f731..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/createOrUpdateAutoscaleSetting.json - */ -async function createOrUpdateAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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" }] - } - ], - 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: {}, - 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); -} - -createOrUpdateAnAutoscaleSetting().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 8d49bd695e5b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/deleteAutoscaleSetting.json - */ -async function deleteAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -deleteAnAutoscaleSetting().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 259a466cbd33..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/getAutoscaleSetting.json - */ -async function getAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getAnAutoscaleSetting().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 04b64b11b11c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2015-04-01/examples/listAutoscaleSetting.json - */ -async function listAutoscaleSettings() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAutoscaleSettings().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 e25c994424f6..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/listAutoscaleSettingBySubscription.json - */ -async function listAutoscaleSettings() { - const subscriptionId = "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); -} - -listAutoscaleSettings().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 e40b7242e80f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsUpdateSample.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/patchAutoscaleSetting.json - */ -async function patchAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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" }] - } - ], - 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: { - $type: - "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary" - }, - 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); -} - -patchAnAutoscaleSetting().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 9018150856ce..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/baselinesListSample.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 { BaselinesListOptionalParams, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getMetricBaselines().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 fd1b34fa3c67..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsCreateSample.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 { - DataCollectionEndpointResource, - DataCollectionEndpointsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsCreate.json - */ -async function createOrUpdateDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -createOrUpdateDataCollectionEndpoint().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 58ed1507d329..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsDelete.json - */ -async function deleteDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -deleteDataCollectionEndpoint().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 15d59ce87b7d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsGet.json - */ -async function getDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -getDataCollectionEndpoint().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 7dd3470b6184..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsListByResourceGroup.json - */ -async function listDataCollectionEndpointsByResourceGroup() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listDataCollectionEndpointsByResourceGroup().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 898ef2de4084..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsListBySubscription.json - */ -async function listDataCollectionEndpointsBySubscription() { - const subscriptionId = "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); -} - -listDataCollectionEndpointsBySubscription().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 6d0e3dcc80fe..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsUpdateSample.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 { - ResourceForUpdate, - DataCollectionEndpointsUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsUpdate.json - */ -async function updateDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -updateDataCollectionEndpoint().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 e7e191b37e10..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsCreateSample.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 { - DataCollectionRuleAssociationProxyOnlyResource, - DataCollectionRuleAssociationsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsCreate.json - */ -async function createOrUpdateAssociation() { - const subscriptionId = "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); -} - -createOrUpdateAssociation().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 c8379ec2118c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsDeleteSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes an association. - * - * @summary Deletes an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsDelete.json - */ -async function deleteAssociation() { - const subscriptionId = "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); -} - -deleteAssociation().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 0d1236af8d2c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Returns the specified association. - * - * @summary Returns the specified association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsGet.json - */ -async function getAssociation() { - const subscriptionId = "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); -} - -getAssociation().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 9f2eb716a617..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByResourceSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByResource.json - */ -async function listAssociationsForSpecifiedResource() { - const subscriptionId = "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); -} - -listAssociationsForSpecifiedResource().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 4c5fe67d5499..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByRuleSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByRule.json - */ -async function listAssociationsForSpecifiedDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listAssociationsForSpecifiedDataCollectionRule().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 73c3bfc29fe9..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesCreateSample.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesCreate.json - */ -async function createOrUpdateDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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", - "MemoryCommitted 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); -} - -createOrUpdateDataCollectionRule().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 2fc1447aee69..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesDelete.json - */ -async function deleteDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -deleteDataCollectionRule().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 8a7944c626fe..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesGet.json - */ -async function getDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -getDataCollectionRule().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 5a4116d873a2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesListByResourceGroup.json - */ -async function listDataCollectionRulesByResourceGroup() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listDataCollectionRulesByResourceGroup().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 57a1fe0c7a76..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesListBySubscription.json - */ -async function listDataCollectionRulesBySubscription() { - const subscriptionId = "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); -} - -listDataCollectionRulesBySubscription().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 d68e5b87e4a5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesUpdateSample.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 { - ResourceForUpdate, - DataCollectionRulesUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesUpdate.json - */ -async function updateDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -updateDataCollectionRule().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 06272e6bc9f6..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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); -} - -getsTheDiagnosticSetting().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 12e5c007dc32..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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 result = await client.diagnosticSettingsCategory.list(resourceUri); - console.log(result); -} - -getsTheDiagnosticSetting().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 6fa2f892b47d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCreateOrUpdateSample.ts +++ /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. -import { DiagnosticSettingsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json - */ -async function createsOrUpdatesTheDiagnosticSetting() { - const subscriptionId = "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/eventhubs/myeventhub/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - 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); -} - -createsOrUpdatesTheDiagnosticSetting().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 81dbb6ecb822..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/deleteDiagnosticSetting.json - */ -async function deletesTheDiagnosticSetting() { - const subscriptionId = "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); -} - -deletesTheDiagnosticSetting().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 5fdb2c168237..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/getDiagnosticSetting.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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); -} - -getsTheDiagnosticSetting().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 5870ba90b4b3..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/listDiagnosticSettings.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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 result = await client.diagnosticSettings.list(resourceUri); - console.log(result); -} - -getsTheDiagnosticSetting().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 327aee38fa46..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/eventCategoriesListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getEventCategories().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 9380ac49e851..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesCreateOrUpdateSample.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 { LogProfileResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -createOrUpdateALogProfile().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 05afd6c9cfdd..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -deleteLogProfile().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 fcfd4e333451..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getLogProfile().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 c85e315bb4c4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -listLogProfiles().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 6c604354e8ad..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesUpdateSample.ts +++ /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. -import { LogProfileResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -patchALogProfile().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 de5f8be8879d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsCreateOrUpdateSample.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -createOrUpdateADynamicAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -createOrUpdateADynamicAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = "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); -} - -createOrUpdateAWebTestAlertRule().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleForMultipleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleOnResourceGroupS().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleOnSubscription().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRulesWithDimensions().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 3b25ab0bc93f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -deleteAnAlertRule().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 20f1c2da8438..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsGetSample.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -getADynamicAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -getADynamicAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = "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); -} - -getAWebTestAlertRule().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleOnResourceGroupS().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleOnSubscription().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 e35301adb673..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -listMetricAlertRules().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 a40ec5a27ddd..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -listMetricAlertRules().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 112a5b0c9e80..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListByNameSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "009f6022-67ec-423e-9aa7-691182870588"; - const resourceGroupName = "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); -} - -getAnAlertRuleStatus().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 0408b564ef6e..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleStatus().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 d7e5b58acbc3..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsUpdateSample.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 { MetricAlertResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRule().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 4b7ec466e7d8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricDefinitionsListSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getApplicationInsightsMetricDefinitionsWithoutFilter().catch(console.error); - -/** - * 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 = "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); -} - -getMetricDefinitionsWithoutFilter().catch(console.error); - -/** - * 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 = "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); -} - -getStorageCacheMetricDefinitionsWithMetricClass().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 64c8b014c540..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricNamespacesListSample.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 { - MetricNamespacesListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getMetricNamespacesWithoutFilter().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 87c22cbc65f8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricsListSample.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricForData().catch(console.error); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricForMetadata().catch(console.error); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricWithError().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 758830df40d5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); -} - -getAListOfOperationsForAResourceProvider().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 428d68626435..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.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 { PrivateEndpointConnection, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionUpdate.json - */ -async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -approveOrRejectAPrivateEndpointConnectionWithAGivenName().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 7000adc1396d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionDelete.json - */ -async function deletesAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -deletesAPrivateEndpointConnectionWithAGivenName().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 46bdb2873e37..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateEndpointConnection().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 c3131689799f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionList.json - */ -async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateEndpointConnections.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope().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 9f3d578ad2f3..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateEndpointConnection().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 968c40731005..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getsPrivateEndpointConnection().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 fbc659366e32..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopeOperationStatusGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/privateLinkScopeOperationStatuses.json - */ -async function getSpecificOperationStatus() { - const subscriptionId = "613192d7-503f-477a-9cfe-4efc3ee2bd60"; - const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11"; - const resourceGroupName = "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopeOperationStatus.get( - asyncOperationId, - resourceGroupName - ); - console.log(result); -} - -getSpecificOperationStatus().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 6878cecdad91..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesCreateOrUpdateSample.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 { ScopedResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceUpdate.json - */ -async function updateAScopedResourceInAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -updateAScopedResourceInAPrivateLinkScope().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 8ad05ff860ca..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesDeleteSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceDelete.json - */ -async function deletesAScopedResourceWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -deletesAScopedResourceWithAGivenName().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 6613c5534c4a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceGet.json - */ -async function getsPrivateLinkScopedResource() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateLinkScopedResource().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 910faa6ffd11..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesListByPrivateLinkScopeSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceList.json - */ -async function getsListOfScopedResourcesInAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsListOfScopedResourcesInAPrivateLinkScope().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 f78060f8a6b8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesCreateOrUpdateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorPrivateLinkScope, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesCreate.json - */ -async function privateLinkScopeCreate() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - location: "Global" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -privateLinkScopeCreate().catch(console.error); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesUpdate.json - */ -async function privateLinkScopeUpdate() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - 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); -} - -privateLinkScopeUpdate().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 d94e50bc41b3..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesDelete.json - */ -async function privateLinkScopesDelete() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopesDelete().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 1cd5aefa1a38..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesGet.json - */ -async function privateLinkScopeGet() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopeGet().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 1d7b4f002a03..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesListByResourceGroup.json - */ -async function privateLinkScopeListByResourceGroup() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopeListByResourceGroup().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 da347b2cd80c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesList.json - */ -async function privateLinkScopesListJson() { - const subscriptionId = "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); -} - -privateLinkScopesListJson().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 55b909ad32aa..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesUpdateTagsSample.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 { TagsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesUpdateTagsOnly.json - */ -async function privateLinkScopeUpdateTagsOnly() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -privateLinkScopeUpdateTagsOnly().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 14f27c7ec33d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { LogSearchRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRules.json - */ -async function createOrUpdateRuleAlertingAction() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const parameters: LogSearchRuleResource = { - description: "log alert description", - action: { - aznsAction: { - actionGroup: [], - customWebhookPayload: "{}", - emailSubject: "Email Header" - }, - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - severity: "1", - trigger: { - metricTrigger: { - metricColumn: "Computer", - metricTriggerType: "Consecutive", - threshold: 5, - thresholdOperator: "GreaterThan" - }, - threshold: 3, - thresholdOperator: "GreaterThan" - } - }, - enabled: "true", - location: "eastus", - schedule: { frequencyInMinutes: 15, timeWindowInMinutes: 15 }, - source: { - dataSourceId: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace", - query: - "Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", - queryType: "ResultCount" - }, - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleAlertingAction().catch(console.error); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRuleswithCrossResource.json - */ -async function createOrUpdateRuleAlertingActionWithCrossResource() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "SampleCrossResourceAlert"; - const parameters: LogSearchRuleResource = { - description: "Sample Cross Resource alert", - action: { - aznsAction: { - actionGroup: [ - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag" - ], - emailSubject: "Cross Resource Mail!!" - }, - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - severity: "3", - trigger: { threshold: 5000, thresholdOperator: "GreaterThan" } - }, - enabled: "true", - location: "eastus", - schedule: { frequencyInMinutes: 60, timeWindowInMinutes: 60 }, - source: { - authorizedResources: [ - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace", - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI" - ], - dataSourceId: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI", - query: 'union requests, workspace("sampleWorkspace").Update', - queryType: "ResultCount" - }, - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleAlertingActionWithCrossResource().catch(console.error); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRule-LogToMetricAction.json - */ -async function createOrUpdateRuleLogToMetricAction() { - const subscriptionId = "af52d502-a447-4bc6-8cb7-4780fbb00490"; - const resourceGroupName = "alertsweu"; - const ruleName = "logtometricfoo"; - const parameters: LogSearchRuleResource = { - description: "log to metric description", - action: { - criteria: [{ dimensions: [], metricName: "Average_% Idle Time" }], - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" - }, - enabled: "true", - location: "West Europe", - source: { - dataSourceId: - "/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu" - }, - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleLogToMetricAction().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 e5d32d5deca6..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Deletes a Log Search rule - * - * @summary Deletes a Log Search rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/deleteScheduledQueryRules.json - */ -async function deleteRule() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.delete( - resourceGroupName, - ruleName - ); - console.log(result); -} - -deleteRule().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 159d6e1f4415..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Gets an Log Search rule - * - * @summary Gets an Log Search rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/getScheduledQueryRules.json - */ -async function getRule() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.get( - resourceGroupName, - ruleName - ); - console.log(result); -} - -getRule().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 4a54ad156ab2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List the Log Search rules within a resource group. - * - * @summary List the Log Search rules within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json - */ -async function listRules() { - const subscriptionId = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "gigtest"; - 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); -} - -listRules().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 2fca11d6bcf0..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to List the Log Search rules within a subscription group. - * - * @summary List the Log Search rules within a subscription group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json - */ -async function listRules() { - const subscriptionId = "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.scheduledQueryRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listRules().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 ab8f6ea717d9..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesUpdateSample.ts +++ /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. -import { LogSearchRuleResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Update log search Rule. - * - * @summary Update log search Rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/patchScheduledQueryRules.json - */ -async function patchLogSearchRule() { - const subscriptionId = "subid"; - const resourceGroupName = "my-resource-group"; - const ruleName = "logalertfoo"; - const parameters: LogSearchRuleResourcePatch = { enabled: "true" }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.update( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -patchLogSearchRule().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 f4f597a65179..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/tenantActivityLogsListSample.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getTenantActivityLogsWithFilter().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithFilterAndSelect().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithSelect().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithoutFilterOrSelect().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 726927302f4f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/vmInsightsGetOnboardingStatusSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getStatusForAVMScaleSetThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAVMThatHasNotYetReportedData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAVMThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData().catch( - console.error -); - -/** - * 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 = "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); -} - -getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData().catch( - console.error -); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/README.md b/sdk/monitor/arm-monitor/samples/v7/javascript/README.md deleted file mode 100644 index e9d1b469efdf..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/README.md +++ /dev/null @@ -1,242 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [actionGroupsCreateOrUpdateSample.js][actiongroupscreateorupdatesample] | Create a new action group or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/createOrUpdateActionGroup.json | -| [actionGroupsDeleteSample.js][actiongroupsdeletesample] | Delete an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-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/2021-09-01/examples/enableReceiver.json | -| [actionGroupsGetSample.js][actiongroupsgetsample] | Get an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getActionGroup.json | -| [actionGroupsGetTestNotificationsSample.js][actiongroupsgettestnotificationssample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-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/2021-09-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/2021-09-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/2021-09-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/2021-09-01/examples/patchActionGroup.json | -| [activityLogAlertsCreateOrUpdateSample.js][activitylogalertscreateorupdatesample] | Create a new activity log alert or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/createOrUpdateActivityLogAlert.json | -| [activityLogAlertsDeleteSample.js][activitylogalertsdeletesample] | Delete an activity log alert. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/deleteActivityLogAlert.json | -| [activityLogAlertsGetSample.js][activitylogalertsgetsample] | Get an activity log alert. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/getActivityLogAlert.json | -| [activityLogAlertsListByResourceGroupSample.js][activitylogalertslistbyresourcegroupsample] | Get a list of all activity log alerts in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json | -| [activityLogAlertsListBySubscriptionIdSample.js][activitylogalertslistbysubscriptionidsample] | Get a list of all activity log alerts in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json | -| [activityLogAlertsUpdateSample.js][activitylogalertsupdatesample] | Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/patchActivityLogAlert.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/2015-04-01/examples/createOrUpdateAutoscaleSetting.json | -| [autoscaleSettingsDeleteSample.js][autoscalesettingsdeletesample] | Deletes and autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/deleteAutoscaleSetting.json | -| [autoscaleSettingsGetSample.js][autoscalesettingsgetsample] | Gets an autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-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/2015-04-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/2015-04-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/2015-04-01/examples/patchAutoscaleSetting.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/stable/2021-04-01/examples/DataCollectionEndpointsCreate.json | -| [dataCollectionEndpointsDeleteSample.js][datacollectionendpointsdeletesample] | Deletes a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionEndpointsDelete.json | -| [dataCollectionEndpointsGetSample.js][datacollectionendpointsgetsample] | Returns the specified data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/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/stable/2021-04-01/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/stable/2021-04-01/examples/DataCollectionEndpointsListBySubscription.json | -| [dataCollectionEndpointsUpdateSample.js][datacollectionendpointsupdatesample] | Updates part of a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionEndpointsUpdate.json | -| [dataCollectionRuleAssociationsCreateSample.js][datacollectionruleassociationscreatesample] | Creates or updates an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsCreate.json | -| [dataCollectionRuleAssociationsDeleteSample.js][datacollectionruleassociationsdeletesample] | Deletes an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsDelete.json | -| [dataCollectionRuleAssociationsGetSample.js][datacollectionruleassociationsgetsample] | Returns the specified association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsGet.json | -| [dataCollectionRuleAssociationsListByResourceSample.js][datacollectionruleassociationslistbyresourcesample] | Lists associations for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByResource.json | -| [dataCollectionRuleAssociationsListByRuleSample.js][datacollectionruleassociationslistbyrulesample] | Lists associations for the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByRule.json | -| [dataCollectionRulesCreateSample.js][datacollectionrulescreatesample] | Creates or updates a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesCreate.json | -| [dataCollectionRulesDeleteSample.js][datacollectionrulesdeletesample] | Deletes a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesDelete.json | -| [dataCollectionRulesGetSample.js][datacollectionrulesgetsample] | Returns the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/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/stable/2021-04-01/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/stable/2021-04-01/examples/DataCollectionRulesListBySubscription.json | -| [dataCollectionRulesUpdateSample.js][datacollectionrulesupdatesample] | Updates part of a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/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/2017-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/2017-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/2017-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/2017-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/2017-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/2017-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 | -| [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 | -| [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/2019-10-17-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/2019-10-17-preview/examples/PrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-preview/examples/PrivateLinkScopesCreate.json | -| [privateLinkScopesDeleteSample.js][privatelinkscopesdeletesample] | Deletes a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateLinkScopesDelete.json | -| [privateLinkScopesGetSample.js][privatelinkscopesgetsample] | Returns a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-preview/examples/PrivateLinkScopesUpdateTagsOnly.json | -| [scheduledQueryRulesCreateOrUpdateSample.js][scheduledqueryrulescreateorupdatesample] | Creates or updates an log search rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRules.json | -| [scheduledQueryRulesDeleteSample.js][scheduledqueryrulesdeletesample] | Deletes a Log Search rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/deleteScheduledQueryRules.json | -| [scheduledQueryRulesGetSample.js][scheduledqueryrulesgetsample] | Gets an Log Search rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/getScheduledQueryRules.json | -| [scheduledQueryRulesListByResourceGroupSample.js][scheduledqueryruleslistbyresourcegroupsample] | List the Log Search rules within a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json | -| [scheduledQueryRulesListBySubscriptionSample.js][scheduledqueryruleslistbysubscriptionsample] | List the Log Search rules within a subscription group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json | -| [scheduledQueryRulesUpdateSample.js][scheduledqueryrulesupdatesample] | Update log search Rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/patchScheduledQueryRules.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://nodejs.org/about/releases/). - -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 actionGroupsCreateOrUpdateSample.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 node actionGroupsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[actiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsCreateOrUpdateSample.js -[actiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsDeleteSample.js -[actiongroupsenablereceiversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsEnableReceiverSample.js -[actiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetSample.js -[actiongroupsgettestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetTestNotificationsSample.js -[actiongroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListByResourceGroupSample.js -[actiongroupslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListBySubscriptionIdSample.js -[actiongroupsposttestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsPostTestNotificationsSample.js -[actiongroupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsUpdateSample.js -[activitylogalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsCreateOrUpdateSample.js -[activitylogalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsDeleteSample.js -[activitylogalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsGetSample.js -[activitylogalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListByResourceGroupSample.js -[activitylogalertslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListBySubscriptionIdSample.js -[activitylogalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsUpdateSample.js -[activitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogsListSample.js -[alertruleincidentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsGetSample.js -[alertruleincidentslistbyalertrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsListByAlertRuleSample.js -[alertrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesCreateOrUpdateSample.js -[alertrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesDeleteSample.js -[alertrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesGetSample.js -[alertruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListByResourceGroupSample.js -[alertruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListBySubscriptionSample.js -[alertrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesUpdateSample.js -[autoscalesettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsCreateOrUpdateSample.js -[autoscalesettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsDeleteSample.js -[autoscalesettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsGetSample.js -[autoscalesettingslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListByResourceGroupSample.js -[autoscalesettingslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListBySubscriptionSample.js -[autoscalesettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsUpdateSample.js -[baselineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/baselinesListSample.js -[datacollectionendpointscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsCreateSample.js -[datacollectionendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsDeleteSample.js -[datacollectionendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsGetSample.js -[datacollectionendpointslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListByResourceGroupSample.js -[datacollectionendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListBySubscriptionSample.js -[datacollectionendpointsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsUpdateSample.js -[datacollectionruleassociationscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsCreateSample.js -[datacollectionruleassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsDeleteSample.js -[datacollectionruleassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsGetSample.js -[datacollectionruleassociationslistbyresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByResourceSample.js -[datacollectionruleassociationslistbyrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByRuleSample.js -[datacollectionrulescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesCreateSample.js -[datacollectionrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesDeleteSample.js -[datacollectionrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesGetSample.js -[datacollectionruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListByResourceGroupSample.js -[datacollectionruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListBySubscriptionSample.js -[datacollectionrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesUpdateSample.js -[diagnosticsettingscategorygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryGetSample.js -[diagnosticsettingscategorylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryListSample.js -[diagnosticsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCreateOrUpdateSample.js -[diagnosticsettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsDeleteSample.js -[diagnosticsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsGetSample.js -[diagnosticsettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsListSample.js -[eventcategorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/eventCategoriesListSample.js -[logprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesCreateOrUpdateSample.js -[logprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesDeleteSample.js -[logprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesGetSample.js -[logprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesListSample.js -[logprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesUpdateSample.js -[metricalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsCreateOrUpdateSample.js -[metricalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsDeleteSample.js -[metricalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsGetSample.js -[metricalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListByResourceGroupSample.js -[metricalertslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListBySubscriptionSample.js -[metricalertsstatuslistbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListByNameSample.js -[metricalertsstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListSample.js -[metricalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsUpdateSample.js -[metricdefinitionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricDefinitionsListSample.js -[metricnamespaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricNamespacesListSample.js -[metricslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/metricsListSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/operationsListSample.js -[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsGetSample.js -[privateendpointconnectionslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js -[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesGetSample.js -[privatelinkresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js -[privatelinkscopeoperationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopeOperationStatusGetSample.js -[privatelinkscopedresourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js -[privatelinkscopedresourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesDeleteSample.js -[privatelinkscopedresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesGetSample.js -[privatelinkscopedresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js -[privatelinkscopescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesCreateOrUpdateSample.js -[privatelinkscopesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesDeleteSample.js -[privatelinkscopesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesGetSample.js -[privatelinkscopeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListByResourceGroupSample.js -[privatelinkscopeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListSample.js -[privatelinkscopesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesUpdateTagsSample.js -[scheduledqueryrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesCreateOrUpdateSample.js -[scheduledqueryrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesDeleteSample.js -[scheduledqueryrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesGetSample.js -[scheduledqueryruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListByResourceGroupSample.js -[scheduledqueryruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListBySubscriptionSample.js -[scheduledqueryrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesUpdateSample.js -[tenantactivitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/javascript/tenantActivityLogsListSample.js -[vminsightsgetonboardingstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/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/v7/javascript/actionGroupsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsCreateOrUpdateSample.js deleted file mode 100644 index d7c33c47784c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/createOrUpdateActionGroup.json - */ -async function createOrUpdateAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -createOrUpdateAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsDeleteSample.js deleted file mode 100644 index b4eb2f4d2200..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/deleteActionGroup.json - */ -async function deleteAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -deleteAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsEnableReceiverSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsEnableReceiverSample.js deleted file mode 100644 index a5f2b52e4005..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsEnableReceiverSample.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"); - -/** - * 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/2021-09-01/examples/enableReceiver.json - */ -async function enableTheReceiver() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -enableTheReceiver().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetSample.js deleted file mode 100644 index 2b922374cb95..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/getActionGroup.json - */ -async function getAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -getAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetTestNotificationsSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetTestNotificationsSample.js deleted file mode 100644 index 4b31f686f33a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsGetTestNotificationsSample.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/getTestNotifications.json - */ -async function getNotificationDetails() { - const subscriptionId = "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); -} - -getNotificationDetails().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListByResourceGroupSample.js deleted file mode 100644 index 8d855a8ab9af..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/listActionGroups.json - */ -async function listActionGroups() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -listActionGroups().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListBySubscriptionIdSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListBySubscriptionIdSample.js deleted file mode 100644 index a731385387b9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsListBySubscriptionIdSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/listActionGroups.json - */ -async function listActionGroups() { - const subscriptionId = "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); -} - -listActionGroups().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsPostTestNotificationsSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsPostTestNotificationsSample.js deleted file mode 100644 index 020ec017f1f6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsPostTestNotificationsSample.js +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2021-09-01/examples/postTestNotifications.json - */ -async function listActionGroups() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const notificationRequest = { - alertType: "budget", - 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); -} - -listActionGroups().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsUpdateSample.js deleted file mode 100644 index ee07386635c3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/actionGroupsUpdateSample.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"); - -/** - * 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/2021-09-01/examples/patchActionGroup.json - */ -async function patchAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -patchAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsCreateOrUpdateSample.js deleted file mode 100644 index d04b0c2530aa..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsCreateOrUpdateSample.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"); - -/** - * This sample demonstrates how to Create a new activity log alert or update an existing one. - * - * @summary Create a new activity log alert or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/createOrUpdateActivityLogAlert.json - */ -async function createOrUpdateAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const activityLogAlert = { - description: "Sample activity log alert description", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/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, - activityLogAlert - ); - console.log(result); -} - -createOrUpdateAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsDeleteSample.js deleted file mode 100644 index 0d1978f0c78f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Delete an activity log alert. - * - * @summary Delete an activity log alert. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/deleteActivityLogAlert.json - */ -async function deleteAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.delete(resourceGroupName, activityLogAlertName); - console.log(result); -} - -deleteAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsGetSample.js deleted file mode 100644 index fe0e66f2609f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Get an activity log alert. - * - * @summary Get an activity log alert. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/getActivityLogAlert.json - */ -async function getAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.get(resourceGroupName, activityLogAlertName); - console.log(result); -} - -getAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListByResourceGroupSample.js deleted file mode 100644 index d04037c1b65b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Get a list of all activity log alerts in a resource group. - * - * @summary Get a list of all activity log alerts in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json - */ -async function listActivityLogAlerts() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - 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); -} - -listActivityLogAlerts().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListBySubscriptionIdSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListBySubscriptionIdSample.js deleted file mode 100644 index a45bc27f73c6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsListBySubscriptionIdSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Get a list of all activity log alerts in a subscription. - * - * @summary Get a list of all activity log alerts in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json - */ -async function listActivityLogAlerts() { - const subscriptionId = "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); -} - -listActivityLogAlerts().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsUpdateSample.js deleted file mode 100644 index 40c26b701436..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogAlertsUpdateSample.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"); - -/** - * This sample demonstrates how to Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/patchActivityLogAlert.json - */ -async function patchAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const activityLogAlertPatch = { - 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, - activityLogAlertPatch - ); - console.log(result); -} - -patchAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogsListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogsListSample.js deleted file mode 100644 index 127162efc33a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/activityLogsListSample.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"); - -/** - * 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 = "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); -} - -getActivityLogsWithFilter().catch(console.error); - -/** - * 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 = "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); -} - -getActivityLogsWithFilterAndSelect().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsGetSample.js deleted file mode 100644 index 67e897d7fa46..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getASingleAlertRuleIncident().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsListByAlertRuleSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsListByAlertRuleSample.js deleted file mode 100644 index f32a4149b83a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRuleIncidentsListByAlertRuleSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAlertRuleIncidents().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesCreateOrUpdateSample.js deleted file mode 100644 index a0c9999ebf3a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesCreateOrUpdateSample.js +++ /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. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesDeleteSample.js deleted file mode 100644 index b3fcf2ca22cd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -deleteAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesGetSample.js deleted file mode 100644 index 54dad275fcd2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListByResourceGroupSample.js deleted file mode 100644 index 6ca0168a3ede..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListBySubscriptionSample.js deleted file mode 100644 index 3ca6000ec440..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -listAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesUpdateSample.js deleted file mode 100644 index 3cd617bb5dad..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/alertRulesUpdateSample.js +++ /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. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -patchAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsCreateOrUpdateSample.js deleted file mode 100644 index b054ae08a63b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsCreateOrUpdateSample.js +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2015-04-01/examples/createOrUpdateAutoscaleSetting.json - */ -async function createOrUpdateAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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" }], - }, - ], - 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: {}, - 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); -} - -createOrUpdateAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsDeleteSample.js deleted file mode 100644 index bed67aa4faa6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2015-04-01/examples/deleteAutoscaleSetting.json - */ -async function deleteAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -deleteAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsGetSample.js deleted file mode 100644 index 347cd846c8d4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2015-04-01/examples/getAutoscaleSetting.json - */ -async function getAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListByResourceGroupSample.js deleted file mode 100644 index 2af1041c0e58..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2015-04-01/examples/listAutoscaleSetting.json - */ -async function listAutoscaleSettings() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAutoscaleSettings().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListBySubscriptionSample.js deleted file mode 100644 index 2de09c3627ca..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2015-04-01/examples/listAutoscaleSettingBySubscription.json - */ -async function listAutoscaleSettings() { - const subscriptionId = "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); -} - -listAutoscaleSettings().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsUpdateSample.js deleted file mode 100644 index 3ed89b6a9cf1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/autoscaleSettingsUpdateSample.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2015-04-01/examples/patchAutoscaleSetting.json - */ -async function patchAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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" }], - }, - ], - 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: { - $type: "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary", - }, - 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); -} - -patchAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/baselinesListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/baselinesListSample.js deleted file mode 100644 index 52c4e23b39c9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/baselinesListSample.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"); - -/** - * 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 = "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); -} - -getMetricBaselines().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsCreateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsCreateSample.js deleted file mode 100644 index 381e81f43419..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsCreateSample.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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsCreate.json - */ -async function createOrUpdateDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -createOrUpdateDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsDeleteSample.js deleted file mode 100644 index cf4d07749670..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsDelete.json - */ -async function deleteDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -deleteDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsGetSample.js deleted file mode 100644 index 054016b58fc5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsGet.json - */ -async function getDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -getDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListByResourceGroupSample.js deleted file mode 100644 index ede0e166c081..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsListByResourceGroup.json - */ -async function listDataCollectionEndpointsByResourceGroup() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listDataCollectionEndpointsByResourceGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListBySubscriptionSample.js deleted file mode 100644 index ef2f49dff682..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsListBySubscription.json - */ -async function listDataCollectionEndpointsBySubscription() { - const subscriptionId = "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); -} - -listDataCollectionEndpointsBySubscription().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsUpdateSample.js deleted file mode 100644 index d92cfe2c8d7c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionEndpointsUpdateSample.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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsUpdate.json - */ -async function updateDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -updateDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsCreateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsCreateSample.js deleted file mode 100644 index 86607f7bed9f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsCreateSample.js +++ /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. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsCreate.json - */ -async function createOrUpdateAssociation() { - const subscriptionId = "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); -} - -createOrUpdateAssociation().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsDeleteSample.js deleted file mode 100644 index 0b0b8eb5f7d8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Deletes an association. - * - * @summary Deletes an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsDelete.json - */ -async function deleteAssociation() { - const subscriptionId = "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); -} - -deleteAssociation().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsGetSample.js deleted file mode 100644 index 01cf20127799..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Returns the specified association. - * - * @summary Returns the specified association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsGet.json - */ -async function getAssociation() { - const subscriptionId = "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); -} - -getAssociation().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByResourceSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByResourceSample.js deleted file mode 100644 index 81ff0d56ef54..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByResourceSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByResource.json - */ -async function listAssociationsForSpecifiedResource() { - const subscriptionId = "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); -} - -listAssociationsForSpecifiedResource().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByRuleSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByRuleSample.js deleted file mode 100644 index bcd92d469ef2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRuleAssociationsListByRuleSample.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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByRule.json - */ -async function listAssociationsForSpecifiedDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listAssociationsForSpecifiedDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesCreateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesCreateSample.js deleted file mode 100644 index a1cad8d99b33..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesCreateSample.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesCreate.json - */ -async function createOrUpdateDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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", - "MemoryCommitted 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); -} - -createOrUpdateDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesDeleteSample.js deleted file mode 100644 index 4ca01d9ba5f1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesDelete.json - */ -async function deleteDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -deleteDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesGetSample.js deleted file mode 100644 index bb29c428d4fd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesGet.json - */ -async function getDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -getDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListByResourceGroupSample.js deleted file mode 100644 index e4dce3dcc49e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesListByResourceGroup.json - */ -async function listDataCollectionRulesByResourceGroup() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listDataCollectionRulesByResourceGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListBySubscriptionSample.js deleted file mode 100644 index a264d49171b8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesListBySubscription.json - */ -async function listDataCollectionRulesBySubscription() { - const subscriptionId = "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); -} - -listDataCollectionRulesBySubscription().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesUpdateSample.js deleted file mode 100644 index fd783a672a2d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/dataCollectionRulesUpdateSample.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"); - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesUpdate.json - */ -async function updateDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -updateDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryGetSample.js deleted file mode 100644 index bb38534cb6fd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryListSample.js deleted file mode 100644 index 8159cc297940..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCategoryListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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 result = await client.diagnosticSettingsCategory.list(resourceUri); - console.log(result); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCreateOrUpdateSample.js deleted file mode 100644 index 6c9873e5f5fa..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsCreateOrUpdateSample.js +++ /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. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json - */ -async function createsOrUpdatesTheDiagnosticSetting() { - const subscriptionId = "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/eventhubs/myeventhub/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { days: 0, enabled: false }, - }, - ], - 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); -} - -createsOrUpdatesTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsDeleteSample.js deleted file mode 100644 index bf92ef5faec0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2017-05-01-preview/examples/deleteDiagnosticSetting.json - */ -async function deletesTheDiagnosticSetting() { - const subscriptionId = "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); -} - -deletesTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsGetSample.js deleted file mode 100644 index 931cd946c08f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2017-05-01-preview/examples/getDiagnosticSetting.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsListSample.js deleted file mode 100644 index 70506c8d6df4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/diagnosticSettingsListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2017-05-01-preview/examples/listDiagnosticSettings.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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 result = await client.diagnosticSettings.list(resourceUri); - console.log(result); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/eventCategoriesListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/eventCategoriesListSample.js deleted file mode 100644 index c7f6223e7ac7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/eventCategoriesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -getEventCategories().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesCreateOrUpdateSample.js deleted file mode 100644 index ce11137f5a09..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesCreateOrUpdateSample.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"); - -/** - * 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 = "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); -} - -createOrUpdateALogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesDeleteSample.js deleted file mode 100644 index 67ba8630414b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -deleteLogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesGetSample.js deleted file mode 100644 index c3e36f5d9f05..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -getLogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesListSample.js deleted file mode 100644 index 649cae0472f1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -listLogProfiles().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesUpdateSample.js deleted file mode 100644 index c131a1df249b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/logProfilesUpdateSample.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"); - -/** - * 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 = "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); -} - -patchALogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsCreateOrUpdateSample.js deleted file mode 100644 index 85736ba0c29e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsCreateOrUpdateSample.js +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -createOrUpdateADynamicAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -createOrUpdateADynamicAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = "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); -} - -createOrUpdateAWebTestAlertRule().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleForMultipleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleOnResourceGroupS().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleOnSubscription().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRulesWithDimensions().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsDeleteSample.js deleted file mode 100644 index 2a9c6b511817..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -deleteAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsGetSample.js deleted file mode 100644 index 0552478f358d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsGetSample.js +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -getADynamicAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -getADynamicAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = "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); -} - -getAWebTestAlertRule().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleOnResourceGroupS().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleOnSubscription().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListByResourceGroupSample.js deleted file mode 100644 index 385a6fcd0d1f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -listMetricAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListBySubscriptionSample.js deleted file mode 100644 index 44328bf82505..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -listMetricAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListByNameSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListByNameSample.js deleted file mode 100644 index 22af932492a6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListByNameSample.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"); - -/** - * 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 = "009f6022-67ec-423e-9aa7-691182870588"; - const resourceGroupName = "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); -} - -getAnAlertRuleStatus().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListSample.js deleted file mode 100644 index de114912aa63..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsStatusListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleStatus().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsUpdateSample.js deleted file mode 100644 index dfc64d63d0f0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricAlertsUpdateSample.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"); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricDefinitionsListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricDefinitionsListSample.js deleted file mode 100644 index b3c7a49c9666..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricDefinitionsListSample.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -getApplicationInsightsMetricDefinitionsWithoutFilter().catch(console.error); - -/** - * 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 = "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); -} - -getMetricDefinitionsWithoutFilter().catch(console.error); - -/** - * 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 = "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); -} - -getStorageCacheMetricDefinitionsWithMetricClass().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricNamespacesListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricNamespacesListSample.js deleted file mode 100644 index 419b0ef7fb1c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricNamespacesListSample.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"); - -/** - * 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 = "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); -} - -getMetricNamespacesWithoutFilter().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/metricsListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/metricsListSample.js deleted file mode 100644 index bf5d52e97b89..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/metricsListSample.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricForData().catch(console.error); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricForMetadata().catch(console.error); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricWithError().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/operationsListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/operationsListSample.js deleted file mode 100644 index 3d58399960f1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/operationsListSample.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); -} - -getAListOfOperationsForAResourceProvider().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/package.json b/sdk/monitor/arm-monitor/samples/v7/javascript/package.json deleted file mode 100644 index 2aad593f9860..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-monitor-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=12.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": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 09fc2a8cd940..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsCreateOrUpdateSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionUpdate.json - */ -async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -approveOrRejectAPrivateEndpointConnectionWithAGivenName().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsDeleteSample.js deleted file mode 100644 index 0bf2b215457b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsDeleteSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionDelete.json - */ -async function deletesAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -deletesAPrivateEndpointConnectionWithAGivenName().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsGetSample.js deleted file mode 100644 index 8f297aa9cfe9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsGetSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateEndpointConnection().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js deleted file mode 100644 index 7500faabe6d5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionList.json - */ -async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateEndpointConnections.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesGetSample.js deleted file mode 100644 index d31e2056f910..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateEndpointConnection().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js deleted file mode 100644 index 13c1c242d3dd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkResourcesListByPrivateLinkScopeSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getsPrivateEndpointConnection().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopeOperationStatusGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopeOperationStatusGetSample.js deleted file mode 100644 index 02239b075b4f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopeOperationStatusGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/privateLinkScopeOperationStatuses.json - */ -async function getSpecificOperationStatus() { - const subscriptionId = "613192d7-503f-477a-9cfe-4efc3ee2bd60"; - const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11"; - const resourceGroupName = "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopeOperationStatus.get( - asyncOperationId, - resourceGroupName - ); - console.log(result); -} - -getSpecificOperationStatus().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js deleted file mode 100644 index 269e5653609e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js +++ /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. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceUpdate.json - */ -async function updateAScopedResourceInAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -updateAScopedResourceInAPrivateLinkScope().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesDeleteSample.js deleted file mode 100644 index ac73c4bf0ae9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesDeleteSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceDelete.json - */ -async function deletesAScopedResourceWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -deletesAScopedResourceWithAGivenName().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesGetSample.js deleted file mode 100644 index f9602556e06c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceGet.json - */ -async function getsPrivateLinkScopedResource() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateLinkScopedResource().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js deleted file mode 100644 index bdedd509c009..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceList.json - */ -async function getsListOfScopedResourcesInAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsListOfScopedResourcesInAPrivateLinkScope().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesCreateOrUpdateSample.js deleted file mode 100644 index fe5de1905632..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesCreateOrUpdateSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesCreate.json - */ -async function privateLinkScopeCreate() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload = { - location: "Global", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -privateLinkScopeCreate().catch(console.error); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesUpdate.json - */ -async function privateLinkScopeUpdate() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload = { - 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); -} - -privateLinkScopeUpdate().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesDeleteSample.js deleted file mode 100644 index 1f1b2aa95ad6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesDelete.json - */ -async function privateLinkScopesDelete() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopesDelete().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesGetSample.js deleted file mode 100644 index b57a0fad77de..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesGet.json - */ -async function privateLinkScopeGet() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopeGet().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListByResourceGroupSample.js deleted file mode 100644 index 61f5ed823f19..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesListByResourceGroup.json - */ -async function privateLinkScopeListByResourceGroup() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopeListByResourceGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListSample.js deleted file mode 100644 index 98606a80df87..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesList.json - */ -async function privateLinkScopesListJson() { - const subscriptionId = "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); -} - -privateLinkScopesListJson().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesUpdateTagsSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesUpdateTagsSample.js deleted file mode 100644 index e125dd5c94b1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/privateLinkScopesUpdateTagsSample.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"); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesUpdateTagsOnly.json - */ -async function privateLinkScopeUpdateTagsOnly() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -privateLinkScopeUpdateTagsOnly().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/sample.env b/sdk/monitor/arm-monitor/samples/v7/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/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/v7/javascript/scheduledQueryRulesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesCreateOrUpdateSample.js deleted file mode 100644 index 6a946a62dd15..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRules.json - */ -async function createOrUpdateRuleAlertingAction() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const parameters = { - description: "log alert description", - action: { - aznsAction: { - actionGroup: [], - customWebhookPayload: "{}", - emailSubject: "Email Header", - }, - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - severity: "1", - trigger: { - metricTrigger: { - metricColumn: "Computer", - metricTriggerType: "Consecutive", - threshold: 5, - thresholdOperator: "GreaterThan", - }, - threshold: 3, - thresholdOperator: "GreaterThan", - }, - }, - enabled: "true", - location: "eastus", - schedule: { frequencyInMinutes: 15, timeWindowInMinutes: 15 }, - source: { - dataSourceId: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace", - query: "Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", - queryType: "ResultCount", - }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleAlertingAction().catch(console.error); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRuleswithCrossResource.json - */ -async function createOrUpdateRuleAlertingActionWithCrossResource() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "SampleCrossResourceAlert"; - const parameters = { - description: "Sample Cross Resource alert", - action: { - aznsAction: { - actionGroup: [ - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag", - ], - emailSubject: "Cross Resource Mail!!", - }, - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - severity: "3", - trigger: { threshold: 5000, thresholdOperator: "GreaterThan" }, - }, - enabled: "true", - location: "eastus", - schedule: { frequencyInMinutes: 60, timeWindowInMinutes: 60 }, - source: { - authorizedResources: [ - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace", - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI", - ], - dataSourceId: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI", - query: 'union requests, workspace("sampleWorkspace").Update', - queryType: "ResultCount", - }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleAlertingActionWithCrossResource().catch(console.error); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRule-LogToMetricAction.json - */ -async function createOrUpdateRuleLogToMetricAction() { - const subscriptionId = "af52d502-a447-4bc6-8cb7-4780fbb00490"; - const resourceGroupName = "alertsweu"; - const ruleName = "logtometricfoo"; - const parameters = { - description: "log to metric description", - action: { - criteria: [{ dimensions: [], metricName: "Average_% Idle Time" }], - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction", - }, - enabled: "true", - location: "West Europe", - source: { - dataSourceId: - "/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu", - }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleLogToMetricAction().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesDeleteSample.js deleted file mode 100644 index a17659e18259..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Deletes a Log Search rule - * - * @summary Deletes a Log Search rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/deleteScheduledQueryRules.json - */ -async function deleteRule() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.delete(resourceGroupName, ruleName); - console.log(result); -} - -deleteRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesGetSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesGetSample.js deleted file mode 100644 index d4112d50fd62..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Gets an Log Search rule - * - * @summary Gets an Log Search rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/getScheduledQueryRules.json - */ -async function getRule() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.get(resourceGroupName, ruleName); - console.log(result); -} - -getRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListByResourceGroupSample.js deleted file mode 100644 index 5b275e2f5047..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to List the Log Search rules within a resource group. - * - * @summary List the Log Search rules within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json - */ -async function listRules() { - const subscriptionId = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "gigtest"; - 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); -} - -listRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListBySubscriptionSample.js deleted file mode 100644 index 05bfe236e433..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to List the Log Search rules within a subscription group. - * - * @summary List the Log Search rules within a subscription group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json - */ -async function listRules() { - const subscriptionId = "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.scheduledQueryRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesUpdateSample.js deleted file mode 100644 index c79e8531e7e5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/scheduledQueryRulesUpdateSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * This sample demonstrates how to Update log search Rule. - * - * @summary Update log search Rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/patchScheduledQueryRules.json - */ -async function patchLogSearchRule() { - const subscriptionId = "subid"; - const resourceGroupName = "my-resource-group"; - const ruleName = "logalertfoo"; - const parameters = { enabled: "true" }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.update(resourceGroupName, ruleName, parameters); - console.log(result); -} - -patchLogSearchRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/tenantActivityLogsListSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/tenantActivityLogsListSample.js deleted file mode 100644 index f3885f99f323..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/tenantActivityLogsListSample.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithFilter().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithFilterAndSelect().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithSelect().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithoutFilterOrSelect().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/javascript/vmInsightsGetOnboardingStatusSample.js b/sdk/monitor/arm-monitor/samples/v7/javascript/vmInsightsGetOnboardingStatusSample.js deleted file mode 100644 index 34debcfbeba0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/javascript/vmInsightsGetOnboardingStatusSample.js +++ /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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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 = "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); -} - -getStatusForAVMScaleSetThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAVMThatHasNotYetReportedData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAVMThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/README.md b/sdk/monitor/arm-monitor/samples/v7/typescript/README.md deleted file mode 100644 index 39ad1cc9a3cc..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/README.md +++ /dev/null @@ -1,255 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [actionGroupsCreateOrUpdateSample.ts][actiongroupscreateorupdatesample] | Create a new action group or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/createOrUpdateActionGroup.json | -| [actionGroupsDeleteSample.ts][actiongroupsdeletesample] | Delete an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-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/2021-09-01/examples/enableReceiver.json | -| [actionGroupsGetSample.ts][actiongroupsgetsample] | Get an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getActionGroup.json | -| [actionGroupsGetTestNotificationsSample.ts][actiongroupsgettestnotificationssample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-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/2021-09-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/2021-09-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/2021-09-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/2021-09-01/examples/patchActionGroup.json | -| [activityLogAlertsCreateOrUpdateSample.ts][activitylogalertscreateorupdatesample] | Create a new activity log alert or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/createOrUpdateActivityLogAlert.json | -| [activityLogAlertsDeleteSample.ts][activitylogalertsdeletesample] | Delete an activity log alert. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/deleteActivityLogAlert.json | -| [activityLogAlertsGetSample.ts][activitylogalertsgetsample] | Get an activity log alert. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/getActivityLogAlert.json | -| [activityLogAlertsListByResourceGroupSample.ts][activitylogalertslistbyresourcegroupsample] | Get a list of all activity log alerts in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json | -| [activityLogAlertsListBySubscriptionIdSample.ts][activitylogalertslistbysubscriptionidsample] | Get a list of all activity log alerts in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json | -| [activityLogAlertsUpdateSample.ts][activitylogalertsupdatesample] | Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/patchActivityLogAlert.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/2015-04-01/examples/createOrUpdateAutoscaleSetting.json | -| [autoscaleSettingsDeleteSample.ts][autoscalesettingsdeletesample] | Deletes and autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/deleteAutoscaleSetting.json | -| [autoscaleSettingsGetSample.ts][autoscalesettingsgetsample] | Gets an autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-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/2015-04-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/2015-04-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/2015-04-01/examples/patchAutoscaleSetting.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/stable/2021-04-01/examples/DataCollectionEndpointsCreate.json | -| [dataCollectionEndpointsDeleteSample.ts][datacollectionendpointsdeletesample] | Deletes a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionEndpointsDelete.json | -| [dataCollectionEndpointsGetSample.ts][datacollectionendpointsgetsample] | Returns the specified data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/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/stable/2021-04-01/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/stable/2021-04-01/examples/DataCollectionEndpointsListBySubscription.json | -| [dataCollectionEndpointsUpdateSample.ts][datacollectionendpointsupdatesample] | Updates part of a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionEndpointsUpdate.json | -| [dataCollectionRuleAssociationsCreateSample.ts][datacollectionruleassociationscreatesample] | Creates or updates an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsCreate.json | -| [dataCollectionRuleAssociationsDeleteSample.ts][datacollectionruleassociationsdeletesample] | Deletes an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsDelete.json | -| [dataCollectionRuleAssociationsGetSample.ts][datacollectionruleassociationsgetsample] | Returns the specified association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsGet.json | -| [dataCollectionRuleAssociationsListByResourceSample.ts][datacollectionruleassociationslistbyresourcesample] | Lists associations for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByResource.json | -| [dataCollectionRuleAssociationsListByRuleSample.ts][datacollectionruleassociationslistbyrulesample] | Lists associations for the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByRule.json | -| [dataCollectionRulesCreateSample.ts][datacollectionrulescreatesample] | Creates or updates a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesCreate.json | -| [dataCollectionRulesDeleteSample.ts][datacollectionrulesdeletesample] | Deletes a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesDelete.json | -| [dataCollectionRulesGetSample.ts][datacollectionrulesgetsample] | Returns the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/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/stable/2021-04-01/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/stable/2021-04-01/examples/DataCollectionRulesListBySubscription.json | -| [dataCollectionRulesUpdateSample.ts][datacollectionrulesupdatesample] | Updates part of a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/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/2017-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/2017-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/2017-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/2017-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/2017-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/2017-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 | -| [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 | -| [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/2019-10-17-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/2019-10-17-preview/examples/PrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-preview/examples/PrivateLinkScopesCreate.json | -| [privateLinkScopesDeleteSample.ts][privatelinkscopesdeletesample] | Deletes a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateLinkScopesDelete.json | -| [privateLinkScopesGetSample.ts][privatelinkscopesgetsample] | Returns a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-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/2019-10-17-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/2019-10-17-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/2019-10-17-preview/examples/PrivateLinkScopesUpdateTagsOnly.json | -| [scheduledQueryRulesCreateOrUpdateSample.ts][scheduledqueryrulescreateorupdatesample] | Creates or updates an log search rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRules.json | -| [scheduledQueryRulesDeleteSample.ts][scheduledqueryrulesdeletesample] | Deletes a Log Search rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/deleteScheduledQueryRules.json | -| [scheduledQueryRulesGetSample.ts][scheduledqueryrulesgetsample] | Gets an Log Search rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/getScheduledQueryRules.json | -| [scheduledQueryRulesListByResourceGroupSample.ts][scheduledqueryruleslistbyresourcegroupsample] | List the Log Search rules within a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json | -| [scheduledQueryRulesListBySubscriptionSample.ts][scheduledqueryruleslistbysubscriptionsample] | List the Log Search rules within a subscription group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json | -| [scheduledQueryRulesUpdateSample.ts][scheduledqueryrulesupdatesample] | Update log search Rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/patchScheduledQueryRules.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://nodejs.org/about/releases/). - -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/actionGroupsCreateOrUpdateSample.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 node dist/actionGroupsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[actiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsCreateOrUpdateSample.ts -[actiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsDeleteSample.ts -[actiongroupsenablereceiversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsEnableReceiverSample.ts -[actiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetSample.ts -[actiongroupsgettestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetTestNotificationsSample.ts -[actiongroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListByResourceGroupSample.ts -[actiongroupslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListBySubscriptionIdSample.ts -[actiongroupsposttestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsPostTestNotificationsSample.ts -[actiongroupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsUpdateSample.ts -[activitylogalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsCreateOrUpdateSample.ts -[activitylogalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsDeleteSample.ts -[activitylogalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsGetSample.ts -[activitylogalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListByResourceGroupSample.ts -[activitylogalertslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts -[activitylogalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsUpdateSample.ts -[activitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogsListSample.ts -[alertruleincidentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsGetSample.ts -[alertruleincidentslistbyalertrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts -[alertrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesCreateOrUpdateSample.ts -[alertrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesDeleteSample.ts -[alertrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesGetSample.ts -[alertruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListByResourceGroupSample.ts -[alertruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListBySubscriptionSample.ts -[alertrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesUpdateSample.ts -[autoscalesettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts -[autoscalesettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsDeleteSample.ts -[autoscalesettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsGetSample.ts -[autoscalesettingslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListByResourceGroupSample.ts -[autoscalesettingslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListBySubscriptionSample.ts -[autoscalesettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsUpdateSample.ts -[baselineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/baselinesListSample.ts -[datacollectionendpointscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsCreateSample.ts -[datacollectionendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsDeleteSample.ts -[datacollectionendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsGetSample.ts -[datacollectionendpointslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts -[datacollectionendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts -[datacollectionendpointsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsUpdateSample.ts -[datacollectionruleassociationscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsCreateSample.ts -[datacollectionruleassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts -[datacollectionruleassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsGetSample.ts -[datacollectionruleassociationslistbyresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts -[datacollectionruleassociationslistbyrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts -[datacollectionrulescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesCreateSample.ts -[datacollectionrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesDeleteSample.ts -[datacollectionrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesGetSample.ts -[datacollectionruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListByResourceGroupSample.ts -[datacollectionruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListBySubscriptionSample.ts -[datacollectionrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesUpdateSample.ts -[diagnosticsettingscategorygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryGetSample.ts -[diagnosticsettingscategorylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryListSample.ts -[diagnosticsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts -[diagnosticsettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsDeleteSample.ts -[diagnosticsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsGetSample.ts -[diagnosticsettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsListSample.ts -[eventcategorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/eventCategoriesListSample.ts -[logprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesCreateOrUpdateSample.ts -[logprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesDeleteSample.ts -[logprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesGetSample.ts -[logprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesListSample.ts -[logprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesUpdateSample.ts -[metricalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsCreateOrUpdateSample.ts -[metricalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsDeleteSample.ts -[metricalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsGetSample.ts -[metricalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListByResourceGroupSample.ts -[metricalertslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListBySubscriptionSample.ts -[metricalertsstatuslistbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListByNameSample.ts -[metricalertsstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListSample.ts -[metricalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsUpdateSample.ts -[metricdefinitionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricDefinitionsListSample.ts -[metricnamespaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricNamespacesListSample.ts -[metricslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricsListSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/operationsListSample.ts -[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts -[privateendpointconnectionslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts -[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesGetSample.ts -[privatelinkresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts -[privatelinkscopeoperationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopeOperationStatusGetSample.ts -[privatelinkscopedresourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts -[privatelinkscopedresourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesDeleteSample.ts -[privatelinkscopedresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesGetSample.ts -[privatelinkscopedresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts -[privatelinkscopescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesCreateOrUpdateSample.ts -[privatelinkscopesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesDeleteSample.ts -[privatelinkscopesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesGetSample.ts -[privatelinkscopeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListByResourceGroupSample.ts -[privatelinkscopeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListSample.ts -[privatelinkscopesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesUpdateTagsSample.ts -[scheduledqueryrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts -[scheduledqueryrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesDeleteSample.ts -[scheduledqueryrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesGetSample.ts -[scheduledqueryruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts -[scheduledqueryruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts -[scheduledqueryrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesUpdateSample.ts -[tenantactivitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/typescript/src/tenantActivityLogsListSample.ts -[vminsightsgetonboardingstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v7/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/v7/typescript/package.json b/sdk/monitor/arm-monitor/samples/v7/typescript/package.json deleted file mode 100644 index 63eb271bf947..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-monitor-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=12.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": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^12.0.0", - "typescript": "~4.4.0", - "rimraf": "latest" - } -} diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/sample.env b/sdk/monitor/arm-monitor/samples/v7/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/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/v7/typescript/src/actionGroupsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 6ab3f7dcd049..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsCreateOrUpdateSample.ts +++ /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. -import { ActionGroupResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/createOrUpdateActionGroup.json - */ -async function createOrUpdateAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -createOrUpdateAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsDeleteSample.ts deleted file mode 100644 index cbbb0a976559..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/deleteActionGroup.json - */ -async function deleteAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -deleteAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsEnableReceiverSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsEnableReceiverSample.ts deleted file mode 100644 index 6e5b36f9c3b8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsEnableReceiverSample.ts +++ /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. -import { EnableRequest, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/enableReceiver.json - */ -async function enableTheReceiver() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -enableTheReceiver().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetSample.ts deleted file mode 100644 index eb284a69b070..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/getActionGroup.json - */ -async function getAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -getAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetTestNotificationsSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetTestNotificationsSample.ts deleted file mode 100644 index a23533024ede..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsGetTestNotificationsSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/getTestNotifications.json - */ -async function getNotificationDetails() { - const subscriptionId = "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); -} - -getNotificationDetails().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListByResourceGroupSample.ts deleted file mode 100644 index 1fa849732cd5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/listActionGroups.json - */ -async function listActionGroups() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -listActionGroups().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListBySubscriptionIdSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListBySubscriptionIdSample.ts deleted file mode 100644 index bbadd2c17395..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/listActionGroups.json - */ -async function listActionGroups() { - const subscriptionId = "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); -} - -listActionGroups().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsPostTestNotificationsSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsPostTestNotificationsSample.ts deleted file mode 100644 index 247f2f81cc11..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsPostTestNotificationsSample.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2021-09-01/examples/postTestNotifications.json - */ -async function listActionGroups() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - 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); -} - -listActionGroups().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsUpdateSample.ts deleted file mode 100644 index 3a474f9a38aa..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/actionGroupsUpdateSample.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 { ActionGroupPatchBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2021-09-01/examples/patchActionGroup.json - */ -async function patchAnActionGroup() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "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); -} - -patchAnActionGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsCreateOrUpdateSample.ts deleted file mode 100644 index a14b32a4ce75..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsCreateOrUpdateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActivityLogAlertResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create a new activity log alert or update an existing one. - * - * @summary Create a new activity log alert or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/createOrUpdateActivityLogAlert.json - */ -async function createOrUpdateAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const activityLogAlert: ActivityLogAlertResource = { - description: "Sample activity log alert description", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/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, - activityLogAlert - ); - console.log(result); -} - -createOrUpdateAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsDeleteSample.ts deleted file mode 100644 index 2b09c0550d99..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Delete an activity log alert. - * - * @summary Delete an activity log alert. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/deleteActivityLogAlert.json - */ -async function deleteAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.delete( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -deleteAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsGetSample.ts deleted file mode 100644 index 7724ad45f338..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Get an activity log alert. - * - * @summary Get an activity log alert. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/getActivityLogAlert.json - */ -async function getAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.get( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -getAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListByResourceGroupSample.ts deleted file mode 100644 index 14a283f5ece4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a list of all activity log alerts in a resource group. - * - * @summary Get a list of all activity log alerts in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json - */ -async function listActivityLogAlerts() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - 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); -} - -listActivityLogAlerts().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts deleted file mode 100644 index f6d77abd3dc5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Get a list of all activity log alerts in a subscription. - * - * @summary Get a list of all activity log alerts in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/listActivityLogAlerts.json - */ -async function listActivityLogAlerts() { - const subscriptionId = "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); -} - -listActivityLogAlerts().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsUpdateSample.ts deleted file mode 100644 index 027db8c22c76..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogAlertsUpdateSample.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 { ActivityLogAlertPatchBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2017-04-01/examples/patchActivityLogAlert.json - */ -async function patchAnActivityLogAlert() { - const subscriptionId = "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = "Default-ActivityLogAlerts"; - const activityLogAlertName = "SampleActivityLogAlert"; - const activityLogAlertPatch: ActivityLogAlertPatchBody = { - 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, - activityLogAlertPatch - ); - console.log(result); -} - -patchAnActivityLogAlert().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogsListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogsListSample.ts deleted file mode 100644 index bfe0834c38d5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/activityLogsListSample.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 { - ActivityLogsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getActivityLogsWithFilter().catch(console.error); - -/** - * 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 = "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); -} - -getActivityLogsWithFilterAndSelect().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsGetSample.ts deleted file mode 100644 index 63b490c82b03..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getASingleAlertRuleIncident().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts deleted file mode 100644 index f4c64d9d78c4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRuleIncidentsListByAlertRuleSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAlertRuleIncidents().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesCreateOrUpdateSample.ts deleted file mode 100644 index 84504952c1ab..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesCreateOrUpdateSample.ts +++ /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. -import { AlertRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesDeleteSample.ts deleted file mode 100644 index 8dc25f8e8d3d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -deleteAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesGetSample.ts deleted file mode 100644 index 15bb81680a64..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListByResourceGroupSample.ts deleted file mode 100644 index 574e1e4af6a1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListBySubscriptionSample.ts deleted file mode 100644 index 463d30dd0c95..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -listAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesUpdateSample.ts deleted file mode 100644 index a48a50c7afed..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/alertRulesUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -patchAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts deleted file mode 100644 index e04f96a1f731..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/createOrUpdateAutoscaleSetting.json - */ -async function createOrUpdateAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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" }] - } - ], - 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: {}, - 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); -} - -createOrUpdateAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsDeleteSample.ts deleted file mode 100644 index 8d49bd695e5b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/deleteAutoscaleSetting.json - */ -async function deleteAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -deleteAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsGetSample.ts deleted file mode 100644 index 259a466cbd33..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/getAutoscaleSetting.json - */ -async function getAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -getAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListByResourceGroupSample.ts deleted file mode 100644 index 04b64b11b11c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2015-04-01/examples/listAutoscaleSetting.json - */ -async function listAutoscaleSettings() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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); -} - -listAutoscaleSettings().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListBySubscriptionSample.ts deleted file mode 100644 index e25c994424f6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/listAutoscaleSettingBySubscription.json - */ -async function listAutoscaleSettings() { - const subscriptionId = "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); -} - -listAutoscaleSettings().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsUpdateSample.ts deleted file mode 100644 index e40b7242e80f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/autoscaleSettingsUpdateSample.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2015-04-01/examples/patchAutoscaleSetting.json - */ -async function patchAnAutoscaleSetting() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "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" }] - } - ], - 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: { - $type: - "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary" - }, - 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); -} - -patchAnAutoscaleSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/baselinesListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/baselinesListSample.ts deleted file mode 100644 index 9018150856ce..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/baselinesListSample.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 { BaselinesListOptionalParams, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getMetricBaselines().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsCreateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsCreateSample.ts deleted file mode 100644 index fd1b34fa3c67..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsCreateSample.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 { - DataCollectionEndpointResource, - DataCollectionEndpointsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsCreate.json - */ -async function createOrUpdateDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -createOrUpdateDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsDeleteSample.ts deleted file mode 100644 index 58ed1507d329..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsDelete.json - */ -async function deleteDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -deleteDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsGetSample.ts deleted file mode 100644 index 15d59ce87b7d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsGet.json - */ -async function getDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -getDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts deleted file mode 100644 index 7dd3470b6184..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsListByResourceGroup.json - */ -async function listDataCollectionEndpointsByResourceGroup() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listDataCollectionEndpointsByResourceGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts deleted file mode 100644 index 898ef2de4084..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsListBySubscription.json - */ -async function listDataCollectionEndpointsBySubscription() { - const subscriptionId = "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); -} - -listDataCollectionEndpointsBySubscription().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsUpdateSample.ts deleted file mode 100644 index 6d0e3dcc80fe..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionEndpointsUpdateSample.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 { - ResourceForUpdate, - DataCollectionEndpointsUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionEndpointsUpdate.json - */ -async function updateDataCollectionEndpoint() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -updateDataCollectionEndpoint().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsCreateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsCreateSample.ts deleted file mode 100644 index e7e191b37e10..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsCreateSample.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 { - DataCollectionRuleAssociationProxyOnlyResource, - DataCollectionRuleAssociationsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsCreate.json - */ -async function createOrUpdateAssociation() { - const subscriptionId = "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); -} - -createOrUpdateAssociation().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts deleted file mode 100644 index c8379ec2118c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes an association. - * - * @summary Deletes an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsDelete.json - */ -async function deleteAssociation() { - const subscriptionId = "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); -} - -deleteAssociation().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsGetSample.ts deleted file mode 100644 index 0d1236af8d2c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Returns the specified association. - * - * @summary Returns the specified association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsGet.json - */ -async function getAssociation() { - const subscriptionId = "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); -} - -getAssociation().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts deleted file mode 100644 index 9f2eb716a617..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByResource.json - */ -async function listAssociationsForSpecifiedResource() { - const subscriptionId = "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); -} - -listAssociationsForSpecifiedResource().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts deleted file mode 100644 index 4c5fe67d5499..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRuleAssociationsListByRuleSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByRule.json - */ -async function listAssociationsForSpecifiedDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listAssociationsForSpecifiedDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesCreateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesCreateSample.ts deleted file mode 100644 index 73c3bfc29fe9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesCreateSample.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesCreate.json - */ -async function createOrUpdateDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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", - "MemoryCommitted 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); -} - -createOrUpdateDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesDeleteSample.ts deleted file mode 100644 index 2fc1447aee69..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesDelete.json - */ -async function deleteDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -deleteDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesGetSample.ts deleted file mode 100644 index 8a7944c626fe..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesGet.json - */ -async function getDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -getDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListByResourceGroupSample.ts deleted file mode 100644 index 5a4116d873a2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesListByResourceGroup.json - */ -async function listDataCollectionRulesByResourceGroup() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -listDataCollectionRulesByResourceGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListBySubscriptionSample.ts deleted file mode 100644 index 57a1fe0c7a76..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesListBySubscription.json - */ -async function listDataCollectionRulesBySubscription() { - const subscriptionId = "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); -} - -listDataCollectionRulesBySubscription().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesUpdateSample.ts deleted file mode 100644 index d68e5b87e4a5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/dataCollectionRulesUpdateSample.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 { - ResourceForUpdate, - DataCollectionRulesUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/stable/2021-04-01/examples/DataCollectionRulesUpdate.json - */ -async function updateDataCollectionRule() { - const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = "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); -} - -updateDataCollectionRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryGetSample.ts deleted file mode 100644 index 06272e6bc9f6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryListSample.ts deleted file mode 100644 index 12e5c007dc32..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCategoryListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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 result = await client.diagnosticSettingsCategory.list(resourceUri); - console.log(result); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 6fa2f892b47d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts +++ /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. -import { DiagnosticSettingsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json - */ -async function createsOrUpdatesTheDiagnosticSetting() { - const subscriptionId = "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/eventhubs/myeventhub/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - 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); -} - -createsOrUpdatesTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsDeleteSample.ts deleted file mode 100644 index 81dbb6ecb822..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsDeleteSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/deleteDiagnosticSetting.json - */ -async function deletesTheDiagnosticSetting() { - const subscriptionId = "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); -} - -deletesTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsGetSample.ts deleted file mode 100644 index 5fdb2c168237..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/getDiagnosticSetting.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsListSample.ts deleted file mode 100644 index 5870ba90b4b3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/diagnosticSettingsListSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2017-05-01-preview/examples/listDiagnosticSettings.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = "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 result = await client.diagnosticSettings.list(resourceUri); - console.log(result); -} - -getsTheDiagnosticSetting().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/eventCategoriesListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/eventCategoriesListSample.ts deleted file mode 100644 index 327aee38fa46..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/eventCategoriesListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getEventCategories().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesCreateOrUpdateSample.ts deleted file mode 100644 index 9380ac49e851..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesCreateOrUpdateSample.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 { LogProfileResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -createOrUpdateALogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesDeleteSample.ts deleted file mode 100644 index 05afd6c9cfdd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesDeleteSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -deleteLogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesGetSample.ts deleted file mode 100644 index fcfd4e333451..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getLogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesListSample.ts deleted file mode 100644 index c85e315bb4c4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -listLogProfiles().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesUpdateSample.ts deleted file mode 100644 index 6c604354e8ad..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/logProfilesUpdateSample.ts +++ /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. -import { LogProfileResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -patchALogProfile().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsCreateOrUpdateSample.ts deleted file mode 100644 index de5f8be8879d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsCreateOrUpdateSample.ts +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -createOrUpdateADynamicAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -createOrUpdateADynamicAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = "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); -} - -createOrUpdateAWebTestAlertRule().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleForMultipleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleOnResourceGroupS().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRuleOnSubscription().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRulesWithDimensions().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsDeleteSample.ts deleted file mode 100644 index 3b25ab0bc93f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -deleteAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsGetSample.ts deleted file mode 100644 index 20f1c2da8438..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsGetSample.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -getADynamicAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = "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); -} - -getADynamicAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = "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); -} - -getAWebTestAlertRule().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleForMultipleResources().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleForSingleResource().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleOnResourceGroupS().catch(console.error); - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleOnSubscription().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListByResourceGroupSample.ts deleted file mode 100644 index e35301adb673..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -listMetricAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListBySubscriptionSample.ts deleted file mode 100644 index a40ec5a27ddd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -listMetricAlertRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListByNameSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListByNameSample.ts deleted file mode 100644 index 112a5b0c9e80..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListByNameSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "009f6022-67ec-423e-9aa7-691182870588"; - const resourceGroupName = "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); -} - -getAnAlertRuleStatus().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListSample.ts deleted file mode 100644 index 0408b564ef6e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsStatusListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -getAnAlertRuleStatus().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsUpdateSample.ts deleted file mode 100644 index d7e5b58acbc3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricAlertsUpdateSample.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 { MetricAlertResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "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); -} - -createOrUpdateAnAlertRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricDefinitionsListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricDefinitionsListSample.ts deleted file mode 100644 index 4b7ec466e7d8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricDefinitionsListSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getApplicationInsightsMetricDefinitionsWithoutFilter().catch(console.error); - -/** - * 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 = "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); -} - -getMetricDefinitionsWithoutFilter().catch(console.error); - -/** - * 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 = "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); -} - -getStorageCacheMetricDefinitionsWithMetricClass().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricNamespacesListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricNamespacesListSample.ts deleted file mode 100644 index 64c8b014c540..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricNamespacesListSample.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 { - MetricNamespacesListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getMetricNamespacesWithoutFilter().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricsListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricsListSample.ts deleted file mode 100644 index 87c22cbc65f8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/metricsListSample.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricForData().catch(console.error); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricForMetadata().catch(console.error); - -/** - * 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 = "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.metrics.list(resourceUri, options); - console.log(result); -} - -getMetricWithError().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/operationsListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/operationsListSample.ts deleted file mode 100644 index 758830df40d5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); -} - -getAListOfOperationsForAResourceProvider().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 428d68626435..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.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 { PrivateEndpointConnection, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionUpdate.json - */ -async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -approveOrRejectAPrivateEndpointConnectionWithAGivenName().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts deleted file mode 100644 index 7000adc1396d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionDelete.json - */ -async function deletesAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -deletesAPrivateEndpointConnectionWithAGivenName().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts deleted file mode 100644 index 46bdb2873e37..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateEndpointConnection().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts deleted file mode 100644 index c3131689799f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateEndpointConnectionList.json - */ -async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateEndpointConnections.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesGetSample.ts deleted file mode 100644 index 9f3d578ad2f3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateEndpointConnection().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts deleted file mode 100644 index 968c40731005..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getsPrivateEndpointConnection().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopeOperationStatusGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopeOperationStatusGetSample.ts deleted file mode 100644 index fbc659366e32..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopeOperationStatusGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/privateLinkScopeOperationStatuses.json - */ -async function getSpecificOperationStatus() { - const subscriptionId = "613192d7-503f-477a-9cfe-4efc3ee2bd60"; - const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11"; - const resourceGroupName = "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopeOperationStatus.get( - asyncOperationId, - resourceGroupName - ); - console.log(result); -} - -getSpecificOperationStatus().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts deleted file mode 100644 index 6878cecdad91..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.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 { ScopedResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceUpdate.json - */ -async function updateAScopedResourceInAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -updateAScopedResourceInAPrivateLinkScope().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesDeleteSample.ts deleted file mode 100644 index 8ad05ff860ca..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesDeleteSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceDelete.json - */ -async function deletesAScopedResourceWithAGivenName() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -deletesAScopedResourceWithAGivenName().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesGetSample.ts deleted file mode 100644 index 6613c5534c4a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesGetSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceGet.json - */ -async function getsPrivateLinkScopedResource() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsPrivateLinkScopedResource().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts deleted file mode 100644 index 910faa6ffd11..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopedResourceList.json - */ -async function getsListOfScopedResourcesInAPrivateLinkScope() { - const subscriptionId = "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = "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); -} - -getsListOfScopedResourcesInAPrivateLinkScope().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesCreateOrUpdateSample.ts deleted file mode 100644 index f78060f8a6b8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesCreateOrUpdateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorPrivateLinkScope, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesCreate.json - */ -async function privateLinkScopeCreate() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - location: "Global" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -privateLinkScopeCreate().catch(console.error); - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesUpdate.json - */ -async function privateLinkScopeUpdate() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - 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); -} - -privateLinkScopeUpdate().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesDeleteSample.ts deleted file mode 100644 index d94e50bc41b3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesDelete.json - */ -async function privateLinkScopesDelete() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopesDelete().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesGetSample.ts deleted file mode 100644 index 1cd5aefa1a38..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesGet.json - */ -async function privateLinkScopeGet() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopeGet().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListByResourceGroupSample.ts deleted file mode 100644 index 1d7b4f002a03..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesListByResourceGroup.json - */ -async function privateLinkScopeListByResourceGroup() { - const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = "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); -} - -privateLinkScopeListByResourceGroup().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListSample.ts deleted file mode 100644 index da347b2cd80c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesList.json - */ -async function privateLinkScopesListJson() { - const subscriptionId = "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); -} - -privateLinkScopesListJson().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesUpdateTagsSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesUpdateTagsSample.ts deleted file mode 100644 index 55b909ad32aa..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/privateLinkScopesUpdateTagsSample.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 { TagsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/2019-10-17-preview/examples/PrivateLinkScopesUpdateTagsOnly.json - */ -async function privateLinkScopeUpdateTagsOnly() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -privateLinkScopeUpdateTagsOnly().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts deleted file mode 100644 index 14f27c7ec33d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { LogSearchRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRules.json - */ -async function createOrUpdateRuleAlertingAction() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const parameters: LogSearchRuleResource = { - description: "log alert description", - action: { - aznsAction: { - actionGroup: [], - customWebhookPayload: "{}", - emailSubject: "Email Header" - }, - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - severity: "1", - trigger: { - metricTrigger: { - metricColumn: "Computer", - metricTriggerType: "Consecutive", - threshold: 5, - thresholdOperator: "GreaterThan" - }, - threshold: 3, - thresholdOperator: "GreaterThan" - } - }, - enabled: "true", - location: "eastus", - schedule: { frequencyInMinutes: 15, timeWindowInMinutes: 15 }, - source: { - dataSourceId: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace", - query: - "Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", - queryType: "ResultCount" - }, - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleAlertingAction().catch(console.error); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRuleswithCrossResource.json - */ -async function createOrUpdateRuleAlertingActionWithCrossResource() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "SampleCrossResourceAlert"; - const parameters: LogSearchRuleResource = { - description: "Sample Cross Resource alert", - action: { - aznsAction: { - actionGroup: [ - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag" - ], - emailSubject: "Cross Resource Mail!!" - }, - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - severity: "3", - trigger: { threshold: 5000, thresholdOperator: "GreaterThan" } - }, - enabled: "true", - location: "eastus", - schedule: { frequencyInMinutes: 60, timeWindowInMinutes: 60 }, - source: { - authorizedResources: [ - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace", - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI" - ], - dataSourceId: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI", - query: 'union requests, workspace("sampleWorkspace").Update', - queryType: "ResultCount" - }, - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleAlertingActionWithCrossResource().catch(console.error); - -/** - * This sample demonstrates how to Creates or updates an log search rule. - * - * @summary Creates or updates an log search rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/createOrUpdateScheduledQueryRule-LogToMetricAction.json - */ -async function createOrUpdateRuleLogToMetricAction() { - const subscriptionId = "af52d502-a447-4bc6-8cb7-4780fbb00490"; - const resourceGroupName = "alertsweu"; - const ruleName = "logtometricfoo"; - const parameters: LogSearchRuleResource = { - description: "log to metric description", - action: { - criteria: [{ dimensions: [], metricName: "Average_% Idle Time" }], - odataType: - "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" - }, - enabled: "true", - location: "West Europe", - source: { - dataSourceId: - "/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu" - }, - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -createOrUpdateRuleLogToMetricAction().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesDeleteSample.ts deleted file mode 100644 index e5d32d5deca6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Deletes a Log Search rule - * - * @summary Deletes a Log Search rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/deleteScheduledQueryRules.json - */ -async function deleteRule() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.delete( - resourceGroupName, - ruleName - ); - console.log(result); -} - -deleteRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesGetSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesGetSample.ts deleted file mode 100644 index 159d6e1f4415..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to Gets an Log Search rule - * - * @summary Gets an Log Search rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/getScheduledQueryRules.json - */ -async function getRule() { - const subscriptionId = "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = "Rac46PostSwapRG"; - const ruleName = "logalertfoo"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.get( - resourceGroupName, - ruleName - ); - console.log(result); -} - -getRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts deleted file mode 100644 index 4a54ad156ab2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts +++ /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. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List the Log Search rules within a resource group. - * - * @summary List the Log Search rules within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json - */ -async function listRules() { - const subscriptionId = "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = "gigtest"; - 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); -} - -listRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts deleted file mode 100644 index 2fca11d6bcf0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * This sample demonstrates how to List the Log Search rules within a subscription group. - * - * @summary List the Log Search rules within a subscription group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/listScheduledQueryRules.json - */ -async function listRules() { - const subscriptionId = "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.scheduledQueryRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listRules().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesUpdateSample.ts deleted file mode 100644 index ab8f6ea717d9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/scheduledQueryRulesUpdateSample.ts +++ /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. -import { LogSearchRuleResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Update log search Rule. - * - * @summary Update log search Rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/examples/patchScheduledQueryRules.json - */ -async function patchLogSearchRule() { - const subscriptionId = "subid"; - const resourceGroupName = "my-resource-group"; - const ruleName = "logalertfoo"; - const parameters: LogSearchRuleResourcePatch = { enabled: "true" }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.update( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -patchLogSearchRule().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/tenantActivityLogsListSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/tenantActivityLogsListSample.ts deleted file mode 100644 index f4f597a65179..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/tenantActivityLogsListSample.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"; - -/** - * 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 = "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); -} - -getTenantActivityLogsWithFilter().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithFilterAndSelect().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithSelect().catch(console.error); - -/** - * 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 = "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); -} - -getTenantActivityLogsWithoutFilterOrSelect().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/src/vmInsightsGetOnboardingStatusSample.ts b/sdk/monitor/arm-monitor/samples/v7/typescript/src/vmInsightsGetOnboardingStatusSample.ts deleted file mode 100644 index 726927302f4f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/src/vmInsightsGetOnboardingStatusSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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 = "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); -} - -getStatusForAVMScaleSetThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAVMThatHasNotYetReportedData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAVMThatIsActivelyReportingData().catch(console.error); - -/** - * 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 = "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); -} - -getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData().catch( - console.error -); - -/** - * 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 = "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); -} - -getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData().catch( - console.error -); diff --git a/sdk/monitor/arm-monitor/samples/v7/typescript/tsconfig.json b/sdk/monitor/arm-monitor/samples/v7/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/monitor/arm-monitor/samples/v7/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "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/models/index.ts b/sdk/monitor/arm-monitor/src/models/index.ts index 34e82344e627..74005669d761 100644 --- a/sdk/monitor/arm-monitor/src/models/index.ts +++ b/sdk/monitor/arm-monitor/src/models/index.ts @@ -655,16 +655,6 @@ export interface NotificationRequestBody { eventHubReceivers?: EventHubReceiver[]; } -/** The response when test notification succeeded */ -export interface TestNotificationResponse { - /** The notification id */ - notificationId: string; - /** The correlation id */ - correlationId: string; - /** The created time */ - createdTime: string; -} - /** The details of the test notification results. */ export interface TestNotificationDetailsResponse { /** The context info */ @@ -1436,45 +1426,90 @@ export interface ScopedResourceListResult { readonly nextLink?: string; } -/** An Activity Log alert condition that is met when all its member conditions are met. */ -export interface ActivityLogAlertAllOfCondition { - /** The list of activity log alert conditions. */ - allOf: ActivityLogAlertLeafCondition[]; +/** 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[]; } -/** An Activity Log alert condition that is met by comparing an activity log field and value. */ -export interface ActivityLogAlertLeafCondition { - /** The name of the 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 field value will be compared to this value (case-insensitive) to determine if the condition is met. */ - equals: string; +/** + * 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'. + */ +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 actions. */ -export interface ActivityLogAlertActionList { - /** The list of activity log alerts. */ - actionGroups?: ActivityLogAlertActionGroup[]; +/** 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 ActivityLogAlertActionGroup { - /** The resourceId of the action group. This cannot be null or empty. */ +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 }; } -/** An activity log alert object for the body of patch operations. */ -export interface ActivityLogAlertPatchBody { - /** Resource tags */ +/** 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 }; - /** Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. */ +} + +/** 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; +} + +/** 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; } -/** A list of activity log alerts. */ -export interface ActivityLogAlertList { - /** The list of activity log alerts. */ +/** 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; @@ -1525,7 +1560,7 @@ export interface DataCollectionEndpointResource { description?: string; /** The immutable ID of this data collection endpoint resource. This property is READ-ONLY. */ immutableId?: string; - /** The endpoint used by agents to access their configuration. */ + /** The endpoint used by clients to access their configuration. */ configurationAccess?: DataCollectionEndpointConfigurationAccess; /** The endpoint used by clients to ingest logs. */ logsIngestion?: DataCollectionEndpointLogsIngestion; @@ -1544,7 +1579,7 @@ export interface DataCollectionEndpoint { description?: string; /** The immutable ID of this data collection endpoint resource. This property is READ-ONLY. */ immutableId?: string; - /** The endpoint used by agents to access their configuration. */ + /** The endpoint used by clients to access their configuration. */ configurationAccess?: DataCollectionEndpointConfigurationAccess; /** The endpoint used by clients to ingest logs. */ logsIngestion?: DataCollectionEndpointLogsIngestion; @@ -1684,6 +1719,11 @@ export interface DataCollectionRuleAssociationProxyOnlyResource { * 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. */ @@ -1699,6 +1739,20 @@ export interface DataCollectionRuleAssociation { * 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. */ @@ -1749,6 +1803,15 @@ export interface DataCollectionRuleResource { * 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. @@ -1774,6 +1837,15 @@ export interface DataCollectionRule { * 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. @@ -1790,6 +1862,20 @@ export interface DataCollectionRule { 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. */ @@ -1800,6 +1886,10 @@ export interface DataSourcesSpec { 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[]; } /** @@ -1890,6 +1980,51 @@ export interface ExtensionDataSource { 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. */ @@ -1929,6 +2064,10 @@ export interface DataFlow { 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; } /** The claims for a rule management event data source. */ @@ -2124,20 +2263,6 @@ export type MetricAlertResource = Resource & { readonly isMigrated?: boolean; }; -/** An activity log alert resource. */ -export type ActivityLogAlertResource = Resource & { - /** A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs with resourceIds that fall under one of these prefixes. This list must include at least one item. */ - scopes?: string[]; - /** Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. */ - enabled?: boolean; - /** The condition that will cause this alert to activate. */ - condition?: ActivityLogAlertAllOfCondition; - /** The actions that will activate when the condition is met. */ - actions?: ActivityLogAlertActionList; - /** A description of this activity log alert. */ - description?: string; -}; - /** The resource management error response. */ export type ErrorResponseCommon = ErrorResponse & { /** @@ -2444,10 +2569,39 @@ export type AzureMonitorPrivateLinkScope = PrivateLinkScopesResource & { readonly privateEndpointConnections?: PrivateEndpointConnection[]; }; +/** + * 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 type AlertRuleAnyOfOrLeafCondition = 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 type ActivityLogAlertResource = 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 type DataCollectionEndpointResourceProperties = DataCollectionEndpoint & {}; -/** The endpoint used by agents to access their configuration. */ +/** The endpoint used by clients to access their configuration. */ export type DataCollectionEndpointConfigurationAccess = ConfigurationAccessEndpointSpec & {}; /** The endpoint used by clients to ingest logs. */ @@ -2468,6 +2622,12 @@ export type DataCollectionRuleResourceSystemData = SystemData & {}; /** Resource properties. */ export type DataCollectionRuleAssociationProxyOnlyResourceProperties = DataCollectionRuleAssociation & {}; +/** Metadata about the resource */ +export type DataCollectionRuleAssociationMetadata = Metadata & {}; + +/** Metadata about the resource */ +export type DataCollectionRuleMetadata = Metadata & {}; + /** Resource properties. */ export type DataCollectionRuleResourceProperties = DataCollectionRule & {}; @@ -2477,6 +2637,12 @@ export type DataCollectionRuleResourceProperties = DataCollectionRule & {}; */ export type DataCollectionRuleDataSources = DataSourcesSpec & {}; +/** The log files specific settings. */ +export type LogFilesDataSourceSettings = LogFileSettings & {}; + +/** Text settings */ +export type LogFileSettingsText = LogFileTextSettings & {}; + /** The specification of destinations. */ export type DataCollectionRuleDestinations = DestinationsSpec & {}; @@ -2507,6 +2673,24 @@ export type DynamicMetricCriteria = MultiMetricCriteria & { ignoreDataBefore?: Date; }; +/** 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", @@ -2817,6 +3001,32 @@ export enum KnownKnownDataCollectionRuleAssociationProvisioningState { */ export type KnownDataCollectionRuleAssociationProvisioningState = string; +/** Known values of {@link KnownColumnDefinitionType} that the service accepts. */ +export enum KnownKnownColumnDefinitionType { + String = "string", + Int = "int", + Long = "long", + Real = "real", + Boolean = "boolean", + Datetime = "datetime", + 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 = "Microsoft-Perf", @@ -2969,6 +3179,50 @@ export enum KnownKnownExtensionDataSourceStreams { */ export type KnownExtensionDataSourceStreams = string; +/** Known values of {@link KnownLogFilesDataSourceFormat} that the service accepts. */ +export enum KnownKnownLogFilesDataSourceFormat { + 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 = "ISO 8601", + YyyyMMDDHHMMSS = "YYYY-MM-DD HH:MM:SS", + MDYyyyHHMMSSAMPM = "M/D/YYYY HH:MM:SS AM/PM", + MonDDYyyyHHMMSS = "Mon DD, YYYY HH:MM:SS", + YyMMddHHMmSs = "yyMMdd HH:mm:ss", + DdMMyyHHMmSs = "ddMMyy HH:mm:ss", + MMMDHhMmSs = "MMM d hh:mm:ss", + DdMMMYyyyHHMmSsZzz = "dd/MMM/yyyy:HH:mm:ss zzz", + 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 = "Microsoft-Event", @@ -3476,7 +3730,31 @@ export interface ActionGroupsPostTestNotificationsOptionalParams } /** Contains response data for the postTestNotifications operation. */ -export type ActionGroupsPostTestNotificationsResponse = TestNotificationResponse; +export type ActionGroupsPostTestNotificationsResponse = ActionGroupsPostTestNotificationsHeaders; + +/** 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 = ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders; + +/** 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 = ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders; /** Optional parameters. */ export interface ActionGroupsGetTestNotificationsOptionalParams @@ -3485,6 +3763,20 @@ export interface ActionGroupsGetTestNotificationsOptionalParams /** 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 {} @@ -3936,14 +4228,28 @@ export interface ActivityLogAlertsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionId operation. */ -export type ActivityLogAlertsListBySubscriptionIdResponse = ActivityLogAlertList; +export type ActivityLogAlertsListBySubscriptionIdResponse = AlertRuleList; /** Optional parameters. */ export interface ActivityLogAlertsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type ActivityLogAlertsListByResourceGroupResponse = ActivityLogAlertList; +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 @@ -4018,6 +4324,13 @@ export interface DataCollectionRuleAssociationsListByRuleOptionalParams /** 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 {} @@ -4053,6 +4366,13 @@ export interface DataCollectionRuleAssociationsListByRuleNextOptionalParams /** 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 {} diff --git a/sdk/monitor/arm-monitor/src/models/mappers.ts b/sdk/monitor/arm-monitor/src/models/mappers.ts index 1e57aafe18fc..9e7d5b5bab51 100644 --- a/sdk/monitor/arm-monitor/src/models/mappers.ts +++ b/sdk/monitor/arm-monitor/src/models/mappers.ts @@ -1916,36 +1916,6 @@ export const NotificationRequestBody: coreClient.CompositeMapper = { } }; -export const TestNotificationResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TestNotificationResponse", - modelProperties: { - notificationId: { - serializedName: "notificationId", - required: true, - type: { - name: "String" - } - }, - correlationId: { - serializedName: "correlationId", - required: true, - type: { - name: "String" - } - }, - createdTime: { - serializedName: "createdTime", - required: true, - type: { - name: "String" - } - } - } - } -}; - export const TestNotificationDetailsResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3984,10 +3954,10 @@ export const ScopedResourceListResult: coreClient.CompositeMapper = { } }; -export const ActivityLogAlertAllOfCondition: coreClient.CompositeMapper = { +export const AlertRuleAllOfCondition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActivityLogAlertAllOfCondition", + className: "AlertRuleAllOfCondition", modelProperties: { allOf: { serializedName: "allOf", @@ -3997,7 +3967,7 @@ export const ActivityLogAlertAllOfCondition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ActivityLogAlertLeafCondition" + className: "AlertRuleAnyOfOrLeafCondition" } } } @@ -4006,33 +3976,42 @@ export const ActivityLogAlertAllOfCondition: coreClient.CompositeMapper = { } }; -export const ActivityLogAlertLeafCondition: coreClient.CompositeMapper = { +export const AlertRuleLeafCondition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActivityLogAlertLeafCondition", + className: "AlertRuleLeafCondition", modelProperties: { field: { serializedName: "field", - required: true, type: { name: "String" } }, equals: { serializedName: "equals", - required: true, type: { name: "String" } + }, + containsAny: { + serializedName: "containsAny", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const ActivityLogAlertActionList: coreClient.CompositeMapper = { +export const ActionList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActivityLogAlertActionList", + className: "ActionList", modelProperties: { actionGroups: { serializedName: "actionGroups", @@ -4041,7 +4020,7 @@ export const ActivityLogAlertActionList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ActivityLogAlertActionGroup" + className: "ActionGroup" } } } @@ -4050,10 +4029,10 @@ export const ActivityLogAlertActionList: coreClient.CompositeMapper = { } }; -export const ActivityLogAlertActionGroup: coreClient.CompositeMapper = { +export const ActionGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActivityLogAlertActionGroup", + className: "ActionGroup", modelProperties: { actionGroupId: { serializedName: "actionGroupId", @@ -4073,10 +4052,77 @@ export const ActivityLogAlertActionGroup: coreClient.CompositeMapper = { } }; -export const ActivityLogAlertPatchBody: coreClient.CompositeMapper = { +export const AzureResourceAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActivityLogAlertPatchBody", + 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", @@ -4096,10 +4142,10 @@ export const ActivityLogAlertPatchBody: coreClient.CompositeMapper = { } }; -export const ActivityLogAlertList: coreClient.CompositeMapper = { +export const AlertRuleList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActivityLogAlertList", + className: "AlertRuleList", modelProperties: { value: { serializedName: "value", @@ -4576,6 +4622,13 @@ export const DataCollectionRuleAssociationProxyOnlyResource: coreClient.Composit type: { name: "String" } + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "DataCollectionRuleAssociationMetadata" + } } } } @@ -4610,6 +4663,29 @@ export const DataCollectionRuleAssociation: coreClient.CompositeMapper = { 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" + } } } } @@ -4716,6 +4792,26 @@ export const DataCollectionRuleResource: coreClient.CompositeMapper = { 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: { @@ -4771,6 +4867,26 @@ export const DataCollectionRule: coreClient.CompositeMapper = { 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: { @@ -4808,6 +4924,48 @@ export const DataCollectionRule: coreClient.CompositeMapper = { } }; +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", @@ -4860,6 +5018,30 @@ export const DataSourcesSpec: coreClient.CompositeMapper = { } } } + }, + logFiles: { + serializedName: "logFiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogFilesDataSource" + } + } + } + }, + iisLogs: { + serializedName: "iisLogs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IisLogsDataSource" + } + } + } } } } @@ -5044,6 +5226,129 @@ export const ExtensionDataSource: coreClient.CompositeMapper = { } }; +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", @@ -5141,6 +5446,18 @@ export const DataFlow: coreClient.CompositeMapper = { } } } + }, + transformKql: { + serializedName: "transformKql", + type: { + name: "String" + } + }, + outputStream: { + serializedName: "outputStream", + type: { + name: "String" + } } } } @@ -5773,54 +6090,6 @@ export const MetricAlertResource: coreClient.CompositeMapper = { } }; -export const ActivityLogAlertResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActivityLogAlertResource", - modelProperties: { - ...Resource.type.modelProperties, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - enabled: { - defaultValue: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - condition: { - serializedName: "properties.condition", - type: { - name: "Composite", - className: "ActivityLogAlertAllOfCondition" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Composite", - className: "ActivityLogAlertActionList" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - } - } - } -}; - export const ErrorResponseCommon: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6740,6 +7009,76 @@ export const AzureMonitorPrivateLinkScope: coreClient.CompositeMapper = { } }; +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", @@ -6820,6 +7159,26 @@ export const DataCollectionRuleAssociationProxyOnlyResourceProperties: coreClien } }; +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", @@ -6840,6 +7199,26 @@ export const DataCollectionRuleDataSources: coreClient.CompositeMapper = { } }; +export const LogFilesDataSourceSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogFilesDataSourceSettings", + modelProperties: { + ...LogFileSettings.type.modelProperties + } + } +}; + +export const LogFileSettingsText: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogFileSettingsText", + modelProperties: { + ...LogFileTextSettings.type.modelProperties + } + } +}; + export const DataCollectionRuleDestinations: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6929,6 +7308,52 @@ export const DynamicMetricCriteria: coreClient.CompositeMapper = { } }; +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", + type: { + name: "String" + } + } + } + } +}; + +export const ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { RuleCondition: RuleCondition, RuleDataSource: RuleDataSource, diff --git a/sdk/monitor/arm-monitor/src/models/parameters.ts b/sdk/monitor/arm-monitor/src/models/parameters.ts index 02e16f2df062..be175a8b011e 100644 --- a/sdk/monitor/arm-monitor/src/models/parameters.ts +++ b/sdk/monitor/arm-monitor/src/models/parameters.ts @@ -32,7 +32,7 @@ import { PrivateEndpointConnection as PrivateEndpointConnectionMapper, ScopedResource as ScopedResourceMapper, ActivityLogAlertResource as ActivityLogAlertResourceMapper, - ActivityLogAlertPatchBody as ActivityLogAlertPatchBodyMapper, + AlertRulePatchObject as AlertRulePatchObjectMapper, DataCollectionEndpointResource as DataCollectionEndpointResourceMapper, ResourceForUpdate as ResourceForUpdateMapper, DataCollectionRuleAssociationProxyOnlyResource as DataCollectionRuleAssociationProxyOnlyResourceMapper, @@ -273,7 +273,7 @@ export const actionGroupName: OperationURLParameter = { export const apiVersion3: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-09-01", + defaultValue: "2022-06-01", isConstant: true, serializedName: "api-version", type: { @@ -619,8 +619,8 @@ export const parameters9: OperationParameter = { mapper: ScopedResourceMapper }; -export const activityLogAlert: OperationParameter = { - parameterPath: "activityLogAlert", +export const activityLogAlertRule: OperationParameter = { + parameterPath: "activityLogAlertRule", mapper: ActivityLogAlertResourceMapper }; @@ -638,7 +638,7 @@ export const activityLogAlertName: OperationURLParameter = { export const apiVersion11: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2017-04-01", + defaultValue: "2020-10-01", isConstant: true, serializedName: "api-version", type: { @@ -647,15 +647,15 @@ export const apiVersion11: OperationQueryParameter = { } }; -export const activityLogAlertPatch: OperationParameter = { - parameterPath: "activityLogAlertPatch", - mapper: ActivityLogAlertPatchBodyMapper +export const activityLogAlertRulePatch: OperationParameter = { + parameterPath: "activityLogAlertRulePatch", + mapper: AlertRulePatchObjectMapper }; export const apiVersion12: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-04-01", + defaultValue: "2021-09-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/monitor/arm-monitor/src/monitorClient.ts b/sdk/monitor/arm-monitor/src/monitorClient.ts index 619fca5e81c2..6379de27a6df 100644 --- a/sdk/monitor/arm-monitor/src/monitorClient.ts +++ b/sdk/monitor/arm-monitor/src/monitorClient.ts @@ -7,7 +7,6 @@ */ import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { AutoscaleSettingsImpl, @@ -102,7 +101,7 @@ export class MonitorClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-monitor/7.0.1`; + const packageDetails = `azsdk-js-arm-monitor/8.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -117,33 +116,9 @@ export class MonitorClient extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix }, - baseUri: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + baseUri: options.endpoint || "https://management.azure.com" }; super(optionsWithDefaults); - - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName - ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } - } // Parameter assignments this.subscriptionId = subscriptionId; diff --git a/sdk/monitor/arm-monitor/src/operations/actionGroups.ts b/sdk/monitor/arm-monitor/src/operations/actionGroups.ts index c52e8e6c08a0..90e1e01625ce 100644 --- a/sdk/monitor/arm-monitor/src/operations/actionGroups.ts +++ b/sdk/monitor/arm-monitor/src/operations/actionGroups.ts @@ -29,8 +29,16 @@ import { NotificationRequestBody, ActionGroupsPostTestNotificationsOptionalParams, ActionGroupsPostTestNotificationsResponse, + ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams, + ActionGroupsCreateNotificationsAtResourceGroupLevelResponse, + ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams, + ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse, ActionGroupsGetTestNotificationsOptionalParams, ActionGroupsGetTestNotificationsResponse, + ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams, + ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse, + ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams, + ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse, ActionGroupsListBySubscriptionIdResponse, ActionGroupsListByResourceGroupResponse, EnableRequest, @@ -259,13 +267,11 @@ export class ActionGroupsImpl implements ActionGroups { { notificationRequest, options }, postTestNotificationsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, lroResourceLocationConfig: "location" }); - await poller.poll(); - return poller; } /** @@ -284,6 +290,189 @@ export class ActionGroupsImpl implements ActionGroups { 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< + PollerLike< + PollOperationState< + ActionGroupsCreateNotificationsAtResourceGroupLevelResponse + >, + ActionGroupsCreateNotificationsAtResourceGroupLevelResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, notificationRequest, options }, + createNotificationsAtResourceGroupLevelOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * 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< + PollerLike< + PollOperationState< + ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse + >, + ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, actionGroupName, notificationRequest, options }, + createNotificationsAtActionGroupResourceLevelOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * 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 @@ -299,6 +488,44 @@ export class ActionGroupsImpl implements ActionGroups { ); } + /** + * 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. @@ -450,16 +677,16 @@ const postTestNotificationsOperationSpec: coreClient.OperationSpec = { httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.TestNotificationResponse + headersMapper: Mappers.ActionGroupsPostTestNotificationsHeaders }, 201: { - bodyMapper: Mappers.TestNotificationResponse + headersMapper: Mappers.ActionGroupsPostTestNotificationsHeaders }, 202: { - bodyMapper: Mappers.TestNotificationResponse + headersMapper: Mappers.ActionGroupsPostTestNotificationsHeaders }, 204: { - bodyMapper: Mappers.TestNotificationResponse + headersMapper: Mappers.ActionGroupsPostTestNotificationsHeaders }, default: { bodyMapper: Mappers.ErrorResponse @@ -472,6 +699,79 @@ const postTestNotificationsOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const createNotificationsAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders + }, + 201: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders + }, + 202: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders + }, + 204: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.notificationRequest, + queryParameters: [Parameters.apiVersion3], + 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: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders + }, + 201: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders + }, + 202: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders + }, + 204: { + headersMapper: + Mappers.ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.notificationRequest, + queryParameters: [Parameters.apiVersion3], + 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}", @@ -493,6 +793,51 @@ const getTestNotificationsOperationSpec: coreClient.OperationSpec = { 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.apiVersion3], + 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.apiVersion3], + 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", diff --git a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts b/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts index d8ea0ff086d6..5796a784a4c2 100644 --- a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts +++ b/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts @@ -14,18 +14,22 @@ import * as Parameters from "../models/parameters"; import { MonitorClient } from "../monitorClient"; import { ActivityLogAlertResource, + ActivityLogAlertsListBySubscriptionIdNextOptionalParams, ActivityLogAlertsListBySubscriptionIdOptionalParams, + ActivityLogAlertsListByResourceGroupNextOptionalParams, ActivityLogAlertsListByResourceGroupOptionalParams, ActivityLogAlertsCreateOrUpdateOptionalParams, ActivityLogAlertsCreateOrUpdateResponse, ActivityLogAlertsGetOptionalParams, ActivityLogAlertsGetResponse, ActivityLogAlertsDeleteOptionalParams, - ActivityLogAlertPatchBody, + AlertRulePatchObject, ActivityLogAlertsUpdateOptionalParams, ActivityLogAlertsUpdateResponse, ActivityLogAlertsListBySubscriptionIdResponse, - ActivityLogAlertsListByResourceGroupResponse + ActivityLogAlertsListByResourceGroupResponse, + ActivityLogAlertsListBySubscriptionIdNextResponse, + ActivityLogAlertsListByResourceGroupNextResponse } from "../models"; /// @@ -42,7 +46,7 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Get a list of all activity log alerts in a subscription. + * Get a list of all Activity Log Alert rules in a subscription. * @param options The options parameters. */ public listBySubscriptionId( @@ -67,6 +71,12 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { ): AsyncIterableIterator { let result = await this._listBySubscriptionId(options); yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionIdNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } } private async *listBySubscriptionIdPagingAll( @@ -78,7 +88,7 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Get a list of all activity log alerts in a resource group. + * 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. */ @@ -106,6 +116,16 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { ): AsyncIterableIterator { let result = await this._listByResourceGroup(resourceGroupName, options); yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } private async *listByResourceGroupPagingAll( @@ -121,28 +141,33 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Create a new activity log alert or update an existing one. + * 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. - * @param activityLogAlert The activity log alert to create or use for the update. + * @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, - activityLogAlert: ActivityLogAlertResource, + activityLogAlertRule: ActivityLogAlertResource, options?: ActivityLogAlertsCreateOrUpdateOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, activityLogAlertName, activityLogAlert, options }, + { + resourceGroupName, + activityLogAlertName, + activityLogAlertRule, + options + }, createOrUpdateOperationSpec ); } /** - * Get an activity log alert. + * 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. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param options The options parameters. */ get( @@ -157,9 +182,9 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Delete an activity log alert. + * 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. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param options The options parameters. */ delete( @@ -174,24 +199,25 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate - * method. + * 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. - * @param activityLogAlertPatch Parameters supplied to the operation. + * @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, - activityLogAlertPatch: ActivityLogAlertPatchBody, + activityLogAlertRulePatch: AlertRulePatchObject, options?: ActivityLogAlertsUpdateOptionalParams ): Promise { return this.client.sendOperationRequest( { resourceGroupName, activityLogAlertName, - activityLogAlertPatch, + activityLogAlertRulePatch, options }, updateOperationSpec @@ -199,7 +225,7 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Get a list of all activity log alerts in a subscription. + * Get a list of all Activity Log Alert rules in a subscription. * @param options The options parameters. */ private _listBySubscriptionId( @@ -212,7 +238,7 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { } /** - * Get a list of all activity log alerts in a resource group. + * 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. */ @@ -225,13 +251,45 @@ export class ActivityLogAlertsImpl implements ActivityLogAlerts { 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}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", httpMethod: "PUT", responses: { 200: { @@ -241,10 +299,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ActivityLogAlertResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseAutoGenerated } }, - requestBody: Parameters.activityLogAlert, + requestBody: Parameters.activityLogAlertRule, queryParameters: [Parameters.apiVersion11], urlParameters: [ Parameters.$host, @@ -258,14 +316,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ActivityLogAlertResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseAutoGenerated } }, queryParameters: [Parameters.apiVersion11], @@ -280,13 +338,13 @@ const getOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseAutoGenerated } }, queryParameters: [Parameters.apiVersion11], @@ -301,17 +359,17 @@ const deleteOperationSpec: coreClient.OperationSpec = { }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.ActivityLogAlertResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseAutoGenerated } }, - requestBody: Parameters.activityLogAlertPatch, + requestBody: Parameters.activityLogAlertRulePatch, queryParameters: [Parameters.apiVersion11], urlParameters: [ Parameters.$host, @@ -325,14 +383,14 @@ const updateOperationSpec: coreClient.OperationSpec = { }; const listBySubscriptionIdOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts", + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ActivityLogAlertList + bodyMapper: Mappers.AlertRuleList }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseAutoGenerated } }, queryParameters: [Parameters.apiVersion11], @@ -342,14 +400,14 @@ const listBySubscriptionIdOperationSpec: coreClient.OperationSpec = { }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ActivityLogAlertList + bodyMapper: Mappers.AlertRuleList }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseAutoGenerated } }, queryParameters: [Parameters.apiVersion11], @@ -361,3 +419,44 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listBySubscriptionIdNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AlertRuleList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion11], + 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 + } + }, + queryParameters: [Parameters.apiVersion11], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + 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 index 07beb51228ee..ebfe158a04e2 100644 --- a/sdk/monitor/arm-monitor/src/operations/dataCollectionRuleAssociations.ts +++ b/sdk/monitor/arm-monitor/src/operations/dataCollectionRuleAssociations.ts @@ -18,15 +18,19 @@ import { DataCollectionRuleAssociationsListByResourceOptionalParams, DataCollectionRuleAssociationsListByRuleNextOptionalParams, DataCollectionRuleAssociationsListByRuleOptionalParams, + DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams, + DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams, DataCollectionRuleAssociationsListByResourceResponse, DataCollectionRuleAssociationsListByRuleResponse, + DataCollectionRuleAssociationsListByDataCollectionEndpointResponse, DataCollectionRuleAssociationsGetOptionalParams, DataCollectionRuleAssociationsGetResponse, DataCollectionRuleAssociationsCreateOptionalParams, DataCollectionRuleAssociationsCreateResponse, DataCollectionRuleAssociationsDeleteOptionalParams, DataCollectionRuleAssociationsListByResourceNextResponse, - DataCollectionRuleAssociationsListByRuleNextResponse + DataCollectionRuleAssociationsListByRuleNextResponse, + DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse } from "../models"; /// @@ -171,6 +175,80 @@ export class DataCollectionRuleAssociationsImpl } } + /** + * 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: () => { + return this.listByDataCollectionEndpointPagingPage( + resourceGroupName, + dataCollectionEndpointName, + options + ); + } + }; + } + + private async *listByDataCollectionEndpointPagingPage( + resourceGroupName: string, + dataCollectionEndpointName: string, + options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataCollectionEndpoint( + resourceGroupName, + dataCollectionEndpointName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataCollectionEndpointNext( + resourceGroupName, + dataCollectionEndpointName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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. @@ -203,6 +281,26 @@ export class DataCollectionRuleAssociationsImpl ); } + /** + * 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. @@ -289,6 +387,29 @@ export class DataCollectionRuleAssociationsImpl 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); @@ -334,6 +455,29 @@ const listByRuleOperationSpec: coreClient.OperationSpec = { 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.apiVersion12], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.dataCollectionEndpointName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}", @@ -445,3 +589,26 @@ const listByRuleNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listByDataCollectionEndpointNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseCommonV2 + } + }, + queryParameters: [Parameters.apiVersion12], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.dataCollectionEndpointName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts b/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts index 6a1296571cbe..23d81a18fab0 100644 --- a/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts +++ b/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts @@ -201,12 +201,10 @@ export class PrivateEndpointConnectionsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -291,12 +289,10 @@ export class PrivateEndpointConnectionsImpl { resourceGroupName, scopeName, privateEndpointConnectionName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts b/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts index 278342de7378..94599b7fb244 100644 --- a/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts +++ b/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts @@ -195,12 +195,10 @@ export class PrivateLinkScopedResourcesImpl { resourceGroupName, scopeName, name, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -285,12 +283,10 @@ export class PrivateLinkScopedResourcesImpl { resourceGroupName, scopeName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts b/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts index c2d421f0ef0e..4639130f45fe 100644 --- a/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts +++ b/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts @@ -222,12 +222,10 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { { resourceGroupName, scopeName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts index 84b78e336b6a..80885caf5f33 100644 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts +++ b/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts @@ -23,8 +23,16 @@ import { NotificationRequestBody, ActionGroupsPostTestNotificationsOptionalParams, ActionGroupsPostTestNotificationsResponse, + ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams, + ActionGroupsCreateNotificationsAtResourceGroupLevelResponse, + ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams, + ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse, ActionGroupsGetTestNotificationsOptionalParams, ActionGroupsGetTestNotificationsResponse, + ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams, + ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse, + ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams, + ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse, EnableRequest, ActionGroupsEnableReceiverOptionalParams } from "../models"; @@ -119,6 +127,68 @@ export interface ActionGroups { 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< + PollerLike< + PollOperationState< + 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< + PollerLike< + PollOperationState< + 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 @@ -128,6 +198,32 @@ export interface ActionGroups { 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. diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts index d35ac04a99e4..775a56fb1c9f 100644 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts +++ b/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts @@ -16,7 +16,7 @@ import { ActivityLogAlertsGetOptionalParams, ActivityLogAlertsGetResponse, ActivityLogAlertsDeleteOptionalParams, - ActivityLogAlertPatchBody, + AlertRulePatchObject, ActivityLogAlertsUpdateOptionalParams, ActivityLogAlertsUpdateResponse } from "../models"; @@ -25,14 +25,14 @@ import { /** Interface representing a ActivityLogAlerts. */ export interface ActivityLogAlerts { /** - * Get a list of all activity log alerts in a subscription. + * 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 alerts in a resource group. + * 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. */ @@ -41,22 +41,22 @@ export interface ActivityLogAlerts { options?: ActivityLogAlertsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Create a new activity log alert or update an existing one. + * 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. - * @param activityLogAlert The activity log alert to create or use for the update. + * @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, - activityLogAlert: ActivityLogAlertResource, + activityLogAlertRule: ActivityLogAlertResource, options?: ActivityLogAlertsCreateOrUpdateOptionalParams ): Promise; /** - * Get an activity log alert. + * 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. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param options The options parameters. */ get( @@ -65,9 +65,9 @@ export interface ActivityLogAlerts { options?: ActivityLogAlertsGetOptionalParams ): Promise; /** - * Delete an activity log alert. + * 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. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param options The options parameters. */ delete( @@ -76,17 +76,18 @@ export interface ActivityLogAlerts { options?: ActivityLogAlertsDeleteOptionalParams ): Promise; /** - * Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate - * method. + * 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. - * @param activityLogAlertPatch Parameters supplied to the operation. + * @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, - activityLogAlertPatch: ActivityLogAlertPatchBody, + activityLogAlertRulePatch: AlertRulePatchObject, options?: ActivityLogAlertsUpdateOptionalParams ): Promise; } diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts index fc91c6f1a043..e73028cefc79 100644 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts +++ b/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts @@ -11,6 +11,7 @@ import { DataCollectionRuleAssociationProxyOnlyResource, DataCollectionRuleAssociationsListByResourceOptionalParams, DataCollectionRuleAssociationsListByRuleOptionalParams, + DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams, DataCollectionRuleAssociationsGetOptionalParams, DataCollectionRuleAssociationsGetResponse, DataCollectionRuleAssociationsCreateOptionalParams, @@ -41,6 +42,18 @@ export interface DataCollectionRuleAssociations { 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. 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 b3119e10159b..000000000000 --- a/sdk/monitor/arm-monitor/test/monitor_examples.ts +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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, - record, - RecorderEnvironmentSetup, - Recorder, - delay, - isPlaybackMode -} from "@azure-tools/test-recorder"; -import * as assert from "assert"; -import { ClientSecretCredential } from "@azure/identity"; -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 recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - 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" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] -}; - -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; - - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); - subscriptionId = env.SUBSCRIPTION_ID; - // This is an example of how the environment variables are used - const credential = new ClientSecretCredential( - env.AZURE_TENANT_ID, - env.AZURE_CLIENT_ID, - env.AZURE_CLIENT_SECRET - ); - client = new MonitorClient(credential, subscriptionId); - logic_client = new LogicManagementClient(credential,subscriptionId); - storage_client = new StorageManagementClient(credential,subscriptionId); - eventhub_client = new EventHubManagementClient(credential,subscriptionId); - op_client = new OperationalInsightsManagementClient(credential,subscriptionId); - location = "eastus"; - resourceGroup = "myjstest"; - workflowName = "myworkflowxxx"; - storageAccountName = "mystorageaccountyyy"; - namespaceName = "mynamespacexxx"; - eventhubName = "myeventhubxxx"; - workspaceName = "myworkspacexxx"; - authorizationRuleName = "myauthorizationRulexxx"; - logProfileName = "mylogProfilexxx"; - diagnosticName = "mydiagnosticxxxx"; - }); - - 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 || ""; - - //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() { - if(isPlaybackMode()) { - this.skip(); - } - 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() { - if(isPlaybackMode()) { - this.skip(); - } - //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("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..7ed89b043e1b --- /dev/null +++ b/sdk/monitor/arm-monitor/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + 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" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + 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"