diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ef7d446cde11..2d11a07f1847 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2238,7 +2238,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/chai-as-promised/7.1.5: @@ -2260,7 +2260,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/cookie/0.4.1: @@ -2270,7 +2270,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/debug/4.1.7: @@ -2282,7 +2282,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/eslint/8.4.10: @@ -2303,7 +2303,7 @@ packages: /@types/express-serve-static-core/4.17.33: resolution: {integrity: sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2320,13 +2320,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/inquirer/8.2.6: @@ -2339,7 +2339,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/json-schema/7.0.11: @@ -2353,13 +2353,13 @@ packages: /@types/jsonwebtoken/9.0.1: resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/linkify-it/3.0.2: @@ -2406,7 +2406,7 @@ packages: /@types/node-fetch/2.6.3: resolution: {integrity: sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 form-data: 3.0.1 dev: false @@ -2449,7 +2449,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/semaphore/1.1.1: @@ -2464,7 +2464,7 @@ packages: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/sinon/10.0.14: @@ -2486,13 +2486,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/tough-cookie/4.0.2: @@ -2506,7 +2506,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/underscore/1.11.4: @@ -2524,19 +2524,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/yargs-parser/21.0.0: @@ -2553,7 +2553,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false optional: true @@ -3624,7 +3624,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: @@ -3913,7 +3913,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.42 + '@types/node': 18.16.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4927,7 +4927,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 @@ -7350,7 +7350,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.42 + '@types/node': 18.16.0 long: 5.2.3 dev: false @@ -10672,7 +10672,7 @@ packages: dev: false file:projects/arm-changes.tgz: - resolution: {integrity: sha512-GehZqDZ2RhV/MxQ0YnbyM0ZhK+d6t787jWET6S9zfVuYVsRyfC0AD8ISSRsXwBPb+RbObYx+1CTlE9KhJi7wbg==, tarball: file:projects/arm-changes.tgz} + resolution: {integrity: sha512-7DuFCbmqVSVPHWsrM1Gj686DW76ux/e9U+EA71mZ3exD7n4/E/8jdyOC9bjOVVdG4O0Xw20crjDF/UEvW7rcMQ==, tarball: file:projects/arm-changes.tgz} name: '@rush-temp/arm-changes' version: 0.0.0 dependencies: @@ -10686,13 +10686,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -12141,7 +12142,7 @@ packages: dev: false file:projects/arm-features.tgz: - resolution: {integrity: sha512-wzYIQeNpQRjY0n/buj54ZFySiXwPOhGFSdDhYRfkTmv0tk+Ql+0JtSRnk6KpE5H2M88lndj8eL08K2Y7YASfDA==, tarball: file:projects/arm-features.tgz} + resolution: {integrity: sha512-qgRkXbD2oh2IdBBadYoUnYm2OuZF/LdNM0w4HpF9QfJZddhceyjsa5Iml7mAqPUWY3rSqvGrHG1Uw/9n0K40UA==, tarball: file:projects/arm-features.tgz} name: '@rush-temp/arm-features' version: 0.0.0 dependencies: @@ -12155,13 +12156,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -12749,7 +12751,7 @@ packages: dev: false file:projects/arm-links.tgz: - resolution: {integrity: sha512-SasnkMqF1QsK07NqeeYAlrYHhhGwkJlpG+YUd783pBa4pCs5dDTZ88EVvqbfAE5XwFeeowhNBnC55A1h1LR2hQ==, tarball: file:projects/arm-links.tgz} + resolution: {integrity: sha512-R7tSmvpr/Op6Py27rczhOq9vc/fOz7jStmkmGHwNiuK2j8vloV0zsV25ZlNbRddiVooSfOHRlG3RQuKI4pTlew==, tarball: file:projects/arm-links.tgz} name: '@rush-temp/arm-links' version: 0.0.0 dependencies: @@ -12763,13 +12765,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -12832,7 +12835,7 @@ packages: dev: false file:projects/arm-locks.tgz: - resolution: {integrity: sha512-MPanNrEY5x4seG4Xsx1IdCPnqlJtQfqVkEOLOj5gIocAsH0PSwdHNms3MrseEeqHt7EeeRM9/G7vyqIFX7xTsA==, tarball: file:projects/arm-locks.tgz} + resolution: {integrity: sha512-/pG+cqdMAuWQLXXSf8NkFpIywxNxK7ZgHCfg+OQTxOJWPpG0FZSNPbef7OknyAZfpkEAtKMKltttME1VZ7MGtg==, tarball: file:projects/arm-locks.tgz} name: '@rush-temp/arm-locks' version: 0.0.0 dependencies: @@ -12846,13 +12849,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -12969,7 +12973,7 @@ packages: dev: false file:projects/arm-managedapplications.tgz: - resolution: {integrity: sha512-1Z2BnCUZjOKqEu31DKPmb+vBaSx2J9oUnvtzPleSm/FpUpa3oCgtWkNHwWG0BWI5A/j9RGbpkLAfFnLZwUQapQ==, tarball: file:projects/arm-managedapplications.tgz} + resolution: {integrity: sha512-x/JdqsSIJ/W78NtH38h3bEVm2nnVRNMFUQ06jhNgO4C2GF8uMGwQLphTiA7gXIWfwT9m1rYhibragYPuNYMSkw==, tarball: file:projects/arm-managedapplications.tgz} name: '@rush-temp/arm-managedapplications' version: 0.0.0 dependencies: @@ -12983,13 +12987,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -13815,7 +13820,7 @@ packages: dev: false file:projects/arm-policy.tgz: - resolution: {integrity: sha512-+wk1hJhnsWwnOXefGyaH8WkAGjGwe4fwturWRn35Gn45Qy8N4SC3ZviOrOmcWu+PDZTl9HajkJ3/p7AcAicH1w==, tarball: file:projects/arm-policy.tgz} + resolution: {integrity: sha512-a34IRmRGu+rFYSvulELtwW3FAKg8PpsXjE2wNz3YhIaOJiZG4zUJCHltlvHhA6yCBnaDeTR2WVRzj3kON/MwTw==, tarball: file:projects/arm-policy.tgz} name: '@rush-temp/arm-policy' version: 0.0.0 dependencies: @@ -13829,13 +13834,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -14423,7 +14429,7 @@ packages: dev: false file:projects/arm-resources-subscriptions.tgz: - resolution: {integrity: sha512-cX52nUSMX3/BnjRv2SDCtvgfrOgkDRhIxUedOlRRha9MxhXZh1FLKEioPoSiYEGXUfVZyOfoyhUyeidVdkdjsA==, tarball: file:projects/arm-resources-subscriptions.tgz} + resolution: {integrity: sha512-QO/iHVW77yNp3YckbdlUNIodNnm12FOZyKScSB0LHdMJ2vBW2aaMB3qS9V3sVnv62uqzr+bSSZKp9Y0hA4asLw==, tarball: file:projects/arm-resources-subscriptions.tgz} name: '@rush-temp/arm-resources-subscriptions' version: 0.0.0 dependencies: @@ -14437,20 +14443,21 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color dev: false file:projects/arm-resources.tgz: - resolution: {integrity: sha512-Hui4Gr/1c3mwTD/+Me5Clhncbm6S3b84HUjrHKCVOOUJWdshuhbmOsCPQjVMsaubWUdK5eVA9FMGl0k99JtweA==, tarball: file:projects/arm-resources.tgz} + resolution: {integrity: sha512-0y8WayrHdYUed906Fq63aGCIphsC4f1FZna1WSTO0OwJdAmraQWbb1IAHOYHt3vg1BxqZZAMvoSMMTNbj5aieA==, tarball: file:projects/arm-resources.tgz} name: '@rush-temp/arm-resources' version: 0.0.0 dependencies: @@ -14471,7 +14478,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -15294,7 +15301,7 @@ packages: dev: false file:projects/arm-templatespecs.tgz: - resolution: {integrity: sha512-xwRUA9TZWw550T5v+ks6MZ8w+5us52zlm6dqG4wIzFzheRNLN0ngnscXj8jeVrPFGlFsADRnEwAf7Aq2d2NNTA==, tarball: file:projects/arm-templatespecs.tgz} + resolution: {integrity: sha512-1enPjBj1dAGdJ1XHOouopfhZn4ZniLrzlCLmmUfEfE+TRVMpWWRJj8G59cd0OyzFV9ppxWG3NRhp8WKht7Lv1A==, tarball: file:projects/arm-templatespecs.tgz} name: '@rush-temp/arm-templatespecs' version: 0.0.0 dependencies: @@ -15308,13 +15315,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/CHANGELOG.md b/sdk/resources-subscriptions/arm-resources-subscriptions/CHANGELOG.md index 62f36798cc2c..72920c809ab2 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/CHANGELOG.md +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/CHANGELOG.md @@ -1,15 +1,43 @@ # Release History + +## 3.0.0 (2023-04-25) + +**Features** -## 2.0.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group Operations + - Added operation Subscriptions.checkZonePeers + - Added Interface AvailabilityZoneMappings + - Added Interface AvailabilityZonePeers + - Added Interface CheckZonePeersRequest + - Added Interface CheckZonePeersResult + - Added Interface ErrorDetail + - Added Interface ErrorResponseAutoGenerated + - Added Interface OperationAutoGenerated + - Added Interface OperationDisplayAutoGenerated + - Added Interface OperationListResultAutoGenerated + - Added Interface OperationsListNextOptionalParams + - Added Interface OperationsListOptionalParams + - Added Interface Peers + - Added Interface SubscriptionsCheckZonePeersOptionalParams + - Added Type Alias ActionType + - Added Type Alias OperationsListNextResponse + - Added Type Alias OperationsListResponse + - Added Type Alias Origin + - Added Type Alias SubscriptionsCheckZonePeersResponse + - Interface Location_2 has a new optional parameter availabilityZoneMappings + - Interface LocationMetadata has a new optional parameter geography + - Interface Operation has a new optional parameter actionType + - Interface Operation has a new optional parameter isDataAction + - Interface Operation has a new optional parameter origin + - Added Enum KnownActionType + - Added Enum KnownOrigin + +**Breaking Changes** + + - Operation Subscriptions.get has a new signature + - Operation Subscriptions.listLocations has a new signature + - Class SubscriptionClient has a new signature + ## 2.0.2 (2022-11-22) **Features** diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/LICENSE b/sdk/resources-subscriptions/arm-resources-subscriptions/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/LICENSE +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 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/resources-subscriptions/arm-resources-subscriptions/_meta.json b/sdk/resources-subscriptions/arm-resources-subscriptions/_meta.json index 4b98b8203a1f..73809833af81 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/_meta.json +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/_meta.json @@ -1,8 +1,8 @@ { - "commit": "a42f1b58607091c4f255ead152a8ef323fa0b280", - "readme": "specification\\resources\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\resources\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "3d3642c866cae6a8e7fe0c441a1f6993a2d19186", + "readme": "specification/resources/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/package.json b/sdk/resources-subscriptions/arm-resources-subscriptions/package.json index 0c52c800e5b2..ea3c9475258c 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/package.json +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/package.json @@ -3,13 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SubscriptionClient.", - "version": "2.0.3", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -31,12 +31,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -47,7 +48,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources-subscriptions/arm-resources-subscriptions", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -109,12 +109,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resources-subscriptions?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources-subscriptions/arm-resources-subscriptions" +} \ No newline at end of file diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/review/arm-resources-subscriptions.api.md b/sdk/resources-subscriptions/arm-resources-subscriptions/review/arm-resources-subscriptions.api.md index 22c6110ddf42..48e9822d3d77 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/review/arm-resources-subscriptions.api.md +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/review/arm-resources-subscriptions.api.md @@ -8,6 +8,21 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; +// @public +export type ActionType = string; + +// @public +export interface AvailabilityZoneMappings { + readonly logicalZone?: string; + readonly physicalZone?: string; +} + +// @public +export interface AvailabilityZonePeers { + readonly availabilityZone?: string; + peers?: Peers[]; +} + // @public export interface CheckResourceNameOptionalParams extends coreClient.OperationOptions { resourceNameDefinition?: ResourceName; @@ -23,6 +38,19 @@ export interface CheckResourceNameResult { type?: string; } +// @public +export interface CheckZonePeersRequest { + location?: string; + subscriptionIds?: string[]; +} + +// @public +export interface CheckZonePeersResult { + availabilityZonePeers?: AvailabilityZonePeers[]; + location?: string; + readonly subscriptionId?: string; +} + // @public export interface CloudError { error?: ErrorResponse; @@ -34,6 +62,15 @@ export interface ErrorAdditionalInfo { readonly type?: string; } +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { readonly additionalInfo?: ErrorAdditionalInfo[]; @@ -43,9 +80,26 @@ export interface ErrorResponse { readonly target?: string; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetail; +} + // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + // @public export enum KnownRegionCategory { Extended = "Extended", @@ -67,6 +121,7 @@ export enum KnownResourceNameStatus { // @public interface Location_2 { + availabilityZoneMappings?: AvailabilityZoneMappings[]; readonly displayName?: string; readonly id?: string; metadata?: LocationMetadata; @@ -84,6 +139,7 @@ export interface LocationListResult { // @public export interface LocationMetadata { + readonly geography?: string; readonly geographyGroup?: string; readonly homeLocation?: string; readonly latitude?: string; @@ -104,12 +160,32 @@ export interface ManagedByTenant { // @public export interface Operation { + readonly actionType?: ActionType; display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationAutoGenerated { + readonly actionType?: ActionType; + display?: OperationDisplayAutoGenerated; + readonly isDataAction?: boolean; name?: string; + readonly origin?: Origin; } // @public export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationDisplayAutoGenerated { description?: string; operation?: string; provider?: string; @@ -118,10 +194,38 @@ export interface OperationDisplay { // @public export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface OperationListResultAutoGenerated { nextLink?: string; - value?: Operation[]; + value?: OperationAutoGenerated[]; } +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export type Origin = string; + // @public export interface PairedRegion { readonly id?: string; @@ -129,6 +233,12 @@ export interface PairedRegion { readonly subscriptionId?: string; } +// @public +export interface Peers { + readonly availabilityZone?: string; + readonly subscriptionId?: string; +} + // @public export type RegionCategory = string; @@ -166,11 +276,15 @@ export interface Subscription { export class SubscriptionClient extends coreClient.ServiceClient { // (undocumented) $host: string; - constructor(credentials: coreAuth.TokenCredential, options?: SubscriptionClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: SubscriptionClientOptionalParams); // (undocumented) apiVersion: string; checkResourceName(options?: CheckResourceNameOptionalParams): Promise; // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; + // (undocumented) subscriptions: Subscriptions; // (undocumented) tenants: Tenants; @@ -198,11 +312,19 @@ export interface SubscriptionPolicies { // @public export interface Subscriptions { - get(subscriptionId: string, options?: SubscriptionsGetOptionalParams): Promise; + checkZonePeers(parameters: CheckZonePeersRequest, options?: SubscriptionsCheckZonePeersOptionalParams): Promise; + get(options?: SubscriptionsGetOptionalParams): Promise; list(options?: SubscriptionsListOptionalParams): PagedAsyncIterableIterator; - listLocations(subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams): PagedAsyncIterableIterator; + listLocations(options?: SubscriptionsListLocationsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SubscriptionsCheckZonePeersOptionalParams extends coreClient.OperationOptions { } +// @public +export type SubscriptionsCheckZonePeersResponse = CheckZonePeersResult; + // @public export interface SubscriptionsGetOptionalParams extends coreClient.OperationOptions { } diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/index.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/index.ts index 0d99c7fac913..6db2ed8937c1 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/index.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/index.ts @@ -8,6 +8,119 @@ import * as coreClient from "@azure/core-client"; +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** An error response for a resource management request. */ +export interface CloudError { + /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */ + error?: ErrorResponse; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */ +export interface ErrorResponse { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** Location list operation response. */ export interface LocationListResult { /** An array of locations. */ @@ -17,7 +130,7 @@ export interface LocationListResult { /** Location information. */ export interface Location { /** - * The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + * The fully qualified ID of the location. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -48,6 +161,8 @@ export interface Location { readonly regionalDisplayName?: string; /** Metadata of the location, such as lat/long, paired region, and others. */ metadata?: LocationMetadata; + /** The availability zone mappings for this region. */ + availabilityZoneMappings?: AvailabilityZoneMappings[]; } /** Location metadata information */ @@ -62,6 +177,11 @@ export interface LocationMetadata { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly regionCategory?: RegionCategory; + /** + * The geography of the location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly geography?: string; /** * The geography group of the location. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -99,7 +219,7 @@ export interface PairedRegion { */ readonly name?: string; /** - * The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + * The fully qualified ID of the location. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -110,59 +230,24 @@ export interface PairedRegion { readonly subscriptionId?: string; } -/** An error response for a resource management request. */ -export interface CloudError { - /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */ - error?: ErrorResponse; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */ -export interface ErrorResponse { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; +/** Availability zone mappings for the region */ +export interface AvailabilityZoneMappings { /** - * The error target. + * The logical zone id for the availability zone * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly target?: string; + readonly logicalZone?: string; /** - * The error details. + * The fully qualified physical zone id of availability zone to which logical zone id is mapped to * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details?: ErrorResponse[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; + readonly physicalZone?: string; } /** Subscription information. */ export interface Subscription { /** - * The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000. + * The fully qualified ID for the subscription. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74 * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -243,12 +328,12 @@ export interface TenantListResult { /** Tenant Id information. */ export interface TenantIdDescription { /** - * The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000. + * The fully qualified ID of the tenant. For example, /tenants/8d65815f-a5b6-402f-9298-045155da7d74 * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * The tenant ID. For example, 00000000-0000-0000-0000-000000000000. + * The tenant ID. For example, 8d65815f-a5b6-402f-9298-045155da7d74 * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tenantId?: string; @@ -294,6 +379,87 @@ export interface TenantIdDescription { readonly tenantBrandingLogoUrl?: string; } +/** Check zone peers request parameters. */ +export interface CheckZonePeersRequest { + /** The Microsoft location. */ + location?: string; + /** The peer Microsoft Azure subscription ID. */ + subscriptionIds?: string[]; +} + +/** Result of the Check zone peers operation. */ +export interface CheckZonePeersResult { + /** + * The subscription ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; + /** the location of the subscription. */ + location?: string; + /** The Availability Zones shared by the subscriptions. */ + availabilityZonePeers?: AvailabilityZonePeers[]; +} + +/** List of availability zones shared by the subscriptions. */ +export interface AvailabilityZonePeers { + /** + * The availabilityZone. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly availabilityZone?: string; + /** Details of shared availability zone. */ + peers?: Peers[]; +} + +/** Information about shared availability zone. */ +export interface Peers { + /** + * The subscription ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; + /** + * The availabilityZone. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly availabilityZone?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + /** Name and Type of the Resource */ export interface ResourceName { /** Name of the resource */ @@ -312,16 +478,31 @@ export interface CheckResourceNameResult { status?: ResourceNameStatus; } -/** Microsoft.Resources operation */ -export interface Operation { +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface OperationAutoGenerated { /** Operation name: {provider}/{resource}/{operation} */ name?: string; - /** The object that represents the operation. */ - display?: OperationDisplay; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplayAutoGenerated; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; } -/** The object that represents the operation. */ -export interface OperationDisplay { +/** Localized display information for this particular operation. */ +export interface OperationDisplayAutoGenerated { /** Service provider: Microsoft.Resources */ provider?: string; /** Resource on which the operation is performed: Profile, endpoint, etc. */ @@ -332,14 +513,50 @@ export interface OperationDisplay { description?: string; } -/** Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results. */ -export interface OperationListResult { - /** List of Microsoft.Resources operations. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResultAutoGenerated { + /** List of operations supported by the resource provider */ + value?: OperationAutoGenerated[]; + /** URL to get the next set of operation list results (if there are any). */ nextLink?: string; } +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + /** Known values of {@link RegionType} that the service accepts. */ export enum KnownRegionType { /** Physical */ @@ -410,6 +627,20 @@ export type SpendingLimit = "On" | "Off" | "CurrentPeriodOff"; /** Defines values for TenantCategory. */ export type TenantCategory = "Home" | "ProjectedBy" | "ManagedBy"; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + /** Optional parameters. */ export interface SubscriptionsListLocationsOptionalParams extends coreClient.OperationOptions { @@ -434,6 +665,13 @@ export interface SubscriptionsListOptionalParams /** Contains response data for the list operation. */ export type SubscriptionsListResponse = SubscriptionListResult; +/** Optional parameters. */ +export interface SubscriptionsCheckZonePeersOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkZonePeers operation. */ +export type SubscriptionsCheckZonePeersResponse = CheckZonePeersResult; + /** Optional parameters. */ export interface SubscriptionsListNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/mappers.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/mappers.ts index 3bc2da2a3652..5f6ca4b369ab 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/mappers.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/mappers.ts @@ -8,6 +8,212 @@ import * as coreClient from "@azure/core-client"; +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CloudError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + export const LocationListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -83,6 +289,18 @@ export const Location: coreClient.CompositeMapper = { name: "Composite", className: "LocationMetadata" } + }, + availabilityZoneMappings: { + serializedName: "availabilityZoneMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailabilityZoneMappings" + } + } + } } } } @@ -107,6 +325,13 @@ export const LocationMetadata: coreClient.CompositeMapper = { name: "String" } }, + geography: { + serializedName: "geography", + readOnly: true, + type: { + name: "String" + } + }, geographyGroup: { serializedName: "geographyGroup", readOnly: true, @@ -188,97 +413,24 @@ export const PairedRegion: coreClient.CompositeMapper = { } }; -export const CloudError: coreClient.CompositeMapper = { +export const AvailabilityZoneMappings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudError", + className: "AvailabilityZoneMappings", modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorResponse" - } - } - } - } -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", + logicalZone: { + serializedName: "logicalZone", readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", + physicalZone: { + serializedName: "physicalZone", readOnly: true, type: { name: "String" } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorResponse" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } } } } @@ -549,6 +701,189 @@ export const TenantIdDescription: coreClient.CompositeMapper = { } }; +export const CheckZonePeersRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckZonePeersRequest", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + subscriptionIds: { + serializedName: "subscriptionIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CheckZonePeersResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckZonePeersResult", + modelProperties: { + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + availabilityZonePeers: { + serializedName: "availabilityZonePeers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailabilityZonePeers" + } + } + } + } + } + } +}; + +export const AvailabilityZonePeers: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailabilityZonePeers", + modelProperties: { + availabilityZone: { + serializedName: "availabilityZone", + readOnly: true, + type: { + name: "String" + } + }, + peers: { + serializedName: "peers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Peers" + } + } + } + } + } + } +}; + +export const Peers: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Peers", + modelProperties: { + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "String" + } + }, + availabilityZone: { + serializedName: "availabilityZone", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + export const ResourceName: coreClient.CompositeMapper = { type: { name: "Composite", @@ -599,10 +934,10 @@ export const CheckResourceNameResult: coreClient.CompositeMapper = { } }; -export const Operation: coreClient.CompositeMapper = { +export const OperationAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "OperationAutoGenerated", modelProperties: { name: { serializedName: "name", @@ -610,21 +945,42 @@ export const Operation: coreClient.CompositeMapper = { name: "String" } }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" + className: "OperationDisplayAutoGenerated" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const OperationDisplayAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "OperationDisplayAutoGenerated", modelProperties: { provider: { serializedName: "provider", @@ -654,10 +1010,10 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const OperationListResultAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "OperationListResultAutoGenerated", modelProperties: { value: { serializedName: "value", @@ -666,7 +1022,7 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "OperationAutoGenerated" } } } diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/parameters.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/parameters.ts index 6ae1bccccf87..0b04606a3cd0 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/parameters.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/models/parameters.ts @@ -11,7 +11,10 @@ import { OperationURLParameter, OperationQueryParameter } from "@azure/core-client"; -import { ResourceName as ResourceNameMapper } from "../models/mappers"; +import { + CheckZonePeersRequest as CheckZonePeersRequestMapper, + ResourceName as ResourceNameMapper +} from "../models/mappers"; export const accept: OperationParameter = { parameterPath: "accept", @@ -37,49 +40,49 @@ export const $host: OperationURLParameter = { skipEncoding: true }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - serializedName: "subscriptionId", - required: true, + defaultValue: "2022-12-01", + isConstant: true, + serializedName: "api-version", type: { name: "String" } } }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - defaultValue: "2021-01-01", - isConstant: true, - serializedName: "api-version", + serializedName: "nextLink", + required: true, type: { name: "String" } - } + }, + skipEncoding: true }; -export const includeExtendedLocations: OperationQueryParameter = { - parameterPath: ["options", "includeExtendedLocations"], +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "includeExtendedLocations", + serializedName: "subscriptionId", + required: true, type: { - name: "Boolean" + name: "Uuid" } } }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const includeExtendedLocations: OperationQueryParameter = { + parameterPath: ["options", "includeExtendedLocations"], mapper: { - serializedName: "nextLink", - required: true, + serializedName: "includeExtendedLocations", type: { - name: "String" + name: "Boolean" } - }, - skipEncoding: true + } }; export const contentType: OperationParameter = { @@ -94,6 +97,11 @@ export const contentType: OperationParameter = { } }; +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: CheckZonePeersRequestMapper +}; + export const resourceNameDefinition: OperationParameter = { parameterPath: ["options", "resourceNameDefinition"], mapper: ResourceNameMapper diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/index.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/index.ts index 6c722ac4853c..f80a9ad0321f 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/index.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/index.ts @@ -6,5 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./operations"; export * from "./subscriptions"; export * from "./tenants"; diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/operations.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/operations.ts new file mode 100644 index 000000000000..3808ae14959a --- /dev/null +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SubscriptionClient } from "../subscriptionClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: SubscriptionClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: SubscriptionClient) { + this.client = client; + } + + /** + * Lists all of the available Microsoft.Resources REST API operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all of the available Microsoft.Resources REST API operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): 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?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Resources/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/subscriptions.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/subscriptions.ts index 51f07129d256..053348fb358f 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/subscriptions.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/subscriptions.ts @@ -23,6 +23,9 @@ import { SubscriptionsListResponse, SubscriptionsGetOptionalParams, SubscriptionsGetResponse, + CheckZonePeersRequest, + SubscriptionsCheckZonePeersOptionalParams, + SubscriptionsCheckZonePeersResponse, SubscriptionsListNextResponse } from "../models"; @@ -42,14 +45,12 @@ export class SubscriptionsImpl implements Subscriptions { /** * This operation provides all the locations that are available for resource providers; however, each * resource provider may support a subset of this list. - * @param subscriptionId The ID of the target subscription. * @param options The options parameters. */ public listLocations( - subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listLocationsPagingAll(subscriptionId, options); + const iter = this.listLocationsPagingAll(options); return { next() { return iter.next(); @@ -61,29 +62,24 @@ export class SubscriptionsImpl implements Subscriptions { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listLocationsPagingPage(subscriptionId, options, settings); + return this.listLocationsPagingPage(options, settings); } }; } private async *listLocationsPagingPage( - subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams, _settings?: PageSettings ): AsyncIterableIterator { let result: SubscriptionsListLocationsResponse; - result = await this._listLocations(subscriptionId, options); + result = await this._listLocations(options); yield result.value || []; } private async *listLocationsPagingAll( - subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams ): AsyncIterableIterator { - for await (const page of this.listLocationsPagingPage( - subscriptionId, - options - )) { + for await (const page of this.listLocationsPagingPage(options)) { yield* page; } } @@ -145,32 +141,25 @@ export class SubscriptionsImpl implements Subscriptions { /** * This operation provides all the locations that are available for resource providers; however, each * resource provider may support a subset of this list. - * @param subscriptionId The ID of the target subscription. * @param options The options parameters. */ private _listLocations( - subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams ): Promise { return this.client.sendOperationRequest( - { subscriptionId, options }, + { options }, listLocationsOperationSpec ); } /** * Gets details about a specified subscription. - * @param subscriptionId The ID of the target subscription. * @param options The options parameters. */ get( - subscriptionId: string, options?: SubscriptionsGetOptionalParams ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, options }, - getOperationSpec - ); + return this.client.sendOperationRequest({ options }, getOperationSpec); } /** @@ -183,6 +172,21 @@ export class SubscriptionsImpl implements Subscriptions { return this.client.sendOperationRequest({ options }, listOperationSpec); } + /** + * Compares a subscriptions logical zone mapping + * @param parameters Parameters for checking zone peers. + * @param options The options parameters. + */ + checkZonePeers( + parameters: CheckZonePeersRequest, + options?: SubscriptionsCheckZonePeersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + checkZonePeersOperationSpec + ); + } + /** * ListNext * @param nextLink The nextLink from the previous successful call to the List method. @@ -249,6 +253,25 @@ const listOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const checkZonePeersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/checkZonePeers/", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckZonePeersResult + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -260,7 +283,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/tenants.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/tenants.ts index 47d884e8d2df..e7ccb62eed12 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/tenants.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operations/tenants.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/index.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/index.ts index 6c722ac4853c..f80a9ad0321f 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/index.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/index.ts @@ -6,5 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./operations"; export * from "./subscriptions"; export * from "./tenants"; diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/operations.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..ac34435954c0 --- /dev/null +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available Microsoft.Resources REST API operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/subscriptions.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/subscriptions.ts index 23e6c628c7a7..27c6e53d5b66 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/subscriptions.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/operationsInterfaces/subscriptions.ts @@ -13,7 +13,10 @@ import { Subscription, SubscriptionsListOptionalParams, SubscriptionsGetOptionalParams, - SubscriptionsGetResponse + SubscriptionsGetResponse, + CheckZonePeersRequest, + SubscriptionsCheckZonePeersOptionalParams, + SubscriptionsCheckZonePeersResponse } from "../models"; /// @@ -22,11 +25,9 @@ export interface Subscriptions { /** * This operation provides all the locations that are available for resource providers; however, each * resource provider may support a subset of this list. - * @param subscriptionId The ID of the target subscription. * @param options The options parameters. */ listLocations( - subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams ): PagedAsyncIterableIterator; /** @@ -38,11 +39,18 @@ export interface Subscriptions { ): PagedAsyncIterableIterator; /** * Gets details about a specified subscription. - * @param subscriptionId The ID of the target subscription. * @param options The options parameters. */ get( - subscriptionId: string, options?: SubscriptionsGetOptionalParams ): Promise; + /** + * Compares a subscriptions logical zone mapping + * @param parameters Parameters for checking zone peers. + * @param options The options parameters. + */ + checkZonePeers( + parameters: CheckZonePeersRequest, + options?: SubscriptionsCheckZonePeersOptionalParams + ): Promise; } diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/pagingHelper.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/pagingHelper.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/src/subscriptionClient.ts b/sdk/resources-subscriptions/arm-resources-subscriptions/src/subscriptionClient.ts index af68edb4bfdc..ac70740c9d48 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/src/subscriptionClient.ts +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/src/subscriptionClient.ts @@ -14,8 +14,8 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { SubscriptionsImpl, TenantsImpl } from "./operations"; -import { Subscriptions, Tenants } from "./operationsInterfaces"; +import { OperationsImpl, SubscriptionsImpl, TenantsImpl } from "./operations"; +import { Operations, Subscriptions, Tenants } from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; import { @@ -27,19 +27,25 @@ import { export class SubscriptionClient extends coreClient.ServiceClient { $host: string; apiVersion: string; + subscriptionId: string; /** * Initializes a new instance of the SubscriptionClient class. * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, + subscriptionId: string, options?: SubscriptionClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } // Initializing default values for options if (!options) { @@ -50,7 +56,7 @@ export class SubscriptionClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-resources-subscriptions/2.0.3`; + const packageDetails = `azsdk-js-arm-resources-subscriptions/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -98,10 +104,13 @@ export class SubscriptionClient extends coreClient.ServiceClient { }) ); } + // Parameter assignments + this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-01-01"; + this.apiVersion = options.apiVersion || "2022-12-01"; + this.operations = new OperationsImpl(this); this.subscriptions = new SubscriptionsImpl(this); this.tenants = new TenantsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); @@ -149,6 +158,7 @@ export class SubscriptionClient extends coreClient.ServiceClient { ); } + operations: Operations; subscriptions: Subscriptions; tenants: Tenants; } diff --git a/sdk/resources-subscriptions/arm-resources-subscriptions/tsconfig.json b/sdk/resources-subscriptions/arm-resources-subscriptions/tsconfig.json index 565eaea5e4f8..615e06592f2b 100644 --- a/sdk/resources-subscriptions/arm-resources-subscriptions/tsconfig.json +++ b/sdk/resources-subscriptions/arm-resources-subscriptions/tsconfig.json @@ -15,29 +15,18 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-resources-subscriptions": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"