From 0b370b1389a197e09a8e6f4e4f5ef97f3d20097e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 12 Apr 2022 07:57:19 +0000 Subject: [PATCH] CodeGen from PR 18279 in Azure/azure-rest-api-specs Skumar/rch metadata api (#18279) * Defining the APIs for the new NSP resource * adding metadata API details * updating ResourceHealth.json * fixed resourcehealth.json * fixing linter issues rch metadata * prettier fixes * additional linting fixes * additional linting fixes * suggesting lintf fixes * model fixes * model fixes 2 * model fixes 2 Co-authored-by: Hari Prasad Perabattula Co-authored-by: Hari Prasad Perabattula --- common/config/rush/pnpm-lock.yaml | 72 ++--- .../arm-resourcehealth/CHANGELOG.md | 45 ++- sdk/resourcehealth/arm-resourcehealth/LICENSE | 2 +- .../arm-resourcehealth/_meta.json | 7 +- .../arm-resourcehealth/api-extractor.json | 25 +- .../arm-resourcehealth/package.json | 8 +- .../review/arm-resourcehealth.api.md | 177 +++--------- .../src/microsoftResourceHealth.ts | 26 +- .../arm-resourcehealth/src/models/index.ts | 257 ++++++------------ .../arm-resourcehealth/src/models/mappers.ts | 235 ++++------------ .../src/models/parameters.ts | 14 +- .../src/operations/availabilityStatuses.ts | 18 +- .../operations/childAvailabilityStatuses.ts | 210 -------------- .../src/operations/childResources.ts | 168 ------------ .../src/operations/emergingIssues.ts | 165 ----------- .../src/operations/index.ts | 3 - .../availabilityStatuses.ts | 9 +- .../childAvailabilityStatuses.ts | 43 --- .../operationsInterfaces/childResources.ts | 30 -- .../operationsInterfaces/emergingIssues.ts | 34 --- .../src/operationsInterfaces/index.ts | 3 - .../arm-resourcehealth/tsconfig.json | 16 +- sdk/resourcehealth/ci.mgmt.yml | 7 +- 23 files changed, 306 insertions(+), 1268 deletions(-) delete mode 100644 sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts delete mode 100644 sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts delete mode 100644 sdk/resourcehealth/arm-resourcehealth/src/operations/emergingIssues.ts delete mode 100644 sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.ts delete mode 100644 sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.ts delete mode 100644 sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/emergingIssues.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a0f6e183bafb..9f204b64e5f2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -963,7 +963,7 @@ packages: resolution: {integrity: sha512-Q71Buur3RMcg6lCnisLL8Im562DBw+ybzgm+YQj/FbAaI8ZNu/zl/5z1fE4k3Q9LSIzYrz6HLRzlhdSBXpydlQ==} engines: {node: '>=8.0.0'} dependencies: - '@azure/core-http': 1.2.3 + '@azure/core-http': 1.2.6 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.3 '@azure/msal-node': 1.0.0-beta.6_debug@4.3.4 @@ -2238,7 +2238,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/chai-as-promised/7.1.5: @@ -2264,14 +2264,14 @@ packages: /@types/concurrently/6.4.0: resolution: {integrity: sha512-CYU1eyFHsIa2IZIsb8gfUOdiewfnZcyM2Hg1Zaq95xnmB0Ix/bTRM8SttqZ2Cjy6JGPZLttHjZewVsDg1yvnJg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 chalk: 4.1.2 dev: false /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/cookie/0.4.1: @@ -2306,7 +2306,7 @@ packages: /@types/express-serve-static-core/4.17.28: resolution: {integrity: sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2323,26 +2323,26 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/json-schema/7.0.11: @@ -2356,13 +2356,13 @@ packages: /@types/jsonwebtoken/8.5.8: resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/long/4.0.1: @@ -2406,13 +2406,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/ms/0.7.31: @@ -2426,7 +2426,7 @@ packages: /@types/node-fetch/2.6.1: resolution: {integrity: sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 form-data: 3.0.1 dev: false @@ -2476,7 +2476,7 @@ packages: resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==} dependencies: '@types/mime': 1.3.2 - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/sinon/10.0.11: @@ -2498,7 +2498,7 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/tough-cookie/4.0.1: @@ -2508,13 +2508,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/underscore/1.11.4: @@ -2532,26 +2532,26 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/xml2js/0.4.9: resolution: {integrity: sha512-CHiCKIihl1pychwR2RNX5mAYmJDACgFVCMT5OArMaO3erzwXVcBqPcusr+Vl8yeeXukxZqtF8mZioqX+mpjjdw==} dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false /@types/yauzl/2.10.0: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 12.20.47 + '@types/node': 17.0.23 dev: false optional: true @@ -3532,7 +3532,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3735,7 +3735,7 @@ packages: dependencies: semver: 7.3.6 shelljs: 0.8.5 - typescript: 4.2.4 + typescript: 4.5.5 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3788,7 +3788,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 12.20.47 + '@types/node': 17.0.23 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4629,7 +4629,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -8474,7 +8474,7 @@ packages: /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: - string-width: 1.0.2 + string-width: 4.2.3 dev: false /word-wrap/1.2.3: @@ -9064,7 +9064,7 @@ packages: dev: false file:projects/app-configuration.tgz: - resolution: {integrity: sha512-MwpJxCKwaeur8hR7eA4HtYTRnBqkapZUO3uXS4MLvYsyEqMlBUxMu5R8KV9PK68a40PGzRbKyxJzjA61PeOU+A==, tarball: file:projects/app-configuration.tgz} + resolution: {integrity: sha512-LrsxNjdv278IYD2fPDAbx7WrZgzJ2ogHO7ipoeJRxEVoFB8MFDlISY/wbsi5MJBSoiW3068NC/rnM+3AqeG+9Q==, tarball: file:projects/app-configuration.tgz} name: '@rush-temp/app-configuration' version: 0.0.0 dependencies: @@ -12563,23 +12563,23 @@ packages: dev: false file:projects/arm-resourcehealth.tgz: - resolution: {integrity: sha512-eBIR5w+2fwtHJUcI2OUcCM9TyTiji2xGb7aVQDLtEoQo7z3KSjkasLTZsGFMVv1kTODBoVuneMZL64L/PHjCpg==, tarball: file:projects/arm-resourcehealth.tgz} + resolution: {integrity: sha512-xE2MvlCxTI7IehaGR0EWfHaFZYuW02AUpFxbk2fhcFPJdL+RHLBwyUKSq+0FjaE5N6LfpXWHhVBTfA/efAWAtg==, tarball: file:projects/arm-resourcehealth.tgz} name: '@rush-temp/arm-resourcehealth' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.21.2 - '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.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.70.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.4 @@ -14431,7 +14431,7 @@ packages: dev: false file:projects/core-rest-pipeline.tgz: - resolution: {integrity: sha512-huJBLY2W+bEheXWtuUHMoAr+0WW/dRCMhyHZPFeL5FnLL7iSqBscZZHVCMkdyFOnBr1qlavfGgx79kHgaBjAMg==, tarball: file:projects/core-rest-pipeline.tgz} + resolution: {integrity: sha512-Dk2F5VckIcgD9MZORhmnOel3syAjbpZke2aBWiCeeHJxXyCJ+xPlkwF4sWjaNOHzBAA0zHTT2cnKX10cv2sH+g==, tarball: file:projects/core-rest-pipeline.tgz} name: '@rush-temp/core-rest-pipeline' version: 0.0.0 dependencies: diff --git a/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md index 72ce661de1af..78c9a6b53c09 100644 --- a/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md +++ b/sdk/resourcehealth/arm-resourcehealth/CHANGELOG.md @@ -1,15 +1,38 @@ # Release History - -## 3.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 4.0.0 (2022-04-12) + +**Features** + + - Added Interface AvailabilityStatusPropertiesRecentlyResolved + - Added Interface ErrorResponseError + - Added Type Alias ImpactedResourceStatus + - Added Type Alias ReasonTypeValues + - Interface AvailabilityStatusProperties has a new optional parameter occurredTime + - Interface AvailabilityStatusProperties has a new optional parameter recentlyResolved + - Interface AvailabilityStatusProperties has a new optional parameter title + - Interface ErrorResponse has a new optional parameter error + - Added Enum KnownAvailabilityStateValues + - Added Enum KnownReasonChronicityTypes + - Added Enum KnownReasonTypeValues + +**Breaking Changes** + + - Removed operation group ChildAvailabilityStatuses + - Removed operation group ChildResources + - Removed operation group EmergingIssues + - Interface AvailabilityStatusProperties no longer has parameter occuredTime + - Interface AvailabilityStatusProperties no longer has parameter recentlyResolvedState + - Interface ErrorResponse no longer has parameter code + - Interface ErrorResponse no longer has parameter details + - Interface ErrorResponse no longer has parameter message + - Class MicrosoftResourceHealth no longer has parameter childAvailabilityStatuses + - Class MicrosoftResourceHealth no longer has parameter childResources + - Class MicrosoftResourceHealth no longer has parameter emergingIssues + - Removed Enum KnownSeverityValues + - Removed Enum KnownStageValues + + ## 3.0.0 (2021-12-22) The package of @azure/arm-resourcehealth is using our next generation design principles since version 3.0.0, which contains breaking changes. diff --git a/sdk/resourcehealth/arm-resourcehealth/LICENSE b/sdk/resourcehealth/arm-resourcehealth/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/resourcehealth/arm-resourcehealth/LICENSE +++ b/sdk/resourcehealth/arm-resourcehealth/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/resourcehealth/arm-resourcehealth/_meta.json b/sdk/resourcehealth/arm-resourcehealth/_meta.json index 0cdde8da8bfa..d83a89e2efd7 100644 --- a/sdk/resourcehealth/arm-resourcehealth/_meta.json +++ b/sdk/resourcehealth/arm-resourcehealth/_meta.json @@ -1,7 +1,8 @@ { - "commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf", + "commit": "110f6016cf0e06195767ec528a122d21ab5d4f2a", "readme": "specification/resourcehealth/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/resourcehealth/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", + "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/resourcehealth/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", - "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/api-extractor.json b/sdk/resourcehealth/arm-resourcehealth/api-extractor.json index 3274873e39b2..b60ec4d5ce87 100644 --- a/sdk/resourcehealth/arm-resourcehealth/api-extractor.json +++ b/sdk/resourcehealth/arm-resourcehealth/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-resourcehealth.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/package.json b/sdk/resourcehealth/arm-resourcehealth/package.json index 08b405495d09..518982363f0d 100644 --- a/sdk/resourcehealth/arm-resourcehealth/package.json +++ b/sdk/resourcehealth/arm-resourcehealth/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MicrosoftResourceHealth.", - "version": "3.0.1", + "version": "4.0.0", "engines": { "node": ">=12.0.0" }, @@ -27,12 +27,12 @@ "types": "./types/arm-resourcehealth.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@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.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -97,4 +97,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md b/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md index 9a5fcdf23ee2..f67724f54489 100644 --- a/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md +++ b/sdk/resourcehealth/arm-resourcehealth/review/arm-resourcehealth.api.md @@ -9,7 +9,7 @@ import * as coreClient from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; // @public -export type AvailabilityStateValues = "Available" | "Unavailable" | "Unknown"; +export type AvailabilityStateValues = string; // @public export interface AvailabilityStatus { @@ -105,159 +105,81 @@ export interface AvailabilityStatusProperties { healthEventCause?: string; healthEventId?: string; healthEventType?: string; - occuredTime?: Date; + occurredTime?: Date; reasonChronicity?: ReasonChronicityTypes; reasonType?: string; - recentlyResolvedState?: AvailabilityStatusPropertiesRecentlyResolvedState; + recentlyResolved?: AvailabilityStatusPropertiesRecentlyResolved; recommendedActions?: RecommendedAction[]; reportedTime?: Date; resolutionETA?: Date; rootCauseAttributionTime?: Date; serviceImpactingEvents?: ServiceImpactingEvent[]; summary?: string; + title?: string; } // @public -export interface AvailabilityStatusPropertiesRecentlyResolvedState { +export interface AvailabilityStatusPropertiesRecentlyResolved { resolvedTime?: Date; unavailabilitySummary?: string; unavailableOccurredTime?: Date; } // @public -export interface ChildAvailabilityStatuses { - getByResource(resourceUri: string, options?: ChildAvailabilityStatusesGetByResourceOptionalParams): Promise; - list(resourceUri: string, options?: ChildAvailabilityStatusesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ChildAvailabilityStatusesGetByResourceOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; -} - -// @public -export type ChildAvailabilityStatusesGetByResourceResponse = AvailabilityStatus; - -// @public -export interface ChildAvailabilityStatusesListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; -} - -// @public -export type ChildAvailabilityStatusesListNextResponse = AvailabilityStatusListResult; - -// @public -export interface ChildAvailabilityStatusesListOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; -} - -// @public -export type ChildAvailabilityStatusesListResponse = AvailabilityStatusListResult; - -// @public -export interface ChildResources { - list(resourceUri: string, options?: ChildResourcesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ChildResourcesListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export interface ErrorResponse { + error?: ErrorResponseError; } // @public -export type ChildResourcesListNextResponse = AvailabilityStatusListResult; - -// @public -export interface ChildResourcesListOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; +export interface ErrorResponseError { + readonly code?: string; + readonly details?: string; + readonly message?: string; } // @public -export type ChildResourcesListResponse = AvailabilityStatusListResult; - -// @public -export interface EmergingIssueImpact { +export interface ImpactedRegion { id?: string; name?: string; - regions?: ImpactedRegion[]; -} - -// @public -export interface EmergingIssueListResult { - nextLink?: string; - value?: EmergingIssuesGetResult[]; -} - -// @public -export interface EmergingIssues { - get(options?: EmergingIssuesGetOptionalParams): Promise; - list(options?: EmergingIssuesListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface EmergingIssuesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EmergingIssuesGetResponse = EmergingIssuesGetResult; - -// @public -export type EmergingIssuesGetResult = Resource & { - refreshTimestamp?: Date; - statusBanners?: StatusBanner[]; - statusActiveEvents?: StatusActiveEvent[]; +export type ImpactedResourceStatus = Resource & { + availabilityState?: AvailabilityStateValues; + title?: string; + summary?: string; + reasonType?: ReasonTypeValues; + occurredTime?: Date; }; // @public -export interface EmergingIssuesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EmergingIssuesListNextResponse = EmergingIssueListResult; - -// @public -export interface EmergingIssuesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EmergingIssuesListResponse = EmergingIssueListResult; - -// @public -export interface ErrorResponse { - readonly code?: string; - readonly details?: string; - readonly message?: string; -} - -// @public -export interface ImpactedRegion { - id?: string; - name?: string; +export enum KnownAvailabilityStateValues { + // (undocumented) + Available = "Available", + // (undocumented) + Degraded = "Degraded", + // (undocumented) + Unavailable = "Unavailable", + // (undocumented) + Unknown = "Unknown" } // @public -export enum KnownSeverityValues { - // (undocumented) - Error = "Error", +export enum KnownReasonChronicityTypes { // (undocumented) - Information = "Information", + Persistent = "Persistent", // (undocumented) - Warning = "Warning" + Transient = "Transient" } // @public -export enum KnownStageValues { +export enum KnownReasonTypeValues { // (undocumented) - Active = "Active", + Planned = "Planned", // (undocumented) - Archived = "Archived", + Unplanned = "Unplanned", // (undocumented) - Resolve = "Resolve" + UserInitiated = "UserInitiated" } // @public (undocumented) @@ -270,12 +192,6 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // (undocumented) availabilityStatuses: AvailabilityStatuses; // (undocumented) - childAvailabilityStatuses: ChildAvailabilityStatuses; - // (undocumented) - childResources: ChildResources; - // (undocumented) - emergingIssues: EmergingIssues; - // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -320,7 +236,10 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = OperationListResult; // @public -export type ReasonChronicityTypes = "Transient" | "Persistent"; +export type ReasonChronicityTypes = string; + +// @public +export type ReasonTypeValues = string; // @public export interface RecommendedAction { @@ -358,26 +277,6 @@ export interface ServiceImpactingEventStatus { value?: string; } -// @public -export type SeverityValues = string; - -// @public -export type StageValues = string; - -// @public -export interface StatusActiveEvent { - cloud?: string; - description?: string; - impacts?: EmergingIssueImpact[]; - lastModifiedTime?: Date; - published?: boolean; - severity?: SeverityValues; - stage?: StageValues; - startTime?: Date; - title?: string; - trackingId?: string; -} - // @public export interface StatusBanner { cloud?: string; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts index 17345ce503c3..2ff1218968d9 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/microsoftResourceHealth.ts @@ -8,20 +8,8 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; -import { - AvailabilityStatusesImpl, - ChildAvailabilityStatusesImpl, - ChildResourcesImpl, - OperationsImpl, - EmergingIssuesImpl -} from "./operations"; -import { - AvailabilityStatuses, - ChildAvailabilityStatuses, - ChildResources, - Operations, - EmergingIssues -} from "./operationsInterfaces"; +import { AvailabilityStatusesImpl, OperationsImpl } from "./operations"; +import { AvailabilityStatuses, Operations } from "./operationsInterfaces"; import { MicrosoftResourceHealthOptionalParams } from "./models"; export class MicrosoftResourceHealth extends coreClient.ServiceClient { @@ -57,7 +45,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-resourcehealth/1.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-resourcehealth/4.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -80,17 +68,11 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2017-07-01"; + this.apiVersion = options.apiVersion || "2020-05-01"; this.availabilityStatuses = new AvailabilityStatusesImpl(this); - this.childAvailabilityStatuses = new ChildAvailabilityStatusesImpl(this); - this.childResources = new ChildResourcesImpl(this); this.operations = new OperationsImpl(this); - this.emergingIssues = new EmergingIssuesImpl(this); } availabilityStatuses: AvailabilityStatuses; - childAvailabilityStatuses: ChildAvailabilityStatuses; - childResources: ChildResources; operations: Operations; - emergingIssues: EmergingIssues; } diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts index c6a12e78a4f6..b88196a3a954 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/index.ts @@ -34,6 +34,8 @@ export interface AvailabilityStatus { export interface AvailabilityStatusProperties { /** Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting event */ availabilityState?: AvailabilityStateValues; + /** Title description of the availability status. */ + title?: string; /** Summary description of the availability status. */ summary?: string; /** Details of the availability status. */ @@ -53,13 +55,13 @@ export interface AvailabilityStatusProperties { /** When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved. */ resolutionETA?: Date; /** Timestamp for when last change in health status occurred. */ - occuredTime?: Date; + occurredTime?: Date; /** Chronicity of the availability transition. */ reasonChronicity?: ReasonChronicityTypes; /** Timestamp for when the health was last checked. */ reportedTime?: Date; /** An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned */ - recentlyResolvedState?: AvailabilityStatusPropertiesRecentlyResolvedState; + recentlyResolved?: AvailabilityStatusPropertiesRecentlyResolved; /** Lists actions the user can take based on the current availabilityState of the resource. */ recommendedActions?: RecommendedAction[]; /** Lists the service impacting events that may be affecting the health of the resource. */ @@ -67,7 +69,7 @@ export interface AvailabilityStatusProperties { } /** An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned */ -export interface AvailabilityStatusPropertiesRecentlyResolvedState { +export interface AvailabilityStatusPropertiesRecentlyResolved { /** Timestamp for when the availabilityState changed to Unavailable */ unavailableOccurredTime?: Date; /** Timestamp when the availabilityState changes to Available. */ @@ -120,6 +122,12 @@ export interface ServiceImpactingEventIncidentProperties { /** Error details. */ export interface ErrorResponse { + /** The error object. */ + error?: ErrorResponseError; +} + +/** The error object. */ +export interface ErrorResponseError { /** * The error code. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -163,6 +171,25 @@ export interface OperationDisplay { description?: string; } +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + /** Banner type of emerging issue. */ export interface StatusBanner { /** The banner title. */ @@ -175,40 +202,6 @@ export interface StatusBanner { lastModifiedTime?: Date; } -/** Active event type of emerging issue. */ -export interface StatusActiveEvent { - /** The active event title. */ - title?: string; - /** The details of active event. */ - description?: string; - /** The tracking id of this active event. */ - trackingId?: string; - /** The impact start time on this active event. */ - startTime?: Date; - /** The cloud type of this active event. */ - cloud?: string; - /** The severity level of this active event. */ - severity?: SeverityValues; - /** The stage of this active event. */ - stage?: StageValues; - /** The boolean value of this active event if published or not. */ - published?: boolean; - /** The last time modified on this banner. */ - lastModifiedTime?: Date; - /** The list of emerging issues impacts. */ - impacts?: EmergingIssueImpact[]; -} - -/** Object of the emerging issue impact on services and regions. */ -export interface EmergingIssueImpact { - /** The impacted service id. */ - id?: string; - /** The impacted service name. */ - name?: string; - /** The list of impacted regions for corresponding emerging issues. */ - regions?: ImpactedRegion[]; -} - /** Object of impacted region. */ export interface ImpactedRegion { /** The impacted region id. */ @@ -217,82 +210,73 @@ export interface ImpactedRegion { name?: string; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} +/** impactedResource with health status */ +export type ImpactedResourceStatus = Resource & { + /** Impacted resource status of the resource. */ + availabilityState?: AvailabilityStateValues; + /** Title description of the impacted resource status. */ + title?: string; + /** Summary description of the impacted resource status. */ + summary?: string; + /** When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. */ + reasonType?: ReasonTypeValues; + /** Timestamp for when last change in health status occurred. */ + occurredTime?: Date; +}; -/** The list of emerging issues. */ -export interface EmergingIssueListResult { - /** The list of emerging issues. */ - value?: EmergingIssuesGetResult[]; - /** The link used to get the next page of emerging issues. */ - nextLink?: string; +/** Known values of {@link AvailabilityStateValues} that the service accepts. */ +export enum KnownAvailabilityStateValues { + Available = "Available", + Unavailable = "Unavailable", + Degraded = "Degraded", + Unknown = "Unknown" } -/** The Get EmergingIssues operation response. */ -export type EmergingIssuesGetResult = Resource & { - /** Timestamp for when last time refreshed for ongoing emerging issue. */ - refreshTimestamp?: Date; - /** The list of emerging issues of banner type. */ - statusBanners?: StatusBanner[]; - /** The list of emerging issues of active event type. */ - statusActiveEvents?: StatusActiveEvent[]; -}; +/** + * Defines values for AvailabilityStateValues. \ + * {@link KnownAvailabilityStateValues} can be used interchangeably with AvailabilityStateValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available** \ + * **Unavailable** \ + * **Degraded** \ + * **Unknown** + */ +export type AvailabilityStateValues = string; -/** Known values of {@link SeverityValues} that the service accepts. */ -export enum KnownSeverityValues { - Information = "Information", - Warning = "Warning", - Error = "Error" +/** Known values of {@link ReasonChronicityTypes} that the service accepts. */ +export enum KnownReasonChronicityTypes { + Transient = "Transient", + Persistent = "Persistent" } /** - * Defines values for SeverityValues. \ - * {@link KnownSeverityValues} can be used interchangeably with SeverityValues, + * Defines values for ReasonChronicityTypes. \ + * {@link KnownReasonChronicityTypes} can be used interchangeably with ReasonChronicityTypes, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Information** \ - * **Warning** \ - * **Error** + * **Transient** \ + * **Persistent** */ -export type SeverityValues = string; +export type ReasonChronicityTypes = string; -/** Known values of {@link StageValues} that the service accepts. */ -export enum KnownStageValues { - Active = "Active", - Resolve = "Resolve", - Archived = "Archived" +/** Known values of {@link ReasonTypeValues} that the service accepts. */ +export enum KnownReasonTypeValues { + Unplanned = "Unplanned", + Planned = "Planned", + UserInitiated = "UserInitiated" } /** - * Defines values for StageValues. \ - * {@link KnownStageValues} can be used interchangeably with StageValues, + * Defines values for ReasonTypeValues. \ + * {@link KnownReasonTypeValues} can be used interchangeably with ReasonTypeValues, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Active** \ - * **Resolve** \ - * **Archived** + * **Unplanned** \ + * **Planned** \ + * **UserInitiated** */ -export type StageValues = string; -/** Defines values for AvailabilityStateValues. */ -export type AvailabilityStateValues = "Available" | "Unavailable" | "Unknown"; -/** Defines values for ReasonChronicityTypes. */ -export type ReasonChronicityTypes = "Transient" | "Persistent"; +export type ReasonTypeValues = string; /** Optional parameters. */ export interface AvailabilityStatusesListBySubscriptionIdOptionalParams @@ -378,66 +362,6 @@ export interface AvailabilityStatusesListNextOptionalParams /** Contains response data for the listNext operation. */ export type AvailabilityStatusesListNextResponse = AvailabilityStatusListResult; -/** Optional parameters. */ -export interface ChildAvailabilityStatusesGetByResourceOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ - filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; -} - -/** Contains response data for the getByResource operation. */ -export type ChildAvailabilityStatusesGetByResourceResponse = AvailabilityStatus; - -/** Optional parameters. */ -export interface ChildAvailabilityStatusesListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ - filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; -} - -/** Contains response data for the list operation. */ -export type ChildAvailabilityStatusesListResponse = AvailabilityStatusListResult; - -/** Optional parameters. */ -export interface ChildAvailabilityStatusesListNextOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ - filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; -} - -/** Contains response data for the listNext operation. */ -export type ChildAvailabilityStatusesListNextResponse = AvailabilityStatusListResult; - -/** Optional parameters. */ -export interface ChildResourcesListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ - filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; -} - -/** Contains response data for the list operation. */ -export type ChildResourcesListResponse = AvailabilityStatusListResult; - -/** Optional parameters. */ -export interface ChildResourcesListNextOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN */ - filter?: string; - /** Setting $expand=recommendedactions in url query expands the recommendedactions in the response. */ - expand?: string; -} - -/** Contains response data for the listNext operation. */ -export type ChildResourcesListNextResponse = AvailabilityStatusListResult; - /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -445,27 +369,6 @@ export interface OperationsListOptionalParams /** Contains response data for the list operation. */ export type OperationsListResponse = OperationListResult; -/** Optional parameters. */ -export interface EmergingIssuesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type EmergingIssuesGetResponse = EmergingIssuesGetResult; - -/** Optional parameters. */ -export interface EmergingIssuesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type EmergingIssuesListResponse = EmergingIssueListResult; - -/** Optional parameters. */ -export interface EmergingIssuesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type EmergingIssuesListNextResponse = EmergingIssueListResult; - /** Optional parameters. */ export interface MicrosoftResourceHealthOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts index 6ae4eaf92675..1aa1e9363ba2 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/mappers.ts @@ -84,8 +84,13 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { availabilityState: { serializedName: "availabilityState", type: { - name: "Enum", - allowedValues: ["Available", "Unavailable", "Unknown"] + name: "String" + } + }, + title: { + serializedName: "title", + type: { + name: "String" } }, summary: { @@ -142,8 +147,8 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { name: "DateTime" } }, - occuredTime: { - serializedName: "occuredTime", + occurredTime: { + serializedName: "occurredTime", type: { name: "DateTime" } @@ -151,8 +156,7 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { reasonChronicity: { serializedName: "reasonChronicity", type: { - name: "Enum", - allowedValues: ["Transient", "Persistent"] + name: "String" } }, reportedTime: { @@ -161,11 +165,11 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { name: "DateTime" } }, - recentlyResolvedState: { - serializedName: "recentlyResolvedState", + recentlyResolved: { + serializedName: "recentlyResolved", type: { name: "Composite", - className: "AvailabilityStatusPropertiesRecentlyResolvedState" + className: "AvailabilityStatusPropertiesRecentlyResolved" } }, recommendedActions: { @@ -196,10 +200,10 @@ export const AvailabilityStatusProperties: coreClient.CompositeMapper = { } }; -export const AvailabilityStatusPropertiesRecentlyResolvedState: coreClient.CompositeMapper = { +export const AvailabilityStatusPropertiesRecentlyResolved: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilityStatusPropertiesRecentlyResolvedState", + className: "AvailabilityStatusPropertiesRecentlyResolved", modelProperties: { unavailableOccurredTime: { serializedName: "unavailableOccurredTime", @@ -343,6 +347,22 @@ export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseError" + } + } + } + } +}; + +export const ErrorResponseError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseError", modelProperties: { code: { serializedName: "code", @@ -446,43 +466,40 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const StatusBanner: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StatusBanner", + className: "Resource", modelProperties: { - title: { - serializedName: "title", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - cloud: { - serializedName: "cloud", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - }, - lastModifiedTime: { - serializedName: "lastModifiedTime", - type: { - name: "DateTime" - } } } } }; -export const StatusActiveEvent: coreClient.CompositeMapper = { +export const StatusBanner: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StatusActiveEvent", + className: "StatusBanner", modelProperties: { title: { serializedName: "title", @@ -490,98 +507,23 @@ export const StatusActiveEvent: coreClient.CompositeMapper = { name: "String" } }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - trackingId: { - serializedName: "trackingId", + message: { + serializedName: "message", type: { name: "String" } }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime" - } - }, cloud: { serializedName: "cloud", type: { name: "String" } }, - severity: { - serializedName: "severity", - type: { - name: "String" - } - }, - stage: { - serializedName: "stage", - type: { - name: "String" - } - }, - published: { - serializedName: "published", - type: { - name: "Boolean" - } - }, lastModifiedTime: { serializedName: "lastModifiedTime", type: { name: "DateTime" } - }, - impacts: { - serializedName: "impacts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmergingIssueImpact" - } - } - } - } - } - } -}; - -export const EmergingIssueImpact: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmergingIssueImpact", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - regions: { - serializedName: "regions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImpactedRegion" - } - } - } } } } @@ -608,97 +550,40 @@ export const ImpactedRegion: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const ImpactedResourceStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ImpactedResourceStatus", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + ...Resource.type.modelProperties, + availabilityState: { + serializedName: "properties.availabilityState", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + title: { + serializedName: "properties.title", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + summary: { + serializedName: "properties.summary", type: { name: "String" } - } - } - } -}; - -export const EmergingIssueListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmergingIssueListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmergingIssuesGetResult" - } - } - } }, - nextLink: { - serializedName: "nextLink", + reasonType: { + serializedName: "properties.reasonType", type: { name: "String" } - } - } - } -}; - -export const EmergingIssuesGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmergingIssuesGetResult", - modelProperties: { - ...Resource.type.modelProperties, - refreshTimestamp: { - serializedName: "properties.refreshTimestamp", - type: { - name: "DateTime" - } }, - statusBanners: { - serializedName: "properties.statusBanners", + occurredTime: { + serializedName: "properties.occurredTime", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StatusBanner" - } - } - } - }, - statusActiveEvents: { - serializedName: "properties.statusActiveEvents", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StatusActiveEvent" - } - } + name: "DateTime" } } } diff --git a/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts b/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts index 6dc6222dc643..0e60697be593 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/models/parameters.ts @@ -39,7 +39,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2017-07-01", + defaultValue: "2020-05-01", isConstant: true, serializedName: "api-version", type: { @@ -113,15 +113,3 @@ export const nextLink: OperationURLParameter = { }, skipEncoding: true }; - -export const issueName: OperationURLParameter = { - parameterPath: "issueName", - mapper: { - defaultValue: "default", - isConstant: true, - serializedName: "issueName", - type: { - name: "String" - } - } -}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts index 2869f85aca59..be924ccb3e4d 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operations/availabilityStatuses.ts @@ -44,8 +44,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the subscription. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the subscription. * @param options The options parameters. */ public listBySubscriptionId( @@ -87,8 +86,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the resource group. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the resource group. * @param resourceGroupName The name of the resource group. * @param options The options parameters. */ @@ -141,8 +139,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists all historical availability transitions and impacting events for a single resource. Use the - * nextLink property in the response to get the next page of availability status + * Lists all historical availability transitions and impacting events for a single resource. * @param resourceUri The fully qualified ID of the resource, including the resource name and resource * type. Currently the API support not nested and one nesting level resource types : * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} @@ -192,8 +189,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the subscription. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the subscription. * @param options The options parameters. */ private _listBySubscriptionId( @@ -206,8 +202,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists the current availability status for all the resources in the resource group. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the resource group. * @param resourceGroupName The name of the resource group. * @param options The options parameters. */ @@ -241,8 +236,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses { } /** - * Lists all historical availability transitions and impacting events for a single resource. Use the - * nextLink property in the response to get the next page of availability status + * Lists all historical availability transitions and impacting events for a single resource. * @param resourceUri The fully qualified ID of the resource, including the resource name and resource * type. Currently the API support not nested and one nesting level resource types : * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts deleted file mode 100644 index 069e458ac30f..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/childAvailabilityStatuses.ts +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ChildAvailabilityStatuses } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MicrosoftResourceHealth } from "../microsoftResourceHealth"; -import { - AvailabilityStatus, - ChildAvailabilityStatusesListNextOptionalParams, - ChildAvailabilityStatusesListOptionalParams, - ChildAvailabilityStatusesGetByResourceOptionalParams, - ChildAvailabilityStatusesGetByResourceResponse, - ChildAvailabilityStatusesListResponse, - ChildAvailabilityStatusesListNextResponse -} from "../models"; - -/// -/** Class containing ChildAvailabilityStatuses operations. */ -export class ChildAvailabilityStatusesImpl - implements ChildAvailabilityStatuses { - private readonly client: MicrosoftResourceHealth; - - /** - * Initialize a new instance of the class ChildAvailabilityStatuses class. - * @param client Reference to the service client - */ - constructor(client: MicrosoftResourceHealth) { - this.client = client; - } - - /** - * Lists the historical availability statuses for a single child resource. Use the nextLink property in - * the response to get the next page of availability status - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(resourceUri, options); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceUri, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(resourceUri, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Gets current availability status for a single resource - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - getByResource( - resourceUri: string, - options?: ChildAvailabilityStatusesGetByResourceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - getByResourceOperationSpec - ); - } - - /** - * Lists the historical availability statuses for a single child resource. Use the nextLink property in - * the response to get the next page of availability status - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceUri: string, - nextLink: string, - options?: ChildAvailabilityStatusesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getByResourceOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses/current", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts deleted file mode 100644 index 500dec89921f..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/childResources.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ChildResources } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MicrosoftResourceHealth } from "../microsoftResourceHealth"; -import { - AvailabilityStatus, - ChildResourcesListNextOptionalParams, - ChildResourcesListOptionalParams, - ChildResourcesListResponse, - ChildResourcesListNextResponse -} from "../models"; - -/// -/** Class containing ChildResources operations. */ -export class ChildResourcesImpl implements ChildResources { - private readonly client: MicrosoftResourceHealth; - - /** - * Initialize a new instance of the class ChildResources class. - * @param client Reference to the service client - */ - constructor(client: MicrosoftResourceHealth) { - this.client = client; - } - - /** - * Lists the all the children and its current health status for a parent resource. Use the nextLink - * property in the response to get the next page of children current health - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(resourceUri, options); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceUri, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(resourceUri, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Lists the all the children and its current health status for a parent resource. Use the nextLink - * property in the response to get the next page of children current health - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceUri: string, - nextLink: string, - options?: ChildResourcesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ResourceHealth/childResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AvailabilityStatusListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.expand - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/emergingIssues.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/emergingIssues.ts deleted file mode 100644 index df507a849b31..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/emergingIssues.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { EmergingIssues } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MicrosoftResourceHealth } from "../microsoftResourceHealth"; -import { - EmergingIssuesGetResult, - EmergingIssuesListNextOptionalParams, - EmergingIssuesListOptionalParams, - EmergingIssuesGetOptionalParams, - EmergingIssuesGetResponse, - EmergingIssuesListResponse, - EmergingIssuesListNextResponse -} from "../models"; - -/// -/** Class containing EmergingIssues operations. */ -export class EmergingIssuesImpl implements EmergingIssues { - private readonly client: MicrosoftResourceHealth; - - /** - * Initialize a new instance of the class EmergingIssues class. - * @param client Reference to the service client - */ - constructor(client: MicrosoftResourceHealth) { - this.client = client; - } - - /** - * Lists Azure services' emerging issues. - * @param options The options parameters. - */ - public list( - options?: EmergingIssuesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(options); - } - }; - } - - private async *listPagingPage( - options?: EmergingIssuesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - options?: EmergingIssuesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets Azure services' emerging issues. - * @param options The options parameters. - */ - get( - options?: EmergingIssuesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, getOperationSpec); - } - - /** - * Lists Azure services' emerging issues. - * @param options The options parameters. - */ - private _list( - options?: EmergingIssuesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: EmergingIssuesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.ResourceHealth/emergingIssues/{issueName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmergingIssuesGetResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.issueName], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.ResourceHealth/emergingIssues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmergingIssueListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmergingIssueListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts index 7a0013d72250..aec7ca100dac 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operations/index.ts @@ -7,7 +7,4 @@ */ export * from "./availabilityStatuses"; -export * from "./childAvailabilityStatuses"; -export * from "./childResources"; export * from "./operations"; -export * from "./emergingIssues"; diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts index 5000227ffff5..525fd86aa5ad 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/availabilityStatuses.ts @@ -20,16 +20,14 @@ import { /** Interface representing a AvailabilityStatuses. */ export interface AvailabilityStatuses { /** - * Lists the current availability status for all the resources in the subscription. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the subscription. * @param options The options parameters. */ listBySubscriptionId( options?: AvailabilityStatusesListBySubscriptionIdOptionalParams ): PagedAsyncIterableIterator; /** - * Lists the current availability status for all the resources in the resource group. Use the nextLink - * property in the response to get the next page of availability statuses. + * Lists the current availability status for all the resources in the resource group. * @param resourceGroupName The name of the resource group. * @param options The options parameters. */ @@ -38,8 +36,7 @@ export interface AvailabilityStatuses { options?: AvailabilityStatusesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Lists all historical availability transitions and impacting events for a single resource. Use the - * nextLink property in the response to get the next page of availability status + * Lists all historical availability transitions and impacting events for a single resource. * @param resourceUri The fully qualified ID of the resource, including the resource name and resource * type. Currently the API support not nested and one nesting level resource types : * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.ts deleted file mode 100644 index d296779a9ed1..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childAvailabilityStatuses.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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AvailabilityStatus, - ChildAvailabilityStatusesListOptionalParams, - ChildAvailabilityStatusesGetByResourceOptionalParams, - ChildAvailabilityStatusesGetByResourceResponse -} from "../models"; - -/// -/** Interface representing a ChildAvailabilityStatuses. */ -export interface ChildAvailabilityStatuses { - /** - * Lists the historical availability statuses for a single child resource. Use the nextLink property in - * the response to get the next page of availability status - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: ChildAvailabilityStatusesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets current availability status for a single resource - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} - * @param options The options parameters. - */ - getByResource( - resourceUri: string, - options?: ChildAvailabilityStatusesGetByResourceOptionalParams - ): Promise; -} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.ts deleted file mode 100644 index 330611cfd82a..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/childResources.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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AvailabilityStatus, - ChildResourcesListOptionalParams -} from "../models"; - -/// -/** Interface representing a ChildResources. */ -export interface ChildResources { - /** - * Lists the all the children and its current health status for a parent resource. Use the nextLink - * property in the response to get the next page of children current health - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource - * type. Currently the API only support not nested parent resource type: - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: ChildResourcesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/emergingIssues.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/emergingIssues.ts deleted file mode 100644 index b059382f09f3..000000000000 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/emergingIssues.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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - EmergingIssuesGetResult, - EmergingIssuesListOptionalParams, - EmergingIssuesGetOptionalParams, - EmergingIssuesGetResponse -} from "../models"; - -/// -/** Interface representing a EmergingIssues. */ -export interface EmergingIssues { - /** - * Lists Azure services' emerging issues. - * @param options The options parameters. - */ - list( - options?: EmergingIssuesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets Azure services' emerging issues. - * @param options The options parameters. - */ - get( - options?: EmergingIssuesGetOptionalParams - ): Promise; -} diff --git a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts index 7a0013d72250..aec7ca100dac 100644 --- a/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts +++ b/sdk/resourcehealth/arm-resourcehealth/src/operationsInterfaces/index.ts @@ -7,7 +7,4 @@ */ export * from "./availabilityStatuses"; -export * from "./childAvailabilityStatuses"; -export * from "./childResources"; export * from "./operations"; -export * from "./emergingIssues"; diff --git a/sdk/resourcehealth/arm-resourcehealth/tsconfig.json b/sdk/resourcehealth/arm-resourcehealth/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/resourcehealth/arm-resourcehealth/tsconfig.json +++ b/sdk/resourcehealth/arm-resourcehealth/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/resourcehealth/ci.mgmt.yml b/sdk/resourcehealth/ci.mgmt.yml index 03c71422fafd..0a26246b0283 100644 --- a/sdk/resourcehealth/ci.mgmt.yml +++ b/sdk/resourcehealth/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/resourcehealth/ci.mgmt.yml - sdk/resourcehealth/arm-resourcehealth/ + - sdk/resourcehealth/arm-resourcehealth pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/resourcehealth/ci.mgmt.yml - sdk/resourcehealth/arm-resourcehealth/ - + - sdk/resourcehealth/arm-resourcehealth extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: resourcehealth Artifacts: - name: azure-arm-resourcehealth - safeName: azurearmresourcehealth \ No newline at end of file + safeName: azurearmresourcehealth