From 341a6b2d104a74e9548bfc643f57773c6bad4016 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 14 Oct 2022 06:08:38 +0000 Subject: [PATCH] CodeGen from PR 20399 in Azure/azure-rest-api-specs [2022-04-01-preview] Add New Api-version for Microsoft.ApiManagement (#20399) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds base for updating Microsoft.ApiManagement from version preview/2021-12-01-preview to version 2022-04-01-preview * Updates readme * Updates API version in new specs and examples * APIM Auth Servers (#19234) * APIM Auth Servers * adding x-ms-identifiers * removing some weird, invisible special char * formatting * oAuth2AuthenticationSettings moved to AuthSettings * Formatting Co-authored-by: Milan Zolota * API Management Authorization Endpoints (#19615) * Add blockchain to latest profile * Add additional types * add authorizations definitions * authorizations operations * add examples * update readme * fix examples * fix linter delete errors * address CI validation errors * prettier fix * update to 2022-04 * fix readme * Update specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimauthorizationproviders.json Co-authored-by: Sean Kim * update versions * Apply suggestions from code review Co-authored-by: Mark Cowlishaw Co-authored-by: Annaji Sharma Ganti Co-authored-by: Annaji Sharma Ganti <42851022+annaji-msft@users.noreply.github.com> * Move Long running Create Operation from Location based to Azure-AsyncOperation Header (#19733) * azure-asyncOperation * prettier * fix(apim): Add missing 'metrics' property to diagnostics contract in 2022-04-01-preview (#20317) * apim /PUT apis import add translateRequiredQueryParameters (#20333) * [2022-04-01-preview] Replace resource with proxyresource and TrackedResource (#20461) * replace resource with proxyresource * revert to proxyresource * Add type object to authorization definitions (#20631) Authorization definitions were missing "type": "object", and this change adds that key/value pair * Add type object to policy fragment definition (#20585) * APIM Open ID Connect providers (#20622) * APIM Open ID Connect providers * added new proeprties for update * prettier * [APIM] Add Nat Gateway (#19990) * Update apimdeployment.json * Create ApiManagementCreateServiceWithNatGatewayEnabled.json * fix typo in file * Change Nat Gateway property to enum * modify type of natgateway state * update property name * add example reference * small fix in example * rename to outboundPublicIPAddresses Co-authored-by: Samir Solanki * [2022-04-01-preview] MIgrate2Stv2 API (#20504) * migrate2stv2 * updated to post * 202 and location * add body to 202 * remove body from 202 Co-authored-by: Vatsa Patel Co-authored-by: Samir Solanki Co-authored-by: vatsapatel@microsoft.colm * Address Authorizations MissingTypeObject errors (#20919) * Add forgotten If-Match header (#20920) * Add forgotten If-Match header `If-Match` header for the `DeleteAuthorizationAccessPolicy.json file` was forgotten. This change adds the wildcard character for the `If-Match` header for that file. * Update ApiManagementDeleteAuthorization.json * Use common types for specs and count as readonly (#21023) * common types * count readonly * Sasolank/more review comments (#21025) * XML * proxy to gateway * Update Authorizations Spec (#21027) * Update definitions.json Update wording for PostGetLoginLink endpoint description * Update apimauthorizationproviders.json Add 201 response to all Authorization PUT requests * Updated examples and fixed formatting There was a formatting issue within apimauthorizationproviders.json, and the Authorization examples needed to be updated with the new 201 responses for creating/updating Authorization entities. * Add long-running-operation key/value Added x-ms-long-running-operation: true to Authorization PUT requests * Remove long-running-operations * readonly revert (#21050) * Set SchemaContract.Document as required. (#20110) * Updated documentation of the SchemaContract. Server use to return code 500 in case SchemaContract.Document is null. That issue was fixed in the APIM and server will return proper response code. * Fix AzureApiValidation * update field with properties * revert remaining readonly on collection (#21051) * Change to camel casing for "accesspolicies" (#21070) * Change to camel casing for "accesspolicies" * More camel casing updates for access policies * list example fixed (#21089) * fix definition (#21110) * upgrade to v3 for common types (#21109) * upgrade to v3 * Space * revert to v2 proxyResource Co-authored-by: Milan Zolota Co-authored-by: Milan Zolota Co-authored-by: Sean D Kim Co-authored-by: Mark Cowlishaw Co-authored-by: Annaji Sharma Ganti Co-authored-by: Annaji Sharma Ganti <42851022+annaji-msft@users.noreply.github.com> Co-authored-by: Tom Kerkhove Co-authored-by: Korolev Dmitry Co-authored-by: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Co-authored-by: RafaƂ Mielowski Co-authored-by: malincrist <92857141+malincrist@users.noreply.github.com> Co-authored-by: GuanchenIntern <109827715+GuanchenIntern@users.noreply.github.com> Co-authored-by: VatsaPatel Co-authored-by: Vatsa Patel Co-authored-by: vatsapatel@microsoft.colm Co-authored-by: Maxim Agapov <103097563+agapovm@users.noreply.github.com> --- common/config/rush/pnpm-lock.yaml | 56 +- .../arm-apimanagement/CHANGELOG.md | 36 +- sdk/apimanagement/arm-apimanagement/README.md | 2 +- .../arm-apimanagement/_meta.json | 8 +- .../arm-apimanagement/package.json | 18 +- .../review/arm-apimanagement.api.md | 100 ++++ .../src/apiManagementClient.ts | 43 +- .../arm-apimanagement/src/models/index.ts | 136 ++++- .../arm-apimanagement/src/models/mappers.ts | 138 +++++ .../src/models/parameters.ts | 25 +- .../src/operations/apiSchema.ts | 15 +- .../src/operations/globalSchema.ts | 477 ++++++++++++++++++ .../arm-apimanagement/src/operations/index.ts | 1 + .../privateEndpointConnectionOperations.ts | 4 +- .../src/operations/subscription.ts | 4 +- .../src/operations/tenantAccess.ts | 4 +- .../src/operations/tenantConfiguration.ts | 6 +- .../arm-apimanagement/src/operations/user.ts | 6 +- .../src/operationsInterfaces/apiSchema.ts | 15 +- .../src/operationsInterfaces/globalSchema.ts | 114 +++++ .../src/operationsInterfaces/index.ts | 1 + .../privateEndpointConnectionOperations.ts | 4 +- .../arm-apimanagement/test/sampleTest.ts | 43 ++ .../arm-apimanagement/tsconfig.json | 10 +- 24 files changed, 1130 insertions(+), 136 deletions(-) create mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts create mode 100644 sdk/apimanagement/arm-apimanagement/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e1283c76cb50e..b6200ef784536 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2988,7 +2988,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3249,7 +3249,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3399,7 +3399,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3542,7 +3542,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3605,7 +3605,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3707,7 +3707,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.0: @@ -3961,7 +3961,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20221012 + typescript: 4.9.0-dev.20221013 dev: false /downlevel-dts/0.8.0: @@ -3980,11 +3980,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.270: @@ -4869,7 +4869,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -5009,7 +5009,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6439,7 +6439,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6449,7 +6449,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -8958,8 +8958,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20221012: - resolution: {integrity: sha512-EqJR8s/4zlC8nKMNB3ImSY/lv0bKnEJ2H4UPHzDC306qKgIRexh2Q/446811kG++20Q4TiFhV7LjLSBtgA3OrA==} + /typescript/4.9.0-dev.20221013: + resolution: {integrity: sha512-4Bo+yrQ+bCi8y2jB4oUajM4uxhluhGgTV0gESr/H8tvpOUqM0kT9swHxlc5fTXnzJFxQi8dbUg5rIfIQXakW2g==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -9086,7 +9086,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -10035,7 +10035,7 @@ packages: dev: false file:projects/api-management-custom-widgets-tools.tgz: - resolution: {integrity: sha512-rkK0ypNoOhHvruyxIyyH+N8XUFphLQ8z02Q0uQqWnIDQW50X1cwl6bFWcYUJBl7gLOyV+skoE2ZqsCia9AnieQ==, tarball: file:projects/api-management-custom-widgets-tools.tgz} + resolution: {integrity: sha512-Pfgy/r5JfXGBM5720c6esINeWW/EUncd4y2+0Y7T+E0B7ozWz6y0StR4+yPnTpN4u6tZ0ulVYZth7jIuSwKe/g==, tarball: file:projects/api-management-custom-widgets-tools.tgz} name: '@rush-temp/api-management-custom-widgets-tools' version: 0.0.0 dependencies: @@ -10084,13 +10084,12 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false file:projects/app-configuration.tgz: - resolution: {integrity: sha512-DRSf4AXx1i6vdEUJ3HIa0htTqUEpPzEpHn65/yErgss4fxsLghQzvu3X/8qBle3kE3ZGGjIPhSBa1wc7Rd8ZAw==, tarball: file:projects/app-configuration.tgz} + resolution: {integrity: sha512-jqmIDLMn9zrmJCg0fs78brOpLci8Fkp7xk9JuQU6jE+afCh7n8E86g4fscH1wbTIeVUYwsCHX+/FOkTlSc5N8A==, tarball: file:projects/app-configuration.tgz} name: '@rush-temp/app-configuration' version: 0.0.0 dependencies: @@ -10223,12 +10222,12 @@ packages: dev: false file:projects/arm-apimanagement.tgz: - resolution: {integrity: sha512-D02fwUKdfZ5mr42jcZ8xJTP9tMPXAhTpUA4IXKx7fkk9SbNwjkw71OT6avGUvXuIiFLYNfajjcRPTibgOGD1cA==, tarball: file:projects/arm-apimanagement.tgz} + resolution: {integrity: sha512-eqSrNGQnJyfR3sHJeqOjwaYAHB3ZqmqW2Vo7WFi7Pz9a7n4uQCmZuzD3DtnN7/8MsTAHVjsdDwnfGHjOTtsCRw==, tarball: file:projects/arm-apimanagement.tgz} name: '@rush-temp/arm-apimanagement' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.32.0 + '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 @@ -10242,7 +10241,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.17.2 transitivePeerDependencies: - '@types/node' @@ -16918,7 +16917,7 @@ packages: dev: false file:projects/eventhubs-checkpointstore-blob.tgz: - resolution: {integrity: sha512-zgVKR5U2UhMAaDAwkGBfwH4MvNyV8uPFyg4JVK5zxRA5Vad2+N3ICIwqPq9SsmrDzuVBQsMeYd5jwlFI9/OhJA==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} + resolution: {integrity: sha512-/u+qFaePWZak/yvyT/sBIc29ivztzVchhVkstP1jN/EyIbKIcW+fe3rAObZYGvSblOYppXxqfaeMU67rK9en3w==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} name: '@rush-temp/eventhubs-checkpointstore-blob' version: 0.0.0 dependencies: @@ -16965,7 +16964,6 @@ packages: - '@swc/core' - '@swc/wasm' - bufferutil - - encoding - supports-color - utf-8-validate dev: false @@ -17821,7 +17819,7 @@ packages: dev: false file:projects/notification-hubs.tgz: - resolution: {integrity: sha512-NF3pWFm+ODKaJQc7MMoI4Hukq5DOvBI6oQqiKD2gmpLB/ZVR0WNg18qXL6/lDFezbEs10C9zt1NGwedJs4MIow==, tarball: file:projects/notification-hubs.tgz} + resolution: {integrity: sha512-v3glHx0xQIrA2MuKdkiOj3A4teHM1h05OC94rPJ6qNCwRGiIMzSUVx33YKVza11yocKJGrdU4+I3LH5XYEmIbA==, tarball: file:projects/notification-hubs.tgz} name: '@rush-temp/notification-hubs' version: 0.0.0 dependencies: @@ -18516,7 +18514,7 @@ packages: dev: false file:projects/quantum-jobs.tgz: - resolution: {integrity: sha512-aR9T7XChQoryrxSyq8rZXfXUriLlSjeNOpf6PX/LZpnSg1SfgPeMaDqxEVWZmc2TlHmWtJnDYG8s7j+Kaj7zww==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-Psn6K/3THyGuRCfv/mktb4rGiQHR4gBpAaViWzb7czmux3wBLqhwloha9udjda87QbP1/BW4cZ6LRkirc4X0VA==, tarball: file:projects/quantum-jobs.tgz} name: '@rush-temp/quantum-jobs' version: 0.0.0 dependencies: @@ -18782,7 +18780,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-ibLqavJmz+7Ul84VyziwP6x4nctI5VajoWygTZsnuXwPneR9COAWgPG65QM40kmZdmruJLl4GbiUiDeOhwz7kw==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-P8uWdkfKregOUP0n0G179PH8y1LGfKMi5SsL+R0jQqJ3A5WllRAhBAg6zZW4IkFoSYQlQTrIfDYRYjDdFXa0Lg==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: @@ -18895,7 +18893,7 @@ packages: dev: false file:projects/storage-file-datalake.tgz: - resolution: {integrity: sha512-vjX6d95CLgz2zkhd2q0NGLhLRiFUaKxtHhqalMYYMZ9RT3Vgr2/zBsPSqaLatH2LBhcSWt50WHkpGIEuwDWBfA==, tarball: file:projects/storage-file-datalake.tgz} + resolution: {integrity: sha512-OML4LEzvG8wr5fGH6uceYlC3Shye+Yd9u1KcW91kyKtVElfqYFTxzKMaqezNbozDc9iHA0CTBgP21px2hazRnQ==, tarball: file:projects/storage-file-datalake.tgz} name: '@rush-temp/storage-file-datalake' version: 0.0.0 dependencies: @@ -18951,7 +18949,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-vRdZI1Sx1iejJ/lTOc7n5Heibue7R1D3Q5vlXXnLiHOvs25JZOwRFMbW+JhrcVro8inhybwZfvqoZ6X3KWNupA==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-xFBKk2mdftH6wPaWEh7Hc7fo+1swxE5WSIAfxZsQBZzxmeJSyr9NpPmj2P39hmzlMVNby7yPR7wtutZw1767bA==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/apimanagement/arm-apimanagement/CHANGELOG.md b/sdk/apimanagement/arm-apimanagement/CHANGELOG.md index 9f7d5a98caf47..d4b71a8c659c2 100644 --- a/sdk/apimanagement/arm-apimanagement/CHANGELOG.md +++ b/sdk/apimanagement/arm-apimanagement/CHANGELOG.md @@ -1,15 +1,31 @@ # Release History + +## 8.2.0 (2022-10-14) + +**Features** -## 8.1.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group GlobalSchema + - Added Interface GlobalSchemaCollection + - Added Interface GlobalSchemaContract + - Added Interface GlobalSchemaCreateOrUpdateHeaders + - Added Interface GlobalSchemaCreateOrUpdateOptionalParams + - Added Interface GlobalSchemaDeleteOptionalParams + - Added Interface GlobalSchemaGetEntityTagHeaders + - Added Interface GlobalSchemaGetEntityTagOptionalParams + - Added Interface GlobalSchemaGetHeaders + - Added Interface GlobalSchemaGetOptionalParams + - Added Interface GlobalSchemaListByServiceNextOptionalParams + - Added Interface GlobalSchemaListByServiceOptionalParams + - Added Type Alias GlobalSchemaCreateOrUpdateResponse + - Added Type Alias GlobalSchemaGetEntityTagResponse + - Added Type Alias GlobalSchemaGetResponse + - Added Type Alias GlobalSchemaListByServiceNextResponse + - Added Type Alias GlobalSchemaListByServiceResponse + - Added Type Alias SchemaType + - Interface DiagnosticContract has a new optional parameter metrics + - Class ApiManagementClient has a new parameter globalSchema + - Added Enum KnownSchemaType + ## 8.1.2 (2022-10-08) **Bugs Fixed** diff --git a/sdk/apimanagement/arm-apimanagement/README.md b/sdk/apimanagement/arm-apimanagement/README.md index 9b6c2e8409c29..6604ae9bec067 100644 --- a/sdk/apimanagement/arm-apimanagement/README.md +++ b/sdk/apimanagement/arm-apimanagement/README.md @@ -13,7 +13,7 @@ ApiManagement Client ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/apimanagement/arm-apimanagement/_meta.json b/sdk/apimanagement/arm-apimanagement/_meta.json index 82468e2a8246b..8dcf9cb0717ee 100644 --- a/sdk/apimanagement/arm-apimanagement/_meta.json +++ b/sdk/apimanagement/arm-apimanagement/_meta.json @@ -1,8 +1,8 @@ { - "commit": "b8cae07c799a07f2e779a9e301f639e9b85124b1", + "commit": "02892fba4474afacce6fc8a76c08d395dc5c8f26", "readme": "specification/apimanagement/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\apimanagement\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220721.1 --generate-sample=true", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/apimanagement/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220721.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.3", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/apimanagement/arm-apimanagement/package.json b/sdk/apimanagement/arm-apimanagement/package.json index 12acb86306706..6289e86bb0fc1 100644 --- a/sdk/apimanagement/arm-apimanagement/package.json +++ b/sdk/apimanagement/arm-apimanagement/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ApiManagementClient.", - "version": "8.1.3", + "version": "8.2.0", "engines": { "node": ">=12.0.0" }, @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-apimanagement.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement.api.md b/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement.api.md index f874eb95c29a2..3528ce8ffec29 100644 --- a/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement.api.md +++ b/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement.api.md @@ -705,6 +705,8 @@ export class ApiManagementClient extends coreClient.ServiceClient { // (undocumented) gatewayHostnameConfiguration: GatewayHostnameConfiguration; // (undocumented) + globalSchema: GlobalSchema; + // (undocumented) group: Group; // (undocumented) groupUser: GroupUser; @@ -3020,6 +3022,7 @@ export interface DiagnosticContract extends Resource { httpCorrelationProtocol?: HttpCorrelationProtocol; logClientIp?: boolean; loggerId?: string; + metrics?: boolean; operationNameFormat?: OperationNameFormat; sampling?: SamplingSettings; verbosity?: Verbosity; @@ -3619,6 +3622,94 @@ export interface GenerateSsoUrlResult { value?: string; } +// @public +export interface GlobalSchema { + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams): Promise, GlobalSchemaCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, serviceName: string, schemaId: string, ifMatch: string, options?: GlobalSchemaDeleteOptionalParams): Promise; + get(resourceGroupName: string, serviceName: string, schemaId: string, options?: GlobalSchemaGetOptionalParams): Promise; + getEntityTag(resourceGroupName: string, serviceName: string, schemaId: string, options?: GlobalSchemaGetEntityTagOptionalParams): Promise; + listByService(resourceGroupName: string, serviceName: string, options?: GlobalSchemaListByServiceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GlobalSchemaCollection { + count?: number; + readonly nextLink?: string; + readonly value?: GlobalSchemaContract[]; +} + +// @public +export interface GlobalSchemaContract extends Resource { + description?: string; + document?: Record; + schemaType?: SchemaType; + value?: any; +} + +// @public +export interface GlobalSchemaCreateOrUpdateHeaders { + eTag?: string; +} + +// @public +export interface GlobalSchemaCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GlobalSchemaCreateOrUpdateResponse = GlobalSchemaCreateOrUpdateHeaders & GlobalSchemaContract; + +// @public +export interface GlobalSchemaDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface GlobalSchemaGetEntityTagHeaders { + eTag?: string; +} + +// @public +export interface GlobalSchemaGetEntityTagOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalSchemaGetEntityTagResponse = GlobalSchemaGetEntityTagHeaders; + +// @public +export interface GlobalSchemaGetHeaders { + eTag?: string; +} + +// @public +export interface GlobalSchemaGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalSchemaGetResponse = GlobalSchemaGetHeaders & GlobalSchemaContract; + +// @public +export interface GlobalSchemaListByServiceNextOptionalParams extends coreClient.OperationOptions { + filter?: string; + skip?: number; + top?: number; +} + +// @public +export type GlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; + +// @public +export interface GlobalSchemaListByServiceOptionalParams extends coreClient.OperationOptions { + filter?: string; + skip?: number; + top?: number; +} + +// @public +export type GlobalSchemaListByServiceResponse = GlobalSchemaCollection; + // @public export type GrantType = string; @@ -4483,6 +4574,12 @@ export enum KnownSamplingType { Fixed = "fixed" } +// @public +export enum KnownSchemaType { + Json = "json", + Xml = "xml" +} + // @public export enum KnownSettingsTypeName { Public = "public" @@ -6576,6 +6673,9 @@ export interface SchemaContract extends Resource { value?: string; } +// @public +export type SchemaType = string; + // @public export type SettingsTypeName = string; diff --git a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts index f6979b6b9fd7e..fae2905e9584b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts +++ b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts @@ -79,6 +79,7 @@ import { QuotaByPeriodKeysImpl, RegionImpl, ReportsImpl, + GlobalSchemaImpl, TenantSettingsImpl, ApiManagementSkusImpl, SubscriptionImpl, @@ -155,6 +156,7 @@ import { QuotaByPeriodKeys, Region, Reports, + GlobalSchema, TenantSettings, ApiManagementSkus, Subscription, @@ -210,7 +212,7 @@ export class ApiManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-apimanagement/8.1.3`; + const packageDetails = `azsdk-js-arm-apimanagement/8.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -230,34 +232,27 @@ export class ApiManagementClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; @@ -335,6 +330,7 @@ export class ApiManagementClient extends coreClient.ServiceClient { this.quotaByPeriodKeys = new QuotaByPeriodKeysImpl(this); this.region = new RegionImpl(this); this.reports = new ReportsImpl(this); + this.globalSchema = new GlobalSchemaImpl(this); this.tenantSettings = new TenantSettingsImpl(this); this.apiManagementSkus = new ApiManagementSkusImpl(this); this.subscription = new SubscriptionImpl(this); @@ -540,6 +536,7 @@ export class ApiManagementClient extends coreClient.ServiceClient { quotaByPeriodKeys: QuotaByPeriodKeys; region: Region; reports: Reports; + globalSchema: GlobalSchema; tenantSettings: TenantSettings; apiManagementSkus: ApiManagementSkus; subscription: Subscription; diff --git a/sdk/apimanagement/arm-apimanagement/src/models/index.ts b/sdk/apimanagement/arm-apimanagement/src/models/index.ts index a73993359a121..96053d95a4639 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/index.ts @@ -1054,7 +1054,7 @@ export interface KeyVaultLastAccessStatusContractProperties { export interface KeyVaultContractCreateProperties { /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ secretIdentifier?: string; - /** SystemAssignedIdentity or UserAssignedIdentity Client Id which will be used to access key vault secret. */ + /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ identityClientId?: string; } @@ -2506,6 +2506,22 @@ export interface RequestReportRecordContract { requestSize?: number; } +/** The response of the list schema operation. */ +export interface GlobalSchemaCollection { + /** + * Global Schema Contract value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GlobalSchemaContract[]; + /** Total record count number. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Paged AccessInformation list representation. */ export interface TenantSettingsCollection { /** @@ -3109,15 +3125,15 @@ export interface ProductContract extends Resource { displayName?: string; } -/** Schema Contract details. */ +/** API Schema Contract details. */ export interface SchemaContract extends Resource { /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. */ contentType?: string; /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ value?: string; - /** Types definitions. Used for OpenAPI v2 (Swagger) schemas only, null otherwise. */ + /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ definitions?: Record; - /** Types definitions. Used for OpenAPI v3 schemas only, null otherwise. */ + /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ components?: Record; } @@ -3141,6 +3157,8 @@ export interface DiagnosticContract extends Resource { verbosity?: Verbosity; /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; } /** Issue Contract details. */ @@ -3755,6 +3773,18 @@ export interface SubscriptionContract extends Resource { allowTracing?: boolean; } +/** Global Schema Contract details. */ +export interface GlobalSchemaContract extends Resource { + /** Schema Type. Immutable. */ + schemaType?: SchemaType; + /** Free-form schema entity description. */ + description?: string; + /** Json-encoded string for non json-based schema. */ + value?: any; + /** Global Schema document object for json-based schema formats(e.g. json schema). */ + document?: Record; +} + /** Tenant Settings. */ export interface TenantSettingsContract extends Resource { /** Tenant settings */ @@ -5174,6 +5204,24 @@ export interface ProductPolicyCreateOrUpdateHeaders { eTag?: string; } +/** Defines headers for GlobalSchema_getEntityTag operation. */ +export interface GlobalSchemaGetEntityTagHeaders { + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; +} + +/** Defines headers for GlobalSchema_get operation. */ +export interface GlobalSchemaGetHeaders { + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; +} + +/** Defines headers for GlobalSchema_createOrUpdate operation. */ +export interface GlobalSchemaCreateOrUpdateHeaders { + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; +} + /** Defines headers for TenantSettings_get operation. */ export interface TenantSettingsGetHeaders { /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ @@ -6464,6 +6512,24 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; +/** Known values of {@link SchemaType} that the service accepts. */ +export enum KnownSchemaType { + /** Xml schema type. */ + Xml = "xml", + /** Json schema type. */ + Json = "json" +} + +/** + * Defines values for SchemaType. \ + * {@link KnownSchemaType} can be used interchangeably with SchemaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **xml**: Xml schema type. \ + * **json**: Json schema type. + */ +export type SchemaType = string; + /** Known values of {@link SettingsTypeName} that the service accepts. */ export enum KnownSettingsTypeName { /** Public */ @@ -9957,6 +10023,68 @@ export interface ReportsListByTimeNextOptionalParams /** Contains response data for the listByTimeNext operation. */ export type ReportsListByTimeNextResponse = ReportCollection; +/** Optional parameters. */ +export interface GlobalSchemaListByServiceOptionalParams + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Contains response data for the listByService operation. */ +export type GlobalSchemaListByServiceResponse = GlobalSchemaCollection; + +/** Optional parameters. */ +export interface GlobalSchemaGetEntityTagOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getEntityTag operation. */ +export type GlobalSchemaGetEntityTagResponse = GlobalSchemaGetEntityTagHeaders; + +/** Optional parameters. */ +export interface GlobalSchemaGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GlobalSchemaGetResponse = GlobalSchemaGetHeaders & + GlobalSchemaContract; + +/** Optional parameters. */ +export interface GlobalSchemaCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type GlobalSchemaCreateOrUpdateResponse = GlobalSchemaCreateOrUpdateHeaders & + GlobalSchemaContract; + +/** Optional parameters. */ +export interface GlobalSchemaDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface GlobalSchemaListByServiceNextOptionalParams + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Contains response data for the listByServiceNext operation. */ +export type GlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; + /** Optional parameters. */ export interface TenantSettingsListByServiceOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts index c67eb9aab5f19..c52a89b3a64d7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts @@ -8044,6 +8044,46 @@ export const RequestReportRecordContract: coreClient.CompositeMapper = { } }; +export const GlobalSchemaCollection: coreClient.CompositeMapper = { + serializedName: "GlobalSchemaCollection", + type: { + name: "Composite", + className: "GlobalSchemaCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GlobalSchemaContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GlobalSchemaContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const TenantSettingsCollection: coreClient.CompositeMapper = { serializedName: "TenantSettingsCollection", type: { @@ -10065,6 +10105,13 @@ export const DiagnosticContract: coreClient.CompositeMapper = { type: { name: "String" } + }, + metrics: { + serializedName: "properties.metrics", + xmlName: "properties.metrics", + type: { + name: "Boolean" + } } } } @@ -12218,6 +12265,46 @@ export const SubscriptionContract: coreClient.CompositeMapper = { } }; +export const GlobalSchemaContract: coreClient.CompositeMapper = { + serializedName: "GlobalSchemaContract", + type: { + name: "Composite", + className: "GlobalSchemaContract", + modelProperties: { + ...Resource.type.modelProperties, + schemaType: { + serializedName: "properties.schemaType", + xmlName: "properties.schemaType", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "any" + } + }, + document: { + serializedName: "properties.document", + xmlName: "properties.document", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + export const TenantSettingsContract: coreClient.CompositeMapper = { serializedName: "TenantSettingsContract", type: { @@ -16438,6 +16525,57 @@ export const ProductPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { } }; +export const GlobalSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { + serializedName: "GlobalSchema_getEntityTagHeaders", + type: { + name: "Composite", + className: "GlobalSchemaGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const GlobalSchemaGetHeaders: coreClient.CompositeMapper = { + serializedName: "GlobalSchema_getHeaders", + type: { + name: "Composite", + className: "GlobalSchemaGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const GlobalSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { + serializedName: "GlobalSchema_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GlobalSchemaCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } + } + } +}; + export const TenantSettingsGetHeaders: coreClient.CompositeMapper = { serializedName: "TenantSettings_getHeaders", type: { diff --git a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts index 154cf17b34203..e3b4552924ee1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts @@ -67,6 +67,7 @@ import { ProductContract as ProductContractMapper, ProductUpdateParameters as ProductUpdateParametersMapper, QuotaCounterValueUpdateContract as QuotaCounterValueUpdateContractMapper, + GlobalSchemaContract as GlobalSchemaContractMapper, SubscriptionCreateParameters as SubscriptionCreateParametersMapper, SubscriptionUpdateParameters as SubscriptionUpdateParametersMapper, AccessInformationCreateParameters as AccessInformationCreateParametersMapper, @@ -473,7 +474,6 @@ export const schemaId: OperationURLParameter = { parameterPath: "schemaId", mapper: { constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), MaxLength: 80, MinLength: 1 }, @@ -1326,6 +1326,11 @@ export const interval: OperationQueryParameter = { } }; +export const parameters53: OperationParameter = { + parameterPath: "parameters", + mapper: GlobalSchemaContractMapper +}; + export const settingsType: OperationURLParameter = { parameterPath: "settingsType", mapper: { @@ -1354,7 +1359,7 @@ export const sid: OperationURLParameter = { } }; -export const parameters53: OperationParameter = { +export const parameters54: OperationParameter = { parameterPath: "parameters", mapper: SubscriptionCreateParametersMapper }; @@ -1381,7 +1386,7 @@ export const appType: OperationQueryParameter = { } }; -export const parameters54: OperationParameter = { +export const parameters55: OperationParameter = { parameterPath: "parameters", mapper: SubscriptionUpdateParametersMapper }; @@ -1398,17 +1403,17 @@ export const accessName: OperationURLParameter = { } }; -export const parameters55: OperationParameter = { +export const parameters56: OperationParameter = { parameterPath: "parameters", mapper: AccessInformationCreateParametersMapper }; -export const parameters56: OperationParameter = { +export const parameters57: OperationParameter = { parameterPath: "parameters", mapper: AccessInformationUpdateParametersMapper }; -export const parameters57: OperationParameter = { +export const parameters58: OperationParameter = { parameterPath: "parameters", mapper: DeployConfigurationParametersMapper }; @@ -1425,22 +1430,22 @@ export const configurationName: OperationURLParameter = { } }; -export const parameters58: OperationParameter = { +export const parameters59: OperationParameter = { parameterPath: "parameters", mapper: SaveConfigurationParameterMapper }; -export const parameters59: OperationParameter = { +export const parameters60: OperationParameter = { parameterPath: "parameters", mapper: UserCreateParametersMapper }; -export const parameters60: OperationParameter = { +export const parameters61: OperationParameter = { parameterPath: "parameters", mapper: UserUpdateParametersMapper }; -export const parameters61: OperationParameter = { +export const parameters62: OperationParameter = { parameterPath: "parameters", mapper: UserTokenParametersMapper }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts index 5d1a03c79e02d..73210a11033e5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts @@ -149,8 +149,7 @@ export class ApiSchemaImpl implements ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param options The options parameters. */ getEntityTag( @@ -172,8 +171,7 @@ export class ApiSchemaImpl implements ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param options The options parameters. */ get( @@ -195,8 +193,7 @@ export class ApiSchemaImpl implements ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param parameters The schema contents to apply. * @param options The options parameters. */ @@ -272,8 +269,7 @@ export class ApiSchemaImpl implements ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param parameters The schema contents to apply. * @param options The options parameters. */ @@ -302,8 +298,7 @@ export class ApiSchemaImpl implements ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header * response of the GET request or it should be * for unconditional update. * @param options The options parameters. diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts new file mode 100644 index 0000000000000..ab9fcee931159 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts @@ -0,0 +1,477 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { GlobalSchema } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ApiManagementClient } from "../apiManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + GlobalSchemaContract, + GlobalSchemaListByServiceNextOptionalParams, + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaListByServiceResponse, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetEntityTagResponse, + GlobalSchemaGetOptionalParams, + GlobalSchemaGetResponse, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaCreateOrUpdateResponse, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaListByServiceNextResponse +} from "../models"; + +/// +/** Class containing GlobalSchema operations. */ +export class GlobalSchemaImpl implements GlobalSchema { + private readonly client: ApiManagementClient; + + /** + * Initialize a new instance of the class GlobalSchema class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } + + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + ); + } + }; + } + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } + } + + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } + + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, options }, + getEntityTagOperationSpec + ); + } + + /** + * Gets the details of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, options }, + getOperationSpec + ); + } + + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GlobalSchemaCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, serviceName, schemaId, parameters, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + schemaId, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes specific Schema. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, ifMatch, options }, + deleteOperationSpec + ); + } + + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GlobalSchemaListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServiceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getEntityTagOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GlobalSchemaGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters53, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer +}; +const listByServiceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts index ad235419a765d..24d2feb9be63f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts @@ -68,6 +68,7 @@ export * from "./quotaByCounterKeys"; export * from "./quotaByPeriodKeys"; export * from "./region"; export * from "./reports"; +export * from "./globalSchema"; export * from "./tenantSettings"; export * from "./apiManagementSkus"; export * from "./subscription"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts index 72b43287bf172..eb0e62a3eb3e5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts @@ -341,7 +341,7 @@ export class PrivateEndpointConnectionOperationsImpl } /** - * Description for Gets the private link resources + * Gets the private link resources * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param options The options parameters. @@ -358,7 +358,7 @@ export class PrivateEndpointConnectionOperationsImpl } /** - * Description for Gets the private link resources + * Gets the private link resources * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param privateLinkSubResourceName Name of the private link resource. diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts index e5e222d16d34f..d9b8c9df2082f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts @@ -407,7 +407,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters53, + requestBody: Parameters.parameters54, queryParameters: [ Parameters.apiVersion, Parameters.notify, @@ -441,7 +441,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters54, + requestBody: Parameters.parameters55, queryParameters: [ Parameters.apiVersion, Parameters.notify, diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts index eec40d025d9c0..e8f18fe46ddf5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts @@ -397,7 +397,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters55, + requestBody: Parameters.parameters56, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -427,7 +427,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters56, + requestBody: Parameters.parameters57, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts index cbe6e6188d05a..ba9c195768290 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts @@ -401,7 +401,7 @@ const deployOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters57, + requestBody: Parameters.parameters58, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -435,7 +435,7 @@ const saveOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters58, + requestBody: Parameters.parameters59, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -469,7 +469,7 @@ const validateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters57, + requestBody: Parameters.parameters58, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts index b5945c6222061..b6a5f3c0799fa 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts @@ -397,7 +397,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters59, + requestBody: Parameters.parameters60, queryParameters: [Parameters.apiVersion, Parameters.notify], urlParameters: [ Parameters.$host, @@ -427,7 +427,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters60, + requestBody: Parameters.parameters61, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -506,7 +506,7 @@ const getSharedAccessTokenOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters61, + requestBody: Parameters.parameters62, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts index 0b320d5f788b2..35d79f66a387c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts @@ -43,8 +43,7 @@ export interface ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param options The options parameters. */ getEntityTag( @@ -60,8 +59,7 @@ export interface ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param options The options parameters. */ get( @@ -77,8 +75,7 @@ export interface ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param parameters The schema contents to apply. * @param options The options parameters. */ @@ -101,8 +98,7 @@ export interface ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param parameters The schema contents to apply. * @param options The options parameters. */ @@ -120,8 +116,7 @@ export interface ApiSchema { * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema identifier within an API. Must be unique in the current API Management - * service instance. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header * response of the GET request or it should be * for unconditional update. * @param options The options parameters. diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts new file mode 100644 index 0000000000000..48f2f78947516 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GlobalSchemaContract, + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetEntityTagResponse, + GlobalSchemaGetOptionalParams, + GlobalSchemaGetResponse, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaCreateOrUpdateResponse, + GlobalSchemaDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a GlobalSchema. */ +export interface GlobalSchema { + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams + ): Promise; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GlobalSchemaCreateOrUpdateResponse + > + >; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific Schema. + * @param resourceGroupName The name of the resource group. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams + ): Promise; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts index ad235419a765d..24d2feb9be63f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts @@ -68,6 +68,7 @@ export * from "./quotaByCounterKeys"; export * from "./quotaByPeriodKeys"; export * from "./region"; export * from "./reports"; +export * from "./globalSchema"; export * from "./tenantSettings"; export * from "./apiManagementSkus"; export * from "./subscription"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts index 6264283499a9b..47769f028af91 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts @@ -112,7 +112,7 @@ export interface PrivateEndpointConnectionOperations { options?: PrivateEndpointConnectionDeleteOptionalParams ): Promise; /** - * Description for Gets the private link resources + * Gets the private link resources * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param options The options parameters. @@ -123,7 +123,7 @@ export interface PrivateEndpointConnectionOperations { options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams ): Promise; /** - * Description for Gets the private link resources + * Gets the private link resources * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param privateLinkSubResourceName Name of the private link resource. diff --git a/sdk/apimanagement/arm-apimanagement/test/sampleTest.ts b/sdk/apimanagement/arm-apimanagement/test/sampleTest.ts new file mode 100644 index 0000000000000..25aeb3ebcc367 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.json b/sdk/apimanagement/arm-apimanagement/tsconfig.json index f92121c033f68..3e6ae96443f33 100644 --- a/sdk/apimanagement/arm-apimanagement/tsconfig.json +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-apimanagement": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"