diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index bd9d228f5c9c..8a820c233e56 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10170,22 +10170,22 @@ packages: dev: false file:projects/arm-features.tgz: - resolution: {integrity: sha512-A10x7G+CHddwetQ+Dy3gelAKc5I/7CFv/Wn/A296MAYWE30qTwAZs72SkhmYRWYTPNYnw6XaPDVeaDJMLimOuA==, tarball: file:projects/arm-features.tgz} + resolution: {integrity: sha512-xw9HgItxghDJbwiaXXuSxFsEe5t+3Sm9vIuyKVmkkYMHk4zGlaVuDfAN+xUeOTlnjhQ7TBa0uyckQvnaRX5FAg==, tarball: file:projects/arm-features.tgz} name: '@rush-temp/arm-features' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -10546,22 +10546,22 @@ packages: dev: false file:projects/arm-links.tgz: - resolution: {integrity: sha512-+9Qoc3Tw6WUEeLcNSS/tSIEm2jGiOWhIYmL/G99sBZXuEdbUG9kO2hi6lwxPCfnaJlGFD5CL1DwM0fz3lX+39Q==, tarball: file:projects/arm-links.tgz} + resolution: {integrity: sha512-Utz+kCDiR+3QBAK7pB0iBpdUi8cEuCxWceTgcinYoPaHTtisHN+LKgLg5K13e+ptO64hJ5W4DFsxl91eiYPn5A==, tarball: file:projects/arm-links.tgz} name: '@rush-temp/arm-links' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -10596,22 +10596,22 @@ packages: dev: false file:projects/arm-locks.tgz: - resolution: {integrity: sha512-EtqWdf/IlUjVucWJRaCQzX4tridLWMfP0jkXNyHbXG0jSDG4GMJtqmNVkZv5kXV1q1Vo9AZF+no+NNUG7savNg==, tarball: file:projects/arm-locks.tgz} + resolution: {integrity: sha512-N4orsMJmesGip5EVaSD5phi6nhx1jdQhhUF7N9uBnosLk32xJqhinZIGkFL1D1LNM72YLk+oQ3jR0DJOJwSLbA==, tarball: file:projects/arm-locks.tgz} name: '@rush-temp/arm-locks' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -10721,22 +10721,22 @@ packages: dev: false file:projects/arm-managedapplications.tgz: - resolution: {integrity: sha512-h+NrdtZ8tDnbjuMUQs3Xp9x7G8V1qmfWtrbo91lozM/w4aCFu0ORDjy9douu9dlCHx2sW0H5iC9nOdiDsdAEsw==, tarball: file:projects/arm-managedapplications.tgz} + resolution: {integrity: sha512-oX2g+2gmn9C7tEb4bEGrjA6yXkP2RR7PG1NlAHDksrDPwmbsRR03139eUDIcF0Hb+quKuRseakzCDYMRcNEP0A==, tarball: file:projects/arm-managedapplications.tgz} name: '@rush-temp/arm-managedapplications' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -11221,22 +11221,22 @@ packages: dev: false file:projects/arm-policy.tgz: - resolution: {integrity: sha512-lpuxhmL5AQtn8qN3RM77tjn0XNyGIyMinXXKo1bYPHvWW8C3UR6YkNVWNAMDDqDfasEvIJ6EyVlVmXcSI51noA==, tarball: file:projects/arm-policy.tgz} + resolution: {integrity: sha512-a/9y5aQmt81i9+TUD4TEXZvhih78ohaVG8NbUC2MrRjwR7d5C16dUQualEY/4ziZppqS21SOFV8ZcdG7vlPtkg==, tarball: file:projects/arm-policy.tgz} name: '@rush-temp/arm-policy' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -11721,22 +11721,22 @@ packages: dev: false file:projects/arm-resources-subscriptions.tgz: - resolution: {integrity: sha512-p66ofxJnT0I+Oc4eH/BaMqZqKS+KtE7AOwiC598oWe5lMpX/RJ+os2mSCZt2J8xhajI17P/sZjlxSSJNtocjeg==, tarball: file:projects/arm-resources-subscriptions.tgz} + resolution: {integrity: sha512-Y8XL95tGixEM0br4pDJgRVqqa4CZWJRbu1SGkBtHZNKbpJ1aU3OXeei1dk84bEtu+FvjDh3j2QOFKKhnMoSFgA==, tarball: file:projects/arm-resources-subscriptions.tgz} name: '@rush-temp/arm-resources-subscriptions' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -11746,22 +11746,22 @@ packages: dev: false file:projects/arm-resources.tgz: - resolution: {integrity: sha512-ccH8okJMyZ8WxGKVGU67ywTewBADAsF92PFJmONlWwvtFM3QgTojnZPT5+cAVGiowR/ZoEd1J+ytbLLS30aPnQ==, tarball: file:projects/arm-resources.tgz} + resolution: {integrity: sha512-dZ/z3nCQ43lFVZpX8UP+Juqk9IkSNc7thAziWRyWzYXOB34A1o228B0+2J24lPnO07cU/tuyQb9jeBMzCy4ydQ==, tarball: file:projects/arm-resources.tgz} name: '@rush-temp/arm-resources' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -12298,22 +12298,22 @@ packages: dev: false file:projects/arm-templatespecs.tgz: - resolution: {integrity: sha512-eiLIXwwPrdcn8GYroZPkrGc+DxnLeQqsuMYxLJp94+wXKYzCurH5adeqfaZNaFJ/4Px/+FKP6SwJNGPmw8UMcA==, tarball: file:projects/arm-templatespecs.tgz} + resolution: {integrity: sha512-r1KzXFTfAwSRaLKrPywoEtLobNOhPsp+wwWta65dk3Yp27sLhJthf1JqNo33+ivhPluWGOOge6h5bI3JGGJBGg==, tarball: file:projects/arm-templatespecs.tgz} name: '@rush-temp/arm-templatespecs' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -12966,7 +12966,7 @@ packages: dev: false file:projects/container-registry.tgz: - resolution: {integrity: sha512-DBJrNjfBDQPpuhuC1CK2Tf09gwxZR8AFbUUmjOkxzU4Ra4+k8WNYyADJUQPWDxUnCg+/wckXoRZL/jkX39lpSg==, tarball: file:projects/container-registry.tgz} + resolution: {integrity: sha512-EFTZnQnEhHbqmL1CZJWw7bgI7vYq4WRTRkjsjf8ixNAarMw/NVp3eLd+skni99Hs4F+x4ZhIihyjSIExV5yLJA==, tarball: file:projects/container-registry.tgz} name: '@rush-temp/container-registry' version: 0.0.0 dependencies: @@ -13007,7 +13007,6 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -15786,7 +15785,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-Wxf71HaHGk3OUsxKZVuBej88ap8Pft5N//7ZiLUVN3If1B+1fCanIE/T52XQhsyBXWsgvQFKFTehFLaryX4eIQ==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-2ZH8fLmpPVmWUGAVGdmZ8P0MjIFOKfaaovnt9M901HdH6hzf7cA0zDJWrYWUdyBdWlJWr9/lcc7hNJgNHvRADw==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/locks/arm-locks/CHANGELOG.md b/sdk/locks/arm-locks/CHANGELOG.md index b53dea671dec..a868fe45d4e5 100644 --- a/sdk/locks/arm-locks/CHANGELOG.md +++ b/sdk/locks/arm-locks/CHANGELOG.md @@ -1,15 +1,18 @@ # Release History - -## 2.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 2.1.0 (2022-02-11) + +**Features** + + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface SystemData + - Added Type Alias CreatedByType + - Interface ManagementLockObject has a new optional parameter systemData + - Added Enum KnownCreatedByType + + ## 2.0.0 (2021-12-07) The package of @azure/arm-locks is using our next generation design principles since version 2.0.0, which contains breaking changes. diff --git a/sdk/locks/arm-locks/LICENSE b/sdk/locks/arm-locks/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/locks/arm-locks/LICENSE +++ b/sdk/locks/arm-locks/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/locks/arm-locks/_meta.json b/sdk/locks/arm-locks/_meta.json index 0551b4fe18f8..1e047f46ceb1 100644 --- a/sdk/locks/arm-locks/_meta.json +++ b/sdk/locks/arm-locks/_meta.json @@ -1,7 +1,7 @@ { - "commit": "a42f1b58607091c4f255ead152a8ef323fa0b280", + "commit": "e241be5cacfd5d370c037c58816484951b6bb5f3", "readme": "specification/resources/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/locks/arm-locks/api-extractor.json b/sdk/locks/arm-locks/api-extractor.json index e46bea0263c1..d62f01cf7a13 100644 --- a/sdk/locks/arm-locks/api-extractor.json +++ b/sdk/locks/arm-locks/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-locks.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/locks/arm-locks/package.json b/sdk/locks/arm-locks/package.json index 8c83b195d05f..7868c34b72f0 100644 --- a/sdk/locks/arm-locks/package.json +++ b/sdk/locks/arm-locks/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ManagementLockClient.", - "version": "2.0.1", + "version": "2.1.0", "engines": { "node": ">=12.0.0" }, @@ -27,12 +27,12 @@ "types": "./types/arm-locks.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -97,4 +97,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/locks/arm-locks/review/arm-locks.api.md b/sdk/locks/arm-locks/review/arm-locks.api.md index ee557e92a29a..ed24ef0cfafc 100644 --- a/sdk/locks/arm-locks/review/arm-locks.api.md +++ b/sdk/locks/arm-locks/review/arm-locks.api.md @@ -27,6 +27,41 @@ export interface AuthorizationOperationsListOptionalParams extends coreClient.Op // @public export type AuthorizationOperationsListResponse = OperationListResult; +// @public +export type CreatedByType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + 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 { + error?: ErrorDetail; +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + // @public export enum KnownLockLevel { // (undocumented) @@ -75,6 +110,7 @@ export interface ManagementLockObject { readonly name?: string; notes?: string; owners?: ManagementLockOwner[]; + readonly systemData?: SystemData; readonly type?: string; } @@ -258,6 +294,16 @@ export interface OperationListResult { value?: Operation[]; } +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/locks/arm-locks/src/managementLockClient.ts b/sdk/locks/arm-locks/src/managementLockClient.ts index 2ee5e068cdf0..0479e1bcdb55 100644 --- a/sdk/locks/arm-locks/src/managementLockClient.ts +++ b/sdk/locks/arm-locks/src/managementLockClient.ts @@ -47,7 +47,7 @@ export class ManagementLockClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-locks/2.0.0`; + const packageDetails = `azsdk-js-arm-locks/2.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -70,7 +70,7 @@ export class ManagementLockClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2016-09-01"; + this.apiVersion = options.apiVersion || "2020-05-01"; this.authorizationOperations = new AuthorizationOperationsImpl(this); this.managementLocks = new ManagementLocksImpl(this); } diff --git a/sdk/locks/arm-locks/src/models/index.ts b/sdk/locks/arm-locks/src/models/index.ts index f6a3353be403..29afc984fb9c 100644 --- a/sdk/locks/arm-locks/src/models/index.ts +++ b/sdk/locks/arm-locks/src/models/index.ts @@ -34,6 +34,55 @@ export interface OperationDisplay { operation?: 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 ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** The lock information. */ export interface ManagementLockObject { /** @@ -51,6 +100,11 @@ export interface ManagementLockObject { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; /** The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. */ level: LockLevel; /** Notes about the lock. Maximum of 512 characters. */ @@ -65,6 +119,22 @@ export interface ManagementLockOwner { applicationId?: string; } +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + /** The list of locks. */ export interface ManagementLockListResult { /** The list of locks. */ @@ -91,6 +161,26 @@ export enum KnownLockLevel { */ export type LockLevel = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Optional parameters. */ export interface AuthorizationOperationsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/locks/arm-locks/src/models/mappers.ts b/sdk/locks/arm-locks/src/models/mappers.ts index df8752f1895d..f165718080fd 100644 --- a/sdk/locks/arm-locks/src/models/mappers.ts +++ b/sdk/locks/arm-locks/src/models/mappers.ts @@ -84,6 +84,102 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + export const ManagementLockObject: coreClient.CompositeMapper = { type: { name: "Composite", @@ -110,6 +206,13 @@ export const ManagementLockObject: coreClient.CompositeMapper = { name: "String" } }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, level: { serializedName: "properties.level", required: true, @@ -154,6 +257,51 @@ export const ManagementLockOwner: coreClient.CompositeMapper = { } }; +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const ManagementLockListResult: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/locks/arm-locks/src/models/parameters.ts b/sdk/locks/arm-locks/src/models/parameters.ts index 936bb3919e07..6df49f707d76 100644 --- a/sdk/locks/arm-locks/src/models/parameters.ts +++ b/sdk/locks/arm-locks/src/models/parameters.ts @@ -40,7 +40,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2016-09-01", + defaultValue: "2020-05-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/locks/arm-locks/src/operations/authorizationOperations.ts b/sdk/locks/arm-locks/src/operations/authorizationOperations.ts index 75981ed9b691..e50ea4539228 100644 --- a/sdk/locks/arm-locks/src/operations/authorizationOperations.ts +++ b/sdk/locks/arm-locks/src/operations/authorizationOperations.ts @@ -109,6 +109,9 @@ const listOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -122,6 +125,9 @@ const listNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/locks/arm-locks/src/operations/managementLocks.ts b/sdk/locks/arm-locks/src/operations/managementLocks.ts index 5415f161e012..ef00559c4ca6 100644 --- a/sdk/locks/arm-locks/src/operations/managementLocks.ts +++ b/sdk/locks/arm-locks/src/operations/managementLocks.ts @@ -780,6 +780,9 @@ const createOrUpdateAtResourceGroupLevelOperationSpec: coreClient.OperationSpec }, 201: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters, @@ -798,7 +801,13 @@ const deleteAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}", httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -806,6 +815,7 @@ const deleteAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { Parameters.lockName, Parameters.subscriptionId ], + headerParameters: [Parameters.accept], serializer }; const getAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { @@ -815,6 +825,9 @@ const getAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -836,6 +849,9 @@ const createOrUpdateByScopeOperationSpec: coreClient.OperationSpec = { }, 201: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters, @@ -848,9 +864,16 @@ const createOrUpdateByScopeOperationSpec: coreClient.OperationSpec = { const deleteByScopeOperationSpec: coreClient.OperationSpec = { path: "/{scope}/providers/Microsoft.Authorization/locks/{lockName}", httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.lockName, Parameters.scope], + headerParameters: [Parameters.accept], serializer }; const getByScopeOperationSpec: coreClient.OperationSpec = { @@ -859,6 +882,9 @@ const getByScopeOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -876,6 +902,9 @@ const createOrUpdateAtResourceLevelOperationSpec: coreClient.OperationSpec = { }, 201: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters, @@ -898,7 +927,13 @@ const deleteAtResourceLevelOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}", httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -910,6 +945,7 @@ const deleteAtResourceLevelOperationSpec: coreClient.OperationSpec = { Parameters.resourceType, Parameters.resourceName ], + headerParameters: [Parameters.accept], serializer }; const getAtResourceLevelOperationSpec: coreClient.OperationSpec = { @@ -919,6 +955,9 @@ const getAtResourceLevelOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -945,6 +984,9 @@ const createOrUpdateAtSubscriptionLevelOperationSpec: coreClient.OperationSpec = }, 201: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters, @@ -962,13 +1004,20 @@ const deleteAtSubscriptionLevelOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}", httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.lockName, Parameters.subscriptionId ], + headerParameters: [Parameters.accept], serializer }; const getAtSubscriptionLevelOperationSpec: coreClient.OperationSpec = { @@ -978,6 +1027,9 @@ const getAtSubscriptionLevelOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockObject + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -996,6 +1048,9 @@ const listAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1014,6 +1069,9 @@ const listAtResourceLevelOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1036,6 +1094,9 @@ const listAtSubscriptionLevelOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1049,6 +1110,9 @@ const listByScopeOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1062,6 +1126,9 @@ const listAtResourceGroupLevelNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1080,6 +1147,9 @@ const listAtResourceLevelNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1102,6 +1172,9 @@ const listAtSubscriptionLevelNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], @@ -1119,6 +1192,9 @@ const listByScopeNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ManagementLockListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion, Parameters.filter], diff --git a/sdk/locks/arm-locks/test/sampleTest.ts b/sdk/locks/arm-locks/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/locks/arm-locks/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/locks/arm-locks/tsconfig.json b/sdk/locks/arm-locks/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/locks/arm-locks/tsconfig.json +++ b/sdk/locks/arm-locks/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file