diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 99321d0907bc..097f3b10fde7 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '6.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false dependencies: @@ -4495,7 +4495,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231030 + typescript: 5.4.0-dev.20231113 dev: false /eastasianwidth@0.2.0: @@ -9261,8 +9261,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231030: - resolution: {integrity: sha512-azWrF0lAiu8cBHNr6yq3RDkU/DtQScvT48ea3Ngq6oXJ/GPO0n96wCFSRQA5UbZlVVf3fAAqsUfvOdohRbrPVg==} + /typescript@5.4.0-dev.20231113: + resolution: {integrity: sha512-5K165L/tImARYZDKwwT2ER9qKt0n56E8jxldXfAVpq8qNqX5o2SvpoPrzCi+eddkHJHl1gPf26xiE+7R6//1Gg==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -11244,19 +11244,22 @@ packages: dev: false file:projects/arm-changes.tgz: - resolution: {integrity: sha512-U+53YLqBl3DmErXW9glVzD+hP6pA58tpTcHqN13AL6aru5tQawBPW/utqB/usJIKGcBkZVVkVScxSU+YBSVNow==, tarball: file:projects/arm-changes.tgz} + resolution: {integrity: sha512-IoZQZqVTX4O5LvlxANEL8hINywPKDllOOg5qn8ml5LJpsWEZKoxqwJN/LbkmXw/UGKCXh53ZHqQHPd7BANAbsA==, tarball: file:projects/arm-changes.tgz} name: '@rush-temp/arm-changes' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -12672,19 +12675,22 @@ packages: dev: false file:projects/arm-features.tgz: - resolution: {integrity: sha512-73VI4IzvKvfyxA73Z92X5QZfVjbR7AB7d/4hHd2HnfimfCbRZYE0ymm+YzERPQ+gvCSqcrnpCXqha9JMgfUT1Q==, tarball: file:projects/arm-features.tgz} + resolution: {integrity: sha512-NXeHywRnaUSRdFF+vpIsYDGej8NH5P8SBY85GotGH3aDvuiISFLiw2tma4wDAcTu9Kk6ZnlJcyBYxpJvbwD1PQ==, tarball: file:projects/arm-features.tgz} name: '@rush-temp/arm-features' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -13266,19 +13272,22 @@ packages: dev: false file:projects/arm-links.tgz: - resolution: {integrity: sha512-QnQUc0vJ/Saqt/0YmlnG1jxOfGFn4+leDjpLVE0Gnh9MKnLESwDO29wVpI4O+85u6rOgVX26vjgl/uJYaY9VYw==, tarball: file:projects/arm-links.tgz} + resolution: {integrity: sha512-yWyTzzPDk4jWoCvycP6C+q/ZR0dtUKpFqjV0t235Z2tJFFmTCQw/qECNh7af8LbLwxDDkYM2OyKwV4fpzI1Gxw==, tarball: file:projects/arm-links.tgz} name: '@rush-temp/arm-links' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -13340,19 +13349,22 @@ packages: dev: false file:projects/arm-locks.tgz: - resolution: {integrity: sha512-94xTc2vXU8VXC0dNd7kFQuGTQGuKxmkC8/v834Ls2TVSOM8IlFPzYwzDBOksNSXMo5+GHOUuNZlV7MXAZwvSNg==, tarball: file:projects/arm-locks.tgz} + resolution: {integrity: sha512-Qta5O/juj+vMo5M9P2IGAAg4Q2zMOG98sfxgoHW29m5lDrvNHyfRWYzB3FZGa/q9zy4mKL7/VP/14LqqDefJUA==, tarball: file:projects/arm-locks.tgz} name: '@rush-temp/arm-locks' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -13484,20 +13496,22 @@ packages: dev: false file:projects/arm-managedapplications.tgz: - resolution: {integrity: sha512-TXwaskNL9KGRS7hlbbePM6Cz9U+GBcfbaGIWQX/sJL26IdYy7iw3CjjQfiXb7y8bQy/37OvbcbIErPz6MNI7eA==, tarball: file:projects/arm-managedapplications.tgz} + resolution: {integrity: sha512-P2fGjmfU1HujB69+c2B/H8FfUN0CRk9Ppkzb3gHI2/z8vsPXTMuVwlVsb3V++AR58PHaHBh90wTQHdcDvb1CZQ==, tarball: file:projects/arm-managedapplications.tgz} name: '@rush-temp/arm-managedapplications' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -14319,20 +14333,22 @@ packages: dev: false file:projects/arm-policy.tgz: - resolution: {integrity: sha512-/dhmPL/hUyUFBeA/k+1Ex91Deni5MOfUdESJsLZf9oiDhsQ0V+pUve/VPCCTPsEykUDOe1gsV5MeifYikk+1Sg==, tarball: file:projects/arm-policy.tgz} + resolution: {integrity: sha512-X+uRjHvIL7SbVz1nr9vDhJjnGWBUuAKuDj9F3NFvbik8+pLYBIVXLIXNc87r8S80RjWm06MM2oYRBhZZDMW7sw==, tarball: file:projects/arm-policy.tgz} name: '@rush-temp/arm-policy' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -14939,20 +14955,22 @@ packages: dev: false file:projects/arm-resources-subscriptions.tgz: - resolution: {integrity: sha512-YHy6SVysSN0aGFDukP9Qs6+gPgHGP7TTMm/XukH5QfSb1zC5qfXL+jzHCHHfIsooTiJcRk9aYHHFxpoBqhnZ8w==, tarball: file:projects/arm-resources-subscriptions.tgz} + resolution: {integrity: sha512-To/H5lb6H5b+iXA05h8vVVAFV2172cUpMjDGA9JFKu8epZPhXH0TBze5A17cfZT+dx1rk7dCIoXy+cC4zYqehg==, tarball: file:projects/arm-resources-subscriptions.tgz} name: '@rush-temp/arm-resources-subscriptions' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -14964,20 +14982,22 @@ packages: dev: false file:projects/arm-resources.tgz: - resolution: {integrity: sha512-ws2q0Vy1XQtuQ49TTUZflbpF8KzNPc4ZmsXkPSSt74DGobaMJeW9dSrU3TwjtxDJ5hiKVYpe4SXVujDYmckHvg==, tarball: file:projects/arm-resources.tgz} + resolution: {integrity: sha512-7SxmLyKRl2wuoM1ask677P5Om+oxLQx5FW+eMma80uJH/5U8+Pu6xX4nTXaTYZQlRWxFseJOXIA47nLTU80qjA==, tarball: file:projects/arm-resources.tgz} name: '@rush-temp/arm-resources' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -15801,19 +15821,22 @@ packages: dev: false file:projects/arm-templatespecs.tgz: - resolution: {integrity: sha512-AQ1/4GfE52L7URXCOgJogRx8mmaYdddU22c04o+OcyeVVe5kZCBoHrazzv3HYucih9qubMB/BScsBXWC+VyYQQ==, tarball: file:projects/arm-templatespecs.tgz} + resolution: {integrity: sha512-nb1TNYl2Nd+mcLDQbqXgxuOST9N3yzh+8wIBN9mKn1n9pijzoT67koIX4dj6mSB5cjx/WciWy3uhwAyugLntRA==, tarball: file:projects/arm-templatespecs.tgz} name: '@rush-temp/arm-templatespecs' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -20375,7 +20398,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-2LtIcl6t12irIaBaBSP/ytxkJA5VSRJ2RUg08UJEi/NVLHhjpx+NQQn/a/ebeAwpa2DefdSkfHRhgh7zn8Qzzg==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-nBVNUHVbjsSyKfoA2uJNvG+jlJEW9Oq12K9Oha1C6GVY1rZhEpcWrkob0RJe/sCDdrMo0MBUnvL7+PkUsvhR8w==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: diff --git a/sdk/managedapplications/arm-managedapplications/CHANGELOG.md b/sdk/managedapplications/arm-managedapplications/CHANGELOG.md index 6fbeb26cf5f5..7f8f77d417c4 100644 --- a/sdk/managedapplications/arm-managedapplications/CHANGELOG.md +++ b/sdk/managedapplications/arm-managedapplications/CHANGELOG.md @@ -1,5 +1,118 @@ # Release History +## 4.0.0 (2023-11-14) + +**Features** + + - Added operation ApplicationDefinitions.beginCreateOrUpdate + - Added operation ApplicationDefinitions.beginCreateOrUpdateAndWait + - Added operation ApplicationDefinitions.beginCreateOrUpdateById + - Added operation ApplicationDefinitions.beginCreateOrUpdateByIdAndWait + - Added operation ApplicationDefinitions.beginDelete + - Added operation ApplicationDefinitions.beginDeleteAndWait + - Added operation ApplicationDefinitions.beginDeleteById + - Added operation ApplicationDefinitions.beginDeleteByIdAndWait + - Added operation Applications.update + - Added operation Applications.updateById + - Added Interface ApplicationProviderAuthorization + - Interface ApplicationDefinitionsCreateOrUpdateByIdOptionalParams has a new optional parameter resumeFrom + - Interface ApplicationDefinitionsCreateOrUpdateByIdOptionalParams has a new optional parameter updateIntervalInMs + - Interface ApplicationDefinitionsCreateOrUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ApplicationDefinitionsCreateOrUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface ApplicationDefinitionsDeleteByIdOptionalParams has a new optional parameter resumeFrom + - Interface ApplicationDefinitionsDeleteByIdOptionalParams has a new optional parameter updateIntervalInMs + - Interface ApplicationDefinitionsDeleteOptionalParams has a new optional parameter resumeFrom + - Interface ApplicationDefinitionsDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface ErrorResponse has a new optional parameter errorCode + - Interface ErrorResponse has a new optional parameter errorMessage + - Interface ErrorResponse has a new optional parameter httpStatus + - Interface GenericResource has a new optional parameter identity + - Enum KnownProvisioningState has a new value Created + - Enum KnownProvisioningState has a new value Creating + - Enum KnownProvisioningState has a new value Ready + +**Breaking Changes** + + - Removed operation group JitRequests + - Removed operation ApplicationDefinitions.createOrUpdate + - Removed operation ApplicationDefinitions.createOrUpdateById + - Removed operation ApplicationDefinitions.delete + - Removed operation ApplicationDefinitions.deleteById + - Removed operation ApplicationDefinitions.listBySubscription + - Removed operation ApplicationDefinitions.update + - Removed operation ApplicationDefinitions.updateById + - Removed operation Applications.beginRefreshPermissions + - Removed operation Applications.beginRefreshPermissionsAndWait + - Removed operation Applications.beginUpdate + - Removed operation Applications.beginUpdateAccess + - Removed operation Applications.beginUpdateAccessAndWait + - Removed operation Applications.beginUpdateAndWait + - Removed operation Applications.beginUpdateById + - Removed operation Applications.beginUpdateByIdAndWait + - Removed operation Applications.listAllowedUpgradePlans + - Removed operation Applications.listTokens + - Interface Application no longer has parameter artifacts + - Interface Application no longer has parameter authorizations + - Interface Application no longer has parameter billingDetails + - Interface Application no longer has parameter createdBy + - Interface Application no longer has parameter customerSupport + - Interface Application no longer has parameter jitAccessPolicy + - Interface Application no longer has parameter managementMode + - Interface Application no longer has parameter publisherTenantId + - Interface Application no longer has parameter supportUrls + - Interface Application no longer has parameter updatedBy + - Interface ApplicationDefinition no longer has parameter deploymentPolicy + - Interface ApplicationDefinition no longer has parameter lockingPolicy + - Interface ApplicationDefinition no longer has parameter managementPolicy + - Interface ApplicationDefinition no longer has parameter notificationPolicy + - Interface ApplicationDefinition no longer has parameter policies + - Interface ApplicationDefinition no longer has parameter storageAccountId + - Interface ApplicationPatchable no longer has parameter artifacts + - Interface ApplicationPatchable no longer has parameter authorizations + - Interface ApplicationPatchable no longer has parameter billingDetails + - Interface ApplicationPatchable no longer has parameter createdBy + - Interface ApplicationPatchable no longer has parameter customerSupport + - Interface ApplicationPatchable no longer has parameter jitAccessPolicy + - Interface ApplicationPatchable no longer has parameter managementMode + - Interface ApplicationPatchable no longer has parameter publisherTenantId + - Interface ApplicationPatchable no longer has parameter supportUrls + - Interface ApplicationPatchable no longer has parameter updatedBy + - Interface ApplicationsUpdateByIdOptionalParams no longer has parameter resumeFrom + - Interface ApplicationsUpdateByIdOptionalParams no longer has parameter updateIntervalInMs + - Interface ApplicationsUpdateOptionalParams no longer has parameter resumeFrom + - Interface ApplicationsUpdateOptionalParams no longer has parameter updateIntervalInMs + - Interface ErrorResponse no longer has parameter error + - Interface Identity no longer has parameter userAssignedIdentities + - Interface Operation no longer has parameter actionType + - Interface Operation no longer has parameter isDataAction + - Interface Operation no longer has parameter origin + - Interface OperationDisplay no longer has parameter description + - Interface Resource no longer has parameter systemData + - Parameter managedResourceGroupId of interface Application is now required + - Parameter authorizations of interface ApplicationDefinition is now required + - Type of parameter name of interface ApplicationArtifact is changed from ApplicationArtifactName to string + - Type of parameter artifacts of interface ApplicationDefinition is changed from ApplicationDefinitionArtifact[] to ApplicationArtifact[] + - Type of parameter authorizations of interface ApplicationDefinition is changed from ApplicationAuthorization[] to ApplicationProviderAuthorization[] + - Type of parameter isEnabled of interface ApplicationDefinition is changed from boolean to string + - Type of parameter parameters of interface ApplicationsUpdateByIdOptionalParams is changed from ApplicationPatchable to Application + - Type of parameter type of interface Identity is changed from ResourceIdentityType to "SystemAssigned" + - Class ApplicationClient no longer has parameter jitRequests + - Removed Enum KnownActionType + - Removed Enum KnownApplicationArtifactName + - Removed Enum KnownApplicationDefinitionArtifactName + - Removed Enum KnownApplicationManagementMode + - Removed Enum KnownCreatedByType + - Removed Enum KnownDeploymentMode + - Removed Enum KnownJitApprovalMode + - Removed Enum KnownJitApproverType + - Removed Enum KnownJitRequestState + - Removed Enum KnownJitSchedulingType + - Removed Enum KnownOrigin + - Removed Enum KnownStatus + - Removed Enum KnownSubstatus + - Enum KnownProvisioningState no longer has value NotSpecified + + ## 3.0.0 (2023-09-06) **Features** @@ -207,4 +320,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/managedapplications/arm-managedapplications/_meta.json b/sdk/managedapplications/arm-managedapplications/_meta.json index 91d39c38b229..3f6c4ed12d09 100644 --- a/sdk/managedapplications/arm-managedapplications/_meta.json +++ b/sdk/managedapplications/arm-managedapplications/_meta.json @@ -1,8 +1,8 @@ { - "commit": "baa82396a21dcc1c79a6aeea185589749515012d", - "readme": "specification/solutions/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --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\\solutions\\resource-manager\\readme.md --use=@autorest/typescript@6.0.8 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.8" + "commit": "5c6dd74a84214a512f2eba2339e688d93c0b5b3d", + "readme": "specification/resources/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", + "repository_url": "https://github.com/openapi-env-test/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/managedapplications/arm-managedapplications/package.json b/sdk/managedapplications/arm-managedapplications/package.json index be14607cd1ac..fb12314865d2 100644 --- a/sdk/managedapplications/arm-managedapplications/package.json +++ b/sdk/managedapplications/arm-managedapplications/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ApplicationClient.", - "version": "3.0.0", + "version": "4.0.0", "engines": { "node": ">=18.0.0" }, @@ -32,18 +32,20 @@ "mkdirp": "^2.1.2", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "ts-node": "^10.0.0", - "@azure/dev-tool": "^1.0.0" + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -77,7 +79,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,13 +107,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managedapplications/arm-managedapplications", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-managedapplications?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managedapplications/arm-managedapplications" } \ No newline at end of file diff --git a/sdk/managedapplications/arm-managedapplications/review/arm-managedapplications.api.md b/sdk/managedapplications/arm-managedapplications/review/arm-managedapplications.api.md index 1d237eded796..5e482eb6142f 100644 --- a/sdk/managedapplications/arm-managedapplications/review/arm-managedapplications.api.md +++ b/sdk/managedapplications/arm-managedapplications/review/arm-managedapplications.api.md @@ -10,59 +10,26 @@ import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; -// @public -export type ActionType = string; - -// @public -export interface AllowedUpgradePlansResult { - value?: Plan[]; -} - // @public export interface Application extends GenericResource { applicationDefinitionId?: string; - readonly artifacts?: ApplicationArtifact[]; - readonly authorizations?: ApplicationAuthorization[]; - readonly billingDetails?: ApplicationBillingDetailsDefinition; - readonly createdBy?: ApplicationClientDetails; - readonly customerSupport?: ApplicationPackageContact; - identity?: Identity; - jitAccessPolicy?: ApplicationJitAccessPolicy; kind: string; - managedResourceGroupId?: string; - readonly managementMode?: ApplicationManagementMode; + managedResourceGroupId: string; readonly outputs?: Record; parameters?: Record; plan?: Plan; readonly provisioningState?: ProvisioningState; - readonly publisherTenantId?: string; - readonly supportUrls?: ApplicationPackageSupportUrls; - readonly updatedBy?: ApplicationClientDetails; } // @public export interface ApplicationArtifact { - name: ApplicationArtifactName; - type: ApplicationArtifactType; - uri: string; -} - -// @public -export type ApplicationArtifactName = string; - -// @public -export type ApplicationArtifactType = "NotSpecified" | "Template" | "Custom"; - -// @public -export interface ApplicationAuthorization { - principalId: string; - roleDefinitionId: string; + name?: string; + type?: ApplicationArtifactType; + uri?: string; } // @public -export interface ApplicationBillingDetailsDefinition { - resourceUsageId?: string; -} +export type ApplicationArtifactType = "Template" | "Custom"; // @public (undocumented) export class ApplicationClient extends coreClient.ServiceClient { @@ -76,20 +43,11 @@ export class ApplicationClient extends coreClient.ServiceClient { applicationDefinitions: ApplicationDefinitions; // (undocumented) applications: Applications; - // (undocumented) - jitRequests: JitRequests; listOperations(options?: ListOperationsOptionalParams): PagedAsyncIterableIterator; // (undocumented) subscriptionId?: string; } -// @public -export interface ApplicationClientDetails { - applicationId?: string; - oid?: string; - puid?: string; -} - // @public export interface ApplicationClientOptionalParams extends coreClient.ServiceClientOptions { $host?: string; @@ -99,62 +57,42 @@ export interface ApplicationClientOptionalParams extends coreClient.ServiceClien // @public export interface ApplicationDefinition extends GenericResource { - artifacts?: ApplicationDefinitionArtifact[]; - authorizations?: ApplicationAuthorization[]; + artifacts?: ApplicationArtifact[]; + authorizations: ApplicationProviderAuthorization[]; createUiDefinition?: Record; - deploymentPolicy?: ApplicationDeploymentPolicy; description?: string; displayName?: string; - isEnabled?: boolean; - lockingPolicy?: ApplicationPackageLockingPolicyDefinition; + isEnabled?: string; lockLevel: ApplicationLockLevel; mainTemplate?: Record; - managementPolicy?: ApplicationManagementPolicy; - notificationPolicy?: ApplicationNotificationPolicy; packageFileUri?: string; - policies?: ApplicationPolicy[]; - storageAccountId?: string; } -// @public -export interface ApplicationDefinitionArtifact { - name: ApplicationDefinitionArtifactName; - type: ApplicationArtifactType; - uri: string; -} - -// @public -export type ApplicationDefinitionArtifactName = string; - // @public export interface ApplicationDefinitionListResult { nextLink?: string; value?: ApplicationDefinition[]; } -// @public -export interface ApplicationDefinitionPatchable { - tags?: { - [propertyName: string]: string; - }; -} - // @public export interface ApplicationDefinitions { - createOrUpdate(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateOptionalParams): Promise; - createOrUpdateById(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams): Promise; - delete(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteOptionalParams): Promise; - deleteById(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteByIdOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateOptionalParams): Promise, ApplicationDefinitionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateOptionalParams): Promise; + beginCreateOrUpdateById(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams): Promise, ApplicationDefinitionsCreateOrUpdateByIdResponse>>; + beginCreateOrUpdateByIdAndWait(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams): Promise; + beginDelete(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteOptionalParams): Promise; + beginDeleteById(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteByIdOptionalParams): Promise, void>>; + beginDeleteByIdAndWait(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteByIdOptionalParams): Promise; get(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsGetOptionalParams): Promise; getById(resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsGetByIdOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ApplicationDefinitionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ApplicationDefinitionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinitionPatchable, options?: ApplicationDefinitionsUpdateOptionalParams): Promise; - updateById(resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinitionPatchable, options?: ApplicationDefinitionsUpdateByIdOptionalParams): Promise; } // @public export interface ApplicationDefinitionsCreateOrUpdateByIdOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -162,6 +100,8 @@ export type ApplicationDefinitionsCreateOrUpdateByIdResponse = ApplicationDefini // @public export interface ApplicationDefinitionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -169,10 +109,14 @@ export type ApplicationDefinitionsCreateOrUpdateResponse = ApplicationDefinition // @public export interface ApplicationDefinitionsDeleteByIdOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public export interface ApplicationDefinitionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -203,47 +147,6 @@ export interface ApplicationDefinitionsListByResourceGroupOptionalParams extends // @public export type ApplicationDefinitionsListByResourceGroupResponse = ApplicationDefinitionListResult; -// @public -export interface ApplicationDefinitionsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationDefinitionsListBySubscriptionNextResponse = ApplicationDefinitionListResult; - -// @public -export interface ApplicationDefinitionsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationDefinitionsListBySubscriptionResponse = ApplicationDefinitionListResult; - -// @public -export interface ApplicationDefinitionsUpdateByIdOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationDefinitionsUpdateByIdResponse = ApplicationDefinition; - -// @public -export interface ApplicationDefinitionsUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationDefinitionsUpdateResponse = ApplicationDefinition; - -// @public -export interface ApplicationDeploymentPolicy { - deploymentMode: DeploymentMode; -} - -// @public -export interface ApplicationJitAccessPolicy { - jitAccessEnabled: boolean; - jitApprovalMode?: JitApprovalMode; - jitApprovers?: JitApproverDefinition[]; - maximumJitAccessDuration?: string; -} - // @public export interface ApplicationListResult { nextLink?: string; @@ -253,70 +156,21 @@ export interface ApplicationListResult { // @public export type ApplicationLockLevel = "CanNotDelete" | "ReadOnly" | "None"; -// @public -export type ApplicationManagementMode = string; - -// @public -export interface ApplicationManagementPolicy { - mode?: ApplicationManagementMode; -} - -// @public -export interface ApplicationNotificationEndpoint { - uri: string; -} - -// @public -export interface ApplicationNotificationPolicy { - notificationEndpoints: ApplicationNotificationEndpoint[]; -} - -// @public -export interface ApplicationPackageContact { - contactName?: string; - email: string; - phone: string; -} - -// @public -export interface ApplicationPackageLockingPolicyDefinition { - allowedActions?: string[]; - allowedDataActions?: string[]; -} - -// @public -export interface ApplicationPackageSupportUrls { - governmentCloud?: string; - publicAzure?: string; -} - // @public export interface ApplicationPatchable extends GenericResource { applicationDefinitionId?: string; - readonly artifacts?: ApplicationArtifact[]; - readonly authorizations?: ApplicationAuthorization[]; - readonly billingDetails?: ApplicationBillingDetailsDefinition; - readonly createdBy?: ApplicationClientDetails; - readonly customerSupport?: ApplicationPackageContact; - identity?: Identity; - jitAccessPolicy?: ApplicationJitAccessPolicy; kind?: string; managedResourceGroupId?: string; - readonly managementMode?: ApplicationManagementMode; readonly outputs?: Record; parameters?: Record; plan?: PlanPatchable; readonly provisioningState?: ProvisioningState; - readonly publisherTenantId?: string; - readonly supportUrls?: ApplicationPackageSupportUrls; - readonly updatedBy?: ApplicationClientDetails; } // @public -export interface ApplicationPolicy { - name?: string; - parameters?: string; - policyDefinitionId?: string; +export interface ApplicationProviderAuthorization { + principalId: string; + roleDefinitionId: string; } // @public @@ -329,20 +183,12 @@ export interface Applications { beginDeleteAndWait(resourceGroupName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise; beginDeleteById(applicationId: string, options?: ApplicationsDeleteByIdOptionalParams): Promise, void>>; beginDeleteByIdAndWait(applicationId: string, options?: ApplicationsDeleteByIdOptionalParams): Promise; - beginRefreshPermissions(resourceGroupName: string, applicationName: string, options?: ApplicationsRefreshPermissionsOptionalParams): Promise, void>>; - beginRefreshPermissionsAndWait(resourceGroupName: string, applicationName: string, options?: ApplicationsRefreshPermissionsOptionalParams): Promise; - beginUpdate(resourceGroupName: string, applicationName: string, options?: ApplicationsUpdateOptionalParams): Promise, ApplicationsUpdateResponse>>; - beginUpdateAccess(resourceGroupName: string, applicationName: string, parameters: UpdateAccessDefinition, options?: ApplicationsUpdateAccessOptionalParams): Promise, void>>; - beginUpdateAccessAndWait(resourceGroupName: string, applicationName: string, parameters: UpdateAccessDefinition, options?: ApplicationsUpdateAccessOptionalParams): Promise; - beginUpdateAndWait(resourceGroupName: string, applicationName: string, options?: ApplicationsUpdateOptionalParams): Promise; - beginUpdateById(applicationId: string, options?: ApplicationsUpdateByIdOptionalParams): Promise, ApplicationsUpdateByIdResponse>>; - beginUpdateByIdAndWait(applicationId: string, options?: ApplicationsUpdateByIdOptionalParams): Promise; get(resourceGroupName: string, applicationName: string, options?: ApplicationsGetOptionalParams): Promise; getById(applicationId: string, options?: ApplicationsGetByIdOptionalParams): Promise; - listAllowedUpgradePlans(resourceGroupName: string, applicationName: string, options?: ApplicationsListAllowedUpgradePlansOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ApplicationsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: ApplicationsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - listTokens(resourceGroupName: string, applicationName: string, parameters: ListTokenRequest, options?: ApplicationsListTokensOptionalParams): Promise; + update(resourceGroupName: string, applicationName: string, options?: ApplicationsUpdateOptionalParams): Promise; + updateById(applicationId: string, options?: ApplicationsUpdateByIdOptionalParams): Promise; } // @public @@ -389,13 +235,6 @@ export interface ApplicationsGetOptionalParams extends coreClient.OperationOptio // @public export type ApplicationsGetResponse = Application; -// @public -export interface ApplicationsListAllowedUpgradePlansOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationsListAllowedUpgradePlansResponse = AllowedUpgradePlansResult; - // @public export interface ApplicationsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } @@ -424,73 +263,32 @@ export interface ApplicationsListBySubscriptionOptionalParams extends coreClient // @public export type ApplicationsListBySubscriptionResponse = ApplicationListResult; -// @public -export interface ApplicationsListTokensOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationsListTokensResponse = ManagedIdentityTokenResult; - -// @public -export interface ApplicationsRefreshPermissionsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApplicationsUpdateAccessOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - // @public export interface ApplicationsUpdateByIdOptionalParams extends coreClient.OperationOptions { - parameters?: ApplicationPatchable; - resumeFrom?: string; - updateIntervalInMs?: number; + parameters?: Application; } // @public -export type ApplicationsUpdateByIdResponse = ApplicationPatchable; +export type ApplicationsUpdateByIdResponse = Application; // @public export interface ApplicationsUpdateOptionalParams extends coreClient.OperationOptions { parameters?: ApplicationPatchable; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApplicationsUpdateResponse = ApplicationPatchable; - -// @public -export type CreatedByType = string; - -// @public -export type DeploymentMode = 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; -} +export type ApplicationsUpdateResponse = Application; // @public export interface ErrorResponse { - error?: ErrorDetail; + errorCode?: string; + errorMessage?: string; + httpStatus?: string; } // @public export interface GenericResource extends Resource { + identity?: Identity; managedBy?: string; sku?: Sku; } @@ -502,241 +300,24 @@ export function getContinuationToken(page: unknown): string | undefined; export interface Identity { readonly principalId?: string; readonly tenantId?: string; - type?: ResourceIdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserAssignedResourceIdentity; - }; -} - -// @public -export type JitApprovalMode = string; - -// @public -export interface JitApproverDefinition { - displayName?: string; - id: string; - type?: JitApproverType; -} - -// @public -export type JitApproverType = string; - -// @public -export interface JitAuthorizationPolicies { - principalId: string; - roleDefinitionId: string; -} - -// @public -export interface JitRequestDefinition extends Resource { - applicationResourceId?: string; - readonly createdBy?: ApplicationClientDetails; - jitAuthorizationPolicies?: JitAuthorizationPolicies[]; - readonly jitRequestState?: JitRequestState; - jitSchedulingPolicy?: JitSchedulingPolicy; - readonly provisioningState?: ProvisioningState; - readonly publisherTenantId?: string; - readonly updatedBy?: ApplicationClientDetails; -} - -// @public -export interface JitRequestDefinitionListResult { - nextLink?: string; - value?: JitRequestDefinition[]; -} - -// @public -export interface JitRequestMetadata { - originRequestId?: string; - requestorId?: string; - subjectDisplayName?: string; - tenantDisplayName?: string; -} - -// @public -export interface JitRequestPatchable { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface JitRequests { - beginCreateOrUpdate(resourceGroupName: string, jitRequestName: string, parameters: JitRequestDefinition, options?: JitRequestsCreateOrUpdateOptionalParams): Promise, JitRequestsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, jitRequestName: string, parameters: JitRequestDefinition, options?: JitRequestsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, jitRequestName: string, options?: JitRequestsDeleteOptionalParams): Promise; - get(resourceGroupName: string, jitRequestName: string, options?: JitRequestsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: JitRequestsListByResourceGroupOptionalParams): Promise; - listBySubscription(options?: JitRequestsListBySubscriptionOptionalParams): Promise; - update(resourceGroupName: string, jitRequestName: string, parameters: JitRequestPatchable, options?: JitRequestsUpdateOptionalParams): Promise; -} - -// @public -export interface JitRequestsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type JitRequestsCreateOrUpdateResponse = JitRequestDefinition; - -// @public -export interface JitRequestsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface JitRequestsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type JitRequestsGetResponse = JitRequestDefinition; - -// @public -export interface JitRequestsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type JitRequestsListByResourceGroupResponse = JitRequestDefinitionListResult; - -// @public -export interface JitRequestsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type JitRequestsListBySubscriptionResponse = JitRequestDefinitionListResult; - -// @public -export type JitRequestState = string; - -// @public -export interface JitRequestsUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type JitRequestsUpdateResponse = JitRequestDefinition; - -// @public -export interface JitSchedulingPolicy { - duration: string; - startTime: Date; - type: JitSchedulingType; -} - -// @public -export type JitSchedulingType = string; - -// @public -export enum KnownActionType { - Internal = "Internal" -} - -// @public -export enum KnownApplicationArtifactName { - Authorizations = "Authorizations", - CustomRoleDefinition = "CustomRoleDefinition", - NotSpecified = "NotSpecified", - ViewDefinition = "ViewDefinition" -} - -// @public -export enum KnownApplicationDefinitionArtifactName { - ApplicationResourceTemplate = "ApplicationResourceTemplate", - CreateUiDefinition = "CreateUiDefinition", - MainTemplateParameters = "MainTemplateParameters", - NotSpecified = "NotSpecified" -} - -// @public -export enum KnownApplicationManagementMode { - Managed = "Managed", - NotSpecified = "NotSpecified", - Unmanaged = "Unmanaged" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownDeploymentMode { - Complete = "Complete", - Incremental = "Incremental", - NotSpecified = "NotSpecified" -} - -// @public -export enum KnownJitApprovalMode { - AutoApprove = "AutoApprove", - ManualApprove = "ManualApprove", - NotSpecified = "NotSpecified" -} - -// @public -export enum KnownJitApproverType { - Group = "group", - User = "user" -} - -// @public -export enum KnownJitRequestState { - Approved = "Approved", - Canceled = "Canceled", - Denied = "Denied", - Expired = "Expired", - Failed = "Failed", - NotSpecified = "NotSpecified", - Pending = "Pending", - Timeout = "Timeout" -} - -// @public -export enum KnownJitSchedulingType { - NotSpecified = "NotSpecified", - Once = "Once", - Recurring = "Recurring" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" + type?: "SystemAssigned"; } // @public export enum KnownProvisioningState { Accepted = "Accepted", Canceled = "Canceled", + Created = "Created", + Creating = "Creating", Deleted = "Deleted", Deleting = "Deleting", Failed = "Failed", - NotSpecified = "NotSpecified", + Ready = "Ready", Running = "Running", Succeeded = "Succeeded", Updating = "Updating" } -// @public -export enum KnownStatus { - Elevate = "Elevate", - NotSpecified = "NotSpecified", - Remove = "Remove" -} - -// @public -export enum KnownSubstatus { - Approved = "Approved", - Denied = "Denied", - Expired = "Expired", - Failed = "Failed", - NotSpecified = "NotSpecified", - Timeout = "Timeout" -} - // @public export interface ListOperationsNextOptionalParams extends coreClient.OperationOptions { } @@ -751,54 +332,25 @@ export interface ListOperationsOptionalParams extends coreClient.OperationOption // @public export type ListOperationsResponse = OperationListResult; -// @public -export interface ListTokenRequest { - authorizationAudience?: string; - userAssignedIdentities?: string[]; -} - -// @public -export interface ManagedIdentityToken { - accessToken?: string; - authorizationAudience?: string; - expiresIn?: string; - expiresOn?: string; - notBefore?: string; - resourceId?: string; - tokenType?: string; -} - -// @public -export interface ManagedIdentityTokenResult { - value?: ManagedIdentityToken[]; -} - // @public export interface Operation { - readonly actionType?: ActionType; display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; + name?: string; } // @public export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; + operation?: string; + provider?: string; + resource?: string; } // @public export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; + nextLink?: string; + value?: Operation[]; } -// @public -export type Origin = string; - // @public export interface Plan { name: string; @@ -825,16 +377,12 @@ export interface Resource { readonly id?: string; location?: string; readonly name?: string; - readonly systemData?: SystemData; tags?: { [propertyName: string]: string; }; readonly type?: string; } -// @public -export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; - // @public export interface Sku { capacity?: number; @@ -845,36 +393,6 @@ export interface Sku { tier?: string; } -// @public -export type Status = string; - -// @public -export type Substatus = string; - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface UpdateAccessDefinition { - approver?: string; - metadata: JitRequestMetadata; - status: Status; - subStatus: Substatus; -} - -// @public -export interface UserAssignedResourceIdentity { - readonly principalId?: string; - readonly tenantId?: string; -} - // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/managedapplications/arm-managedapplications/src/applicationClient.ts b/sdk/managedapplications/arm-managedapplications/src/applicationClient.ts index 1f70f932a088..6f57f428cb37 100644 --- a/sdk/managedapplications/arm-managedapplications/src/applicationClient.ts +++ b/sdk/managedapplications/arm-managedapplications/src/applicationClient.ts @@ -16,16 +16,8 @@ import { import * as coreAuth from "@azure/core-auth"; import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "./pagingHelper"; -import { - ApplicationsImpl, - ApplicationDefinitionsImpl, - JitRequestsImpl -} from "./operations"; -import { - Applications, - ApplicationDefinitions, - JitRequests -} from "./operationsInterfaces"; +import { ApplicationsImpl, ApplicationDefinitionsImpl } from "./operations"; +import { Applications, ApplicationDefinitions } from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; import { @@ -84,7 +76,7 @@ export class ApplicationClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-managedapplications/3.0.0`; + const packageDetails = `azsdk-js-arm-managedapplications/4.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -137,10 +129,9 @@ export class ApplicationClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-07-01"; + this.apiVersion = options.apiVersion || "2018-06-01"; this.applications = new ApplicationsImpl(this); this.applicationDefinitions = new ApplicationDefinitionsImpl(this); - this.jitRequests = new JitRequestsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -253,7 +244,6 @@ export class ApplicationClient extends coreClient.ServiceClient { applications: Applications; applicationDefinitions: ApplicationDefinitions; - jitRequests: JitRequests; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -264,9 +254,6 @@ const listOperationsOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -280,9 +267,6 @@ const listOperationsNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse } }, urlParameters: [Parameters.$host, Parameters.nextLink], diff --git a/sdk/managedapplications/arm-managedapplications/src/models/index.ts b/sdk/managedapplications/arm-managedapplications/src/models/index.ts index 0882498520ef..60dca9159b41 100644 --- a/sdk/managedapplications/arm-managedapplications/src/models/index.ts +++ b/sdk/managedapplications/arm-managedapplications/src/models/index.ts @@ -8,191 +8,30 @@ import * as coreClient from "@azure/core-client"; -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +/** Result of the request to list Microsoft.Solutions operations. It contains a list of operations and a URL link to get the next set of results. */ export interface OperationListResult { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** List of Microsoft.Solutions operations. */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; } -/** Details of a REST API operation, returned from the Resource Provider Operations API */ +/** Microsoft.Solutions operation */ export interface Operation { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that represents the operation. */ display?: OperationDisplay; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; } -/** Localized display information for this particular operation. */ +/** The object that represents the operation. */ export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** 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; -} - -/** Managed application billing details definition. */ -export interface ApplicationBillingDetailsDefinition { - /** The managed application resource usage Id. */ - resourceUsageId?: string; -} - -/** Managed application Jit access policy. */ -export interface ApplicationJitAccessPolicy { - /** Whether the JIT access is enabled. */ - jitAccessEnabled: boolean; - /** JIT approval mode. */ - jitApprovalMode?: JitApprovalMode; - /** The JIT approvers */ - jitApprovers?: JitApproverDefinition[]; - /** The maximum duration JIT access is granted. This is an ISO8601 time period value. */ - maximumJitAccessDuration?: string; -} - -/** JIT approver definition. */ -export interface JitApproverDefinition { - /** The approver service principal Id. */ - id: string; - /** The approver type. */ - type?: JitApproverType; - /** The approver display name. */ - displayName?: string; -} - -/** The managed application provider authorization. */ -export interface ApplicationAuthorization { - /** The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources. */ - principalId: string; - /** The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. */ - roleDefinitionId: string; -} - -/** The application package contact information. */ -export interface ApplicationPackageContact { - /** The contact name. */ - contactName?: string; - /** The contact email. */ - email: string; - /** The contact phone number. */ - phone: string; -} - -/** The appliance package support URLs. */ -export interface ApplicationPackageSupportUrls { - /** The public azure support URL. */ - publicAzure?: string; - /** The government cloud support URL. */ - governmentCloud?: string; -} - -/** Managed application artifact. */ -export interface ApplicationArtifact { - /** The managed application artifact name. */ - name: ApplicationArtifactName; - /** The managed application artifact blob uri. */ - uri: string; - /** The managed application artifact type. */ - type: ApplicationArtifactType; -} - -/** The application client details to track the entity creating/updating the managed app resource. */ -export interface ApplicationClientDetails { - /** The client Oid. */ - oid?: string; - /** The client Puid */ - puid?: string; - /** The client application Id. */ - applicationId?: string; + /** Service provider: Microsoft.Solutions */ + provider?: string; + /** Resource on which the operation is performed: Application, JitRequest, etc. */ + resource?: string; + /** Operation type: Read, write, delete, etc. */ + operation?: string; } /** Plan for the managed application. */ @@ -209,40 +48,6 @@ export interface Plan { version: string; } -/** Identity for the resource. */ -export interface Identity { - /** - * The principal ID of resource identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The identity type. */ - type?: ResourceIdentityType; - /** The list of user identities associated with the resource. The user identity dictionary key references will be resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { - [propertyName: string]: UserAssignedResourceIdentity; - }; -} - -/** Represents the user assigned identity that is contained within the UserAssignedIdentities dictionary on ResourceIdentity */ -export interface UserAssignedResourceIdentity { - /** - * The principal id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; -} - /** SKU for the resource. */ export interface Sku { /** The SKU name. */ @@ -259,6 +64,22 @@ export interface Sku { capacity?: number; } +/** Identity for the resource. */ +export interface Identity { + /** + * The principal ID of resource identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; +} + /** Resource information. */ export interface Resource { /** @@ -280,27 +101,16 @@ export interface Resource { location?: string; /** Resource tags */ tags?: { [propertyName: string]: 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; } -/** 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; +/** Error response indicates managed application is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponse { + /** Http status code. */ + httpStatus?: string; + /** Error code. */ + errorCode?: string; + /** Error message indicating why the operation failed. */ + errorMessage?: string; } /** Plan for the managed application. */ @@ -317,62 +127,22 @@ export interface PlanPatchable { version?: string; } -/** Application definition artifact. */ -export interface ApplicationDefinitionArtifact { - /** The managed application definition artifact name. */ - name: ApplicationDefinitionArtifactName; - /** The managed application definition artifact blob uri. */ - uri: string; - /** The managed application definition artifact type. */ - type: ApplicationArtifactType; -} - -/** Managed application notification policy. */ -export interface ApplicationNotificationPolicy { - /** The managed application notification endpoint. */ - notificationEndpoints: ApplicationNotificationEndpoint[]; -} - -/** Managed application notification endpoint. */ -export interface ApplicationNotificationEndpoint { - /** The managed application notification endpoint uri. */ - uri: string; -} - -/** Managed application locking policy. */ -export interface ApplicationPackageLockingPolicyDefinition { - /** The deny assignment excluded actions. */ - allowedActions?: string[]; - /** The deny assignment excluded data actions. */ - allowedDataActions?: string[]; -} - -/** Managed application deployment policy. */ -export interface ApplicationDeploymentPolicy { - /** The managed application deployment mode. */ - deploymentMode: DeploymentMode; -} - -/** Managed application management policy. */ -export interface ApplicationManagementPolicy { - /** The managed application management mode. */ - mode?: ApplicationManagementMode; +/** The managed application provider authorization. */ +export interface ApplicationProviderAuthorization { + /** The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources. */ + principalId: string; + /** The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. */ + roleDefinitionId: string; } -/** Managed application policy. */ -export interface ApplicationPolicy { - /** The policy name */ +/** Managed application artifact. */ +export interface ApplicationArtifact { + /** The managed application artifact name. */ name?: string; - /** The policy definition Id. */ - policyDefinitionId?: string; - /** The policy parameters. */ - parameters?: string; -} - -/** Information about an application definition request. */ -export interface ApplicationDefinitionPatchable { - /** Application definition tags */ - tags?: { [propertyName: string]: string }; + /** The managed application artifact blob uri. */ + uri?: string; + /** The managed application artifact type. */ + type?: ApplicationArtifactType; } /** List of managed application definitions. */ @@ -391,141 +161,14 @@ export interface ApplicationListResult { nextLink?: string; } -/** The JIT authorization policies. */ -export interface JitAuthorizationPolicies { - /** The the principal id that will be granted JIT access. */ - principalId: string; - /** The role definition id that will be granted to the Principal. */ - roleDefinitionId: string; -} - -/** The JIT scheduling policies. */ -export interface JitSchedulingPolicy { - /** The type of JIT schedule. */ - type: JitSchedulingType; - /** The required duration of the JIT request. */ - duration: string; - /** The start time of the request. */ - startTime: Date; -} - -/** Information about JIT request. */ -export interface JitRequestPatchable { - /** Jit request tags */ - tags?: { [propertyName: string]: string }; -} - -/** List of JIT requests. */ -export interface JitRequestDefinitionListResult { - /** The array of Jit request definition. */ - value?: JitRequestDefinition[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** The array of plan. */ -export interface AllowedUpgradePlansResult { - /** The array of plans. */ - value?: Plan[]; -} - -/** Update access request definition. */ -export interface UpdateAccessDefinition { - /** The approver name. */ - approver?: string; - /** The JIT request metadata. */ - metadata: JitRequestMetadata; - /** The JIT status. */ - status: Status; - /** The JIT status. */ - subStatus: Substatus; -} - -/** The JIT request metadata. */ -export interface JitRequestMetadata { - /** The origin request id. */ - originRequestId?: string; - /** The requestor id. */ - requestorId?: string; - /** The publisher's tenant name. */ - tenantDisplayName?: string; - /** The subject display name. */ - subjectDisplayName?: string; -} - -/** List token request body. */ -export interface ListTokenRequest { - /** The authorization audience. */ - authorizationAudience?: string; - /** The user assigned identities. */ - userAssignedIdentities?: string[]; -} - -/** The array of managed identity tokens. */ -export interface ManagedIdentityTokenResult { - /** The array of managed identity tokens. */ - value?: ManagedIdentityToken[]; -} - -/** The managed identity token for the managed app resource. */ -export interface ManagedIdentityToken { - /** The requested access token. */ - accessToken?: string; - /** The number of seconds the access token will be valid. */ - expiresIn?: string; - /** The timespan when the access token expires. This is represented as the number of seconds from epoch. */ - expiresOn?: string; - /** The timespan when the access token takes effect. This is represented as the number of seconds from epoch. */ - notBefore?: string; - /** The aud (audience) the access token was request for. This is the same as what was provided in the listTokens request. */ - authorizationAudience?: string; - /** The Azure resource ID for the issued token. This is either the managed application ID or the user-assigned identity ID. */ - resourceId?: string; - /** The type of the token. */ - tokenType?: string; -} - /** Resource information. */ export interface GenericResource extends Resource { /** ID of the resource that manages this resource. */ managedBy?: string; /** The SKU of the resource. */ sku?: Sku; -} - -/** Information about JIT request definition. */ -export interface JitRequestDefinition extends Resource { - /** The parent application id. */ - applicationResourceId?: string; - /** - * The publisher tenant id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publisherTenantId?: string; - /** The JIT authorization policies. */ - jitAuthorizationPolicies?: JitAuthorizationPolicies[]; - /** The JIT request properties. */ - jitSchedulingPolicy?: JitSchedulingPolicy; - /** - * The JIT request provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The JIT request state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly jitRequestState?: JitRequestState; - /** - * The client entity that created the JIT request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdBy?: ApplicationClientDetails; - /** - * The client entity that last updated the JIT request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedBy?: ApplicationClientDetails; + /** The identity of the resource. */ + identity?: Identity; } /** Information about managed application. */ @@ -534,10 +177,8 @@ export interface Application extends GenericResource { plan?: Plan; /** The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. */ kind: string; - /** The identity of the resource. */ - identity?: Identity; /** The managed resource group Id. */ - managedResourceGroupId?: string; + managedResourceGroupId: string; /** The fully qualified path of managed application definition Id. */ applicationDefinitionId?: string; /** Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string. */ @@ -552,53 +193,6 @@ export interface Application extends GenericResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** - * The managed application billing details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingDetails?: ApplicationBillingDetailsDefinition; - /** The managed application Jit access policy. */ - jitAccessPolicy?: ApplicationJitAccessPolicy; - /** - * The publisher tenant Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publisherTenantId?: string; - /** - * The read-only authorizations property that is retrieved from the application package. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly authorizations?: ApplicationAuthorization[]; - /** - * The managed application management mode. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementMode?: ApplicationManagementMode; - /** - * The read-only customer support property that is retrieved from the application package. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customerSupport?: ApplicationPackageContact; - /** - * The read-only support URLs property that is retrieved from the application package. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportUrls?: ApplicationPackageSupportUrls; - /** - * The collection of managed application artifacts. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly artifacts?: ApplicationArtifact[]; - /** - * The client entity that created the JIT request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdBy?: ApplicationClientDetails; - /** - * The client entity that last updated the JIT request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedBy?: ApplicationClientDetails; } /** Information about managed application. */ @@ -607,8 +201,6 @@ export interface ApplicationPatchable extends GenericResource { plan?: PlanPatchable; /** The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. */ kind?: string; - /** The identity of the resource. */ - identity?: Identity; /** The managed resource group Id. */ managedResourceGroupId?: string; /** The fully qualified path of managed application definition Id. */ @@ -625,53 +217,6 @@ export interface ApplicationPatchable extends GenericResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** - * The managed application billing details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingDetails?: ApplicationBillingDetailsDefinition; - /** The managed application Jit access policy. */ - jitAccessPolicy?: ApplicationJitAccessPolicy; - /** - * The publisher tenant Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publisherTenantId?: string; - /** - * The read-only authorizations property that is retrieved from the application package. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly authorizations?: ApplicationAuthorization[]; - /** - * The managed application management mode. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementMode?: ApplicationManagementMode; - /** - * The read-only customer support property that is retrieved from the application package. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customerSupport?: ApplicationPackageContact; - /** - * The read-only support URLs property that is retrieved from the application package. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportUrls?: ApplicationPackageSupportUrls; - /** - * The collection of managed application artifacts. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly artifacts?: ApplicationArtifact[]; - /** - * The client entity that created the JIT request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdBy?: ApplicationClientDetails; - /** - * The client entity that last updated the JIT request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedBy?: ApplicationClientDetails; } /** Information about managed application definition. */ @@ -681,77 +226,33 @@ export interface ApplicationDefinition extends GenericResource { /** The managed application definition display name. */ displayName?: string; /** A value indicating whether the package is enabled or not. */ - isEnabled?: boolean; + isEnabled?: string; /** The managed application provider authorizations. */ - authorizations?: ApplicationAuthorization[]; + authorizations: ApplicationProviderAuthorization[]; /** The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition. */ - artifacts?: ApplicationDefinitionArtifact[]; + artifacts?: ApplicationArtifact[]; /** The managed application definition description. */ description?: string; /** The managed application definition package file Uri. Use this element */ packageFileUri?: string; - /** The storage account id for bring your own storage scenario. */ - storageAccountId?: string; /** The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string. */ mainTemplate?: Record; /** The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string. */ createUiDefinition?: Record; - /** The managed application notification policy. */ - notificationPolicy?: ApplicationNotificationPolicy; - /** The managed application locking policy. */ - lockingPolicy?: ApplicationPackageLockingPolicyDefinition; - /** The managed application deployment policy. */ - deploymentPolicy?: ApplicationDeploymentPolicy; - /** The managed application management policy that determines publisher's access to the managed resource group. */ - managementPolicy?: ApplicationManagementPolicy; - /** The managed application provider policies. */ - policies?: ApplicationPolicy[]; -} - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system" -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal" } -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { - /** NotSpecified */ - NotSpecified = "NotSpecified", /** Accepted */ Accepted = "Accepted", /** Running */ Running = "Running", + /** Ready */ + Ready = "Ready", + /** Creating */ + Creating = "Creating", + /** Created */ + Created = "Created", /** Deleting */ Deleting = "Deleting", /** Deleted */ @@ -771,9 +272,11 @@ export enum KnownProvisioningState { * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NotSpecified** \ * **Accepted** \ * **Running** \ + * **Ready** \ + * **Creating** \ + * **Created** \ * **Deleting** \ * **Deleted** \ * **Canceled** \ @@ -782,277 +285,10 @@ export enum KnownProvisioningState { * **Updating** */ export type ProvisioningState = string; - -/** Known values of {@link JitApprovalMode} that the service accepts. */ -export enum KnownJitApprovalMode { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** AutoApprove */ - AutoApprove = "AutoApprove", - /** ManualApprove */ - ManualApprove = "ManualApprove" -} - -/** - * Defines values for JitApprovalMode. \ - * {@link KnownJitApprovalMode} can be used interchangeably with JitApprovalMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **AutoApprove** \ - * **ManualApprove** - */ -export type JitApprovalMode = string; - -/** Known values of {@link JitApproverType} that the service accepts. */ -export enum KnownJitApproverType { - /** User */ - User = "user", - /** Group */ - Group = "group" -} - -/** - * Defines values for JitApproverType. \ - * {@link KnownJitApproverType} can be used interchangeably with JitApproverType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **group** - */ -export type JitApproverType = string; - -/** Known values of {@link ApplicationManagementMode} that the service accepts. */ -export enum KnownApplicationManagementMode { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Unmanaged */ - Unmanaged = "Unmanaged", - /** Managed */ - Managed = "Managed" -} - -/** - * Defines values for ApplicationManagementMode. \ - * {@link KnownApplicationManagementMode} can be used interchangeably with ApplicationManagementMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Unmanaged** \ - * **Managed** - */ -export type ApplicationManagementMode = string; - -/** Known values of {@link ApplicationArtifactName} that the service accepts. */ -export enum KnownApplicationArtifactName { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** ViewDefinition */ - ViewDefinition = "ViewDefinition", - /** Authorizations */ - Authorizations = "Authorizations", - /** CustomRoleDefinition */ - CustomRoleDefinition = "CustomRoleDefinition" -} - -/** - * Defines values for ApplicationArtifactName. \ - * {@link KnownApplicationArtifactName} can be used interchangeably with ApplicationArtifactName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **ViewDefinition** \ - * **Authorizations** \ - * **CustomRoleDefinition** - */ -export type ApplicationArtifactName = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - 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; - -/** Known values of {@link ApplicationDefinitionArtifactName} that the service accepts. */ -export enum KnownApplicationDefinitionArtifactName { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** ApplicationResourceTemplate */ - ApplicationResourceTemplate = "ApplicationResourceTemplate", - /** CreateUiDefinition */ - CreateUiDefinition = "CreateUiDefinition", - /** MainTemplateParameters */ - MainTemplateParameters = "MainTemplateParameters" -} - -/** - * Defines values for ApplicationDefinitionArtifactName. \ - * {@link KnownApplicationDefinitionArtifactName} can be used interchangeably with ApplicationDefinitionArtifactName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **ApplicationResourceTemplate** \ - * **CreateUiDefinition** \ - * **MainTemplateParameters** - */ -export type ApplicationDefinitionArtifactName = string; - -/** Known values of {@link DeploymentMode} that the service accepts. */ -export enum KnownDeploymentMode { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Incremental */ - Incremental = "Incremental", - /** Complete */ - Complete = "Complete" -} - -/** - * Defines values for DeploymentMode. \ - * {@link KnownDeploymentMode} can be used interchangeably with DeploymentMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Incremental** \ - * **Complete** - */ -export type DeploymentMode = string; - -/** Known values of {@link JitSchedulingType} that the service accepts. */ -export enum KnownJitSchedulingType { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Once */ - Once = "Once", - /** Recurring */ - Recurring = "Recurring" -} - -/** - * Defines values for JitSchedulingType. \ - * {@link KnownJitSchedulingType} can be used interchangeably with JitSchedulingType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Once** \ - * **Recurring** - */ -export type JitSchedulingType = string; - -/** Known values of {@link JitRequestState} that the service accepts. */ -export enum KnownJitRequestState { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Pending */ - Pending = "Pending", - /** Approved */ - Approved = "Approved", - /** Denied */ - Denied = "Denied", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Expired */ - Expired = "Expired", - /** Timeout */ - Timeout = "Timeout" -} - -/** - * Defines values for JitRequestState. \ - * {@link KnownJitRequestState} can be used interchangeably with JitRequestState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Pending** \ - * **Approved** \ - * **Denied** \ - * **Failed** \ - * **Canceled** \ - * **Expired** \ - * **Timeout** - */ -export type JitRequestState = string; - -/** Known values of {@link Status} that the service accepts. */ -export enum KnownStatus { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Elevate */ - Elevate = "Elevate", - /** Remove */ - Remove = "Remove" -} - -/** - * Defines values for Status. \ - * {@link KnownStatus} can be used interchangeably with Status, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Elevate** \ - * **Remove** - */ -export type Status = string; - -/** Known values of {@link Substatus} that the service accepts. */ -export enum KnownSubstatus { - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Approved */ - Approved = "Approved", - /** Denied */ - Denied = "Denied", - /** Failed */ - Failed = "Failed", - /** Expired */ - Expired = "Expired", - /** Timeout */ - Timeout = "Timeout" -} - -/** - * Defines values for Substatus. \ - * {@link KnownSubstatus} can be used interchangeably with Substatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotSpecified** \ - * **Approved** \ - * **Denied** \ - * **Failed** \ - * **Expired** \ - * **Timeout** - */ -export type Substatus = string; -/** Defines values for ApplicationArtifactType. */ -export type ApplicationArtifactType = "NotSpecified" | "Template" | "Custom"; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned, UserAssigned" - | "None"; /** Defines values for ApplicationLockLevel. */ export type ApplicationLockLevel = "CanNotDelete" | "ReadOnly" | "None"; +/** Defines values for ApplicationArtifactType. */ +export type ApplicationArtifactType = "Template" | "Custom"; /** Optional parameters. */ export interface ListOperationsOptionalParams @@ -1101,14 +337,10 @@ export interface ApplicationsUpdateOptionalParams extends coreClient.OperationOptions { /** Parameters supplied to update an existing managed application. */ parameters?: ApplicationPatchable; - /** 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 update operation. */ -export type ApplicationsUpdateResponse = ApplicationPatchable; +export type ApplicationsUpdateResponse = Application; /** Optional parameters. */ export interface ApplicationsListByResourceGroupOptionalParams @@ -1156,47 +388,11 @@ export type ApplicationsCreateOrUpdateByIdResponse = Application; export interface ApplicationsUpdateByIdOptionalParams extends coreClient.OperationOptions { /** Parameters supplied to update an existing managed application. */ - parameters?: ApplicationPatchable; - /** 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; + parameters?: Application; } /** Contains response data for the updateById operation. */ -export type ApplicationsUpdateByIdResponse = ApplicationPatchable; - -/** Optional parameters. */ -export interface ApplicationsRefreshPermissionsOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ApplicationsListAllowedUpgradePlansOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAllowedUpgradePlans operation. */ -export type ApplicationsListAllowedUpgradePlansResponse = AllowedUpgradePlansResult; - -/** Optional parameters. */ -export interface ApplicationsUpdateAccessOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ApplicationsListTokensOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listTokens operation. */ -export type ApplicationsListTokensResponse = ManagedIdentityTokenResult; +export type ApplicationsUpdateByIdResponse = Application; /** Optional parameters. */ export interface ApplicationsListByResourceGroupNextOptionalParams @@ -1221,22 +417,25 @@ export type ApplicationDefinitionsGetResponse = ApplicationDefinition; /** Optional parameters. */ export interface ApplicationDefinitionsDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ export interface ApplicationDefinitionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the createOrUpdate operation. */ export type ApplicationDefinitionsCreateOrUpdateResponse = ApplicationDefinition; -/** Optional parameters. */ -export interface ApplicationDefinitionsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApplicationDefinitionsUpdateResponse = ApplicationDefinition; - /** Optional parameters. */ export interface ApplicationDefinitionsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} @@ -1244,13 +443,6 @@ export interface ApplicationDefinitionsListByResourceGroupOptionalParams /** Contains response data for the listByResourceGroup operation. */ export type ApplicationDefinitionsListByResourceGroupResponse = ApplicationDefinitionListResult; -/** Optional parameters. */ -export interface ApplicationDefinitionsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type ApplicationDefinitionsListBySubscriptionResponse = ApplicationDefinitionListResult; - /** Optional parameters. */ export interface ApplicationDefinitionsGetByIdOptionalParams extends coreClient.OperationOptions {} @@ -1260,45 +452,15 @@ export type ApplicationDefinitionsGetByIdResponse = ApplicationDefinition; /** Optional parameters. */ export interface ApplicationDefinitionsDeleteByIdOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ export interface ApplicationDefinitionsCreateOrUpdateByIdOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdateById operation. */ -export type ApplicationDefinitionsCreateOrUpdateByIdResponse = ApplicationDefinition; - -/** Optional parameters. */ -export interface ApplicationDefinitionsUpdateByIdOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateById operation. */ -export type ApplicationDefinitionsUpdateByIdResponse = ApplicationDefinition; - -/** Optional parameters. */ -export interface ApplicationDefinitionsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ApplicationDefinitionsListByResourceGroupNextResponse = ApplicationDefinitionListResult; - -/** Optional parameters. */ -export interface ApplicationDefinitionsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ApplicationDefinitionsListBySubscriptionNextResponse = ApplicationDefinitionListResult; - -/** Optional parameters. */ -export interface JitRequestsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type JitRequestsGetResponse = JitRequestDefinition; - -/** Optional parameters. */ -export interface JitRequestsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1306,33 +468,15 @@ export interface JitRequestsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type JitRequestsCreateOrUpdateResponse = JitRequestDefinition; - -/** Optional parameters. */ -export interface JitRequestsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type JitRequestsUpdateResponse = JitRequestDefinition; - -/** Optional parameters. */ -export interface JitRequestsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface JitRequestsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type JitRequestsListBySubscriptionResponse = JitRequestDefinitionListResult; +/** Contains response data for the createOrUpdateById operation. */ +export type ApplicationDefinitionsCreateOrUpdateByIdResponse = ApplicationDefinition; /** Optional parameters. */ -export interface JitRequestsListByResourceGroupOptionalParams +export interface ApplicationDefinitionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type JitRequestsListByResourceGroupResponse = JitRequestDefinitionListResult; +/** Contains response data for the listByResourceGroupNext operation. */ +export type ApplicationDefinitionsListByResourceGroupNextResponse = ApplicationDefinitionListResult; /** Optional parameters. */ export interface ApplicationClientOptionalParams diff --git a/sdk/managedapplications/arm-managedapplications/src/models/mappers.ts b/sdk/managedapplications/arm-managedapplications/src/models/mappers.ts index 1e96dd7defa8..d88ba4ed8da6 100644 --- a/sdk/managedapplications/arm-managedapplications/src/models/mappers.ts +++ b/sdk/managedapplications/arm-managedapplications/src/models/mappers.ts @@ -15,7 +15,6 @@ export const OperationListResult: coreClient.CompositeMapper = { modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { @@ -28,7 +27,6 @@ export const OperationListResult: coreClient.CompositeMapper = { }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -44,38 +42,16 @@ export const Operation: coreClient.CompositeMapper = { modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean" - } - }, display: { serializedName: "display", type: { name: "Composite", className: "OperationDisplay" } - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String" - } - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String" - } } } } @@ -88,28 +64,18 @@ export const OperationDisplay: coreClient.CompositeMapper = { modelProperties: { provider: { serializedName: "provider", - readOnly: true, type: { name: "String" } }, resource: { serializedName: "resource", - readOnly: true, type: { name: "String" } }, operation: { serializedName: "operation", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, type: { name: "String" } @@ -118,109 +84,118 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const Plan: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "Plan", modelProperties: { - error: { - serializedName: "error", + name: { + serializedName: "name", + required: true, type: { - name: "Composite", - className: "ErrorDetail" + name: "String" + } + }, + publisher: { + serializedName: "publisher", + required: true, + type: { + name: "String" + } + }, + product: { + serializedName: "product", + required: true, + type: { + name: "String" + } + }, + promotionCode: { + serializedName: "promotionCode", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + required: true, + type: { + name: "String" } } } } }; -export const ErrorDetail: coreClient.CompositeMapper = { +export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetail", + className: "Sku", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + tier: { + serializedName: "tier", type: { name: "String" } }, - target: { - serializedName: "target", - readOnly: true, + size: { + serializedName: "size", type: { name: "String" } }, - details: { - serializedName: "details", - readOnly: true, + family: { + serializedName: "family", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } + name: "String" } }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + model: { + serializedName: "model", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" } } } } }; -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { +export const Identity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorAdditionalInfo", + className: "Identity", modelProperties: { - type: { - serializedName: "type", + principalId: { + serializedName: "principalId", readOnly: true, type: { name: "String" } }, - info: { - serializedName: "info", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } - } - } - } -}; - -export const ApplicationBillingDetailsDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationBillingDetailsDefinition", - modelProperties: { - resourceUsageId: { - serializedName: "resourceUsageId", + }, + type: { + defaultValue: "SystemAssigned", + isConstant: true, + serializedName: "type", type: { name: "String" } @@ -229,66 +204,68 @@ export const ApplicationBillingDetailsDefinition: coreClient.CompositeMapper = { } }; -export const ApplicationJitAccessPolicy: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationJitAccessPolicy", + className: "Resource", modelProperties: { - jitAccessEnabled: { - serializedName: "jitAccessEnabled", - required: true, + id: { + serializedName: "id", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - jitApprovalMode: { - serializedName: "jitApprovalMode", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - jitApprovers: { - serializedName: "jitApprovers", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitApproverDefinition" - } - } + name: "String" } }, - maximumJitAccessDuration: { - serializedName: "maximumJitAccessDuration", + location: { + serializedName: "location", type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } }; -export const JitApproverDefinition: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JitApproverDefinition", + className: "ErrorResponse", modelProperties: { - id: { - serializedName: "id", - required: true, + httpStatus: { + serializedName: "httpStatus", type: { name: "String" } }, - type: { - serializedName: "type", + errorCode: { + serializedName: "errorCode", type: { name: "String" } }, - displayName: { - serializedName: "displayName", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } @@ -297,50 +274,37 @@ export const JitApproverDefinition: coreClient.CompositeMapper = { } }; -export const ApplicationAuthorization: coreClient.CompositeMapper = { +export const PlanPatchable: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationAuthorization", + className: "PlanPatchable", modelProperties: { - principalId: { - serializedName: "principalId", - required: true, + name: { + serializedName: "name", type: { name: "String" } }, - roleDefinitionId: { - serializedName: "roleDefinitionId", - required: true, + publisher: { + serializedName: "publisher", type: { name: "String" } - } - } - } -}; - -export const ApplicationPackageContact: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationPackageContact", - modelProperties: { - contactName: { - serializedName: "contactName", + }, + product: { + serializedName: "product", type: { name: "String" } }, - email: { - serializedName: "email", - required: true, + promotionCode: { + serializedName: "promotionCode", type: { name: "String" } }, - phone: { - serializedName: "phone", - required: true, + version: { + serializedName: "version", type: { name: "String" } @@ -349,19 +313,21 @@ export const ApplicationPackageContact: coreClient.CompositeMapper = { } }; -export const ApplicationPackageSupportUrls: coreClient.CompositeMapper = { +export const ApplicationProviderAuthorization: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationPackageSupportUrls", + className: "ApplicationProviderAuthorization", modelProperties: { - publicAzure: { - serializedName: "publicAzure", + principalId: { + serializedName: "principalId", + required: true, type: { name: "String" } }, - governmentCloud: { - serializedName: "governmentCloud", + roleDefinitionId: { + serializedName: "roleDefinitionId", + required: true, type: { name: "String" } @@ -377,49 +343,73 @@ export const ApplicationArtifact: coreClient.CompositeMapper = { modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } }, uri: { serializedName: "uri", - required: true, type: { name: "String" } }, type: { serializedName: "type", - required: true, type: { name: "Enum", - allowedValues: ["NotSpecified", "Template", "Custom"] + allowedValues: ["Template", "Custom"] } } } } }; -export const ApplicationClientDetails: coreClient.CompositeMapper = { +export const ApplicationDefinitionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationClientDetails", + className: "ApplicationDefinitionListResult", modelProperties: { - oid: { - serializedName: "oid", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationDefinition" + } + } } }, - puid: { - serializedName: "puid", + nextLink: { + serializedName: "nextLink", type: { name: "String" } + } + } + } +}; + +export const ApplicationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Application" + } + } + } }, - applicationId: { - serializedName: "applicationId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -428,898 +418,30 @@ export const ApplicationClientDetails: coreClient.CompositeMapper = { } }; -export const Plan: coreClient.CompositeMapper = { +export const GenericResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Plan", + className: "GenericResource", modelProperties: { - name: { - serializedName: "name", - required: true, + ...Resource.type.modelProperties, + managedBy: { + serializedName: "managedBy", type: { name: "String" } }, - publisher: { - serializedName: "publisher", - required: true, + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } }, - product: { - serializedName: "product", - required: true, - type: { - name: "String" - } - }, - promotionCode: { - serializedName: "promotionCode", - type: { - name: "String" - } - }, - version: { - serializedName: "version", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ] - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "UserAssignedResourceIdentity" - } - } - } - } - } - } -}; - -export const UserAssignedResourceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedResourceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Sku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - type: { - name: "String" - } - }, - size: { - serializedName: "size", - type: { - name: "String" - } - }, - family: { - serializedName: "family", - type: { - name: "String" - } - }, - model: { - serializedName: "model", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - type: { - name: "Number" - } - } - } - } -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -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 PlanPatchable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlanPatchable", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - publisher: { - serializedName: "publisher", - type: { - name: "String" - } - }, - product: { - serializedName: "product", - type: { - name: "String" - } - }, - promotionCode: { - serializedName: "promotionCode", - type: { - name: "String" - } - }, - version: { - serializedName: "version", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationDefinitionArtifact: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationDefinitionArtifact", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - uri: { - serializedName: "uri", - required: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "Enum", - allowedValues: ["NotSpecified", "Template", "Custom"] - } - } - } - } -}; - -export const ApplicationNotificationPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationNotificationPolicy", - modelProperties: { - notificationEndpoints: { - serializedName: "notificationEndpoints", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationNotificationEndpoint" - } - } - } - } - } - } -}; - -export const ApplicationNotificationEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationNotificationEndpoint", - modelProperties: { - uri: { - serializedName: "uri", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationPackageLockingPolicyDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationPackageLockingPolicyDefinition", - modelProperties: { - allowedActions: { - serializedName: "allowedActions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - allowedDataActions: { - serializedName: "allowedDataActions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ApplicationDeploymentPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationDeploymentPolicy", - modelProperties: { - deploymentMode: { - serializedName: "deploymentMode", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationManagementPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationManagementPolicy", - modelProperties: { - mode: { - serializedName: "mode", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationPolicy", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - policyDefinitionId: { - serializedName: "policyDefinitionId", - type: { - name: "String" - } - }, - parameters: { - serializedName: "parameters", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationDefinitionPatchable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationDefinitionPatchable", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const ApplicationDefinitionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationDefinitionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationDefinition" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Application" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const JitAuthorizationPolicies: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JitAuthorizationPolicies", - modelProperties: { - principalId: { - serializedName: "principalId", - required: true, - type: { - name: "String" - } - }, - roleDefinitionId: { - serializedName: "roleDefinitionId", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const JitSchedulingPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JitSchedulingPolicy", - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - }, - duration: { - serializedName: "duration", - required: true, - type: { - name: "TimeSpan" - } - }, - startTime: { - serializedName: "startTime", - required: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const JitRequestPatchable: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JitRequestPatchable", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const JitRequestDefinitionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JitRequestDefinitionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitRequestDefinition" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const AllowedUpgradePlansResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AllowedUpgradePlansResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Plan" - } - } - } - } - } - } -}; - -export const UpdateAccessDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateAccessDefinition", - modelProperties: { - approver: { - serializedName: "approver", - type: { - name: "String" - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Composite", - className: "JitRequestMetadata" - } - }, - status: { - serializedName: "status", - required: true, - type: { - name: "String" - } - }, - subStatus: { - serializedName: "subStatus", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const JitRequestMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JitRequestMetadata", - modelProperties: { - originRequestId: { - serializedName: "originRequestId", - type: { - name: "String" - } - }, - requestorId: { - serializedName: "requestorId", - type: { - name: "String" - } - }, - tenantDisplayName: { - serializedName: "tenantDisplayName", - type: { - name: "String" - } - }, - subjectDisplayName: { - serializedName: "subjectDisplayName", - type: { - name: "String" - } - } - } - } -}; - -export const ListTokenRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListTokenRequest", - modelProperties: { - authorizationAudience: { - serializedName: "authorizationAudience", - type: { - name: "String" - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ManagedIdentityTokenResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentityTokenResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedIdentityToken" - } - } - } - } - } - } -}; - -export const ManagedIdentityToken: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentityToken", - modelProperties: { - accessToken: { - serializedName: "accessToken", - type: { - name: "String" - } - }, - expiresIn: { - serializedName: "expiresIn", - type: { - name: "String" - } - }, - expiresOn: { - serializedName: "expiresOn", - type: { - name: "String" - } - }, - notBefore: { - serializedName: "notBefore", - type: { - name: "String" - } - }, - authorizationAudience: { - serializedName: "authorizationAudience", - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - tokenType: { - serializedName: "tokenType", - type: { - name: "String" - } - } - } - } -}; - -export const GenericResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GenericResource", - modelProperties: { - ...Resource.type.modelProperties, - managedBy: { - serializedName: "managedBy", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - } - } - } -}; - -export const JitRequestDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JitRequestDefinition", - modelProperties: { - ...Resource.type.modelProperties, - applicationResourceId: { - serializedName: "properties.applicationResourceId", - type: { - name: "String" - } - }, - publisherTenantId: { - serializedName: "properties.publisherTenantId", - readOnly: true, - type: { - name: "String" - } - }, - jitAuthorizationPolicies: { - serializedName: "properties.jitAuthorizationPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JitAuthorizationPolicies" - } - } - } - }, - jitSchedulingPolicy: { - serializedName: "properties.jitSchedulingPolicy", - type: { - name: "Composite", - className: "JitSchedulingPolicy" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - jitRequestState: { - serializedName: "properties.jitRequestState", - readOnly: true, - type: { - name: "String" - } - }, - createdBy: { - serializedName: "properties.createdBy", - type: { - name: "Composite", - className: "ApplicationClientDetails" - } - }, - updatedBy: { - serializedName: "properties.updatedBy", + identity: { + serializedName: "identity", type: { name: "Composite", - className: "ApplicationClientDetails" + className: "Identity" } } } @@ -1349,15 +471,9 @@ export const Application: coreClient.CompositeMapper = { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, managedResourceGroupId: { serializedName: "properties.managedResourceGroupId", + required: true, type: { name: "String" } @@ -1389,88 +505,6 @@ export const Application: coreClient.CompositeMapper = { type: { name: "String" } - }, - billingDetails: { - serializedName: "properties.billingDetails", - type: { - name: "Composite", - className: "ApplicationBillingDetailsDefinition" - } - }, - jitAccessPolicy: { - serializedName: "properties.jitAccessPolicy", - type: { - name: "Composite", - className: "ApplicationJitAccessPolicy" - } - }, - publisherTenantId: { - serializedName: "properties.publisherTenantId", - readOnly: true, - type: { - name: "String" - } - }, - authorizations: { - serializedName: "properties.authorizations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationAuthorization" - } - } - } - }, - managementMode: { - serializedName: "properties.managementMode", - readOnly: true, - type: { - name: "String" - } - }, - customerSupport: { - serializedName: "properties.customerSupport", - type: { - name: "Composite", - className: "ApplicationPackageContact" - } - }, - supportUrls: { - serializedName: "properties.supportUrls", - type: { - name: "Composite", - className: "ApplicationPackageSupportUrls" - } - }, - artifacts: { - serializedName: "properties.artifacts", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationArtifact" - } - } - } - }, - createdBy: { - serializedName: "properties.createdBy", - type: { - name: "Composite", - className: "ApplicationClientDetails" - } - }, - updatedBy: { - serializedName: "properties.updatedBy", - type: { - name: "Composite", - className: "ApplicationClientDetails" - } } } } @@ -1498,13 +532,6 @@ export const ApplicationPatchable: coreClient.CompositeMapper = { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, managedResourceGroupId: { serializedName: "properties.managedResourceGroupId", type: { @@ -1538,88 +565,6 @@ export const ApplicationPatchable: coreClient.CompositeMapper = { type: { name: "String" } - }, - billingDetails: { - serializedName: "properties.billingDetails", - type: { - name: "Composite", - className: "ApplicationBillingDetailsDefinition" - } - }, - jitAccessPolicy: { - serializedName: "properties.jitAccessPolicy", - type: { - name: "Composite", - className: "ApplicationJitAccessPolicy" - } - }, - publisherTenantId: { - serializedName: "properties.publisherTenantId", - readOnly: true, - type: { - name: "String" - } - }, - authorizations: { - serializedName: "properties.authorizations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationAuthorization" - } - } - } - }, - managementMode: { - serializedName: "properties.managementMode", - readOnly: true, - type: { - name: "String" - } - }, - customerSupport: { - serializedName: "properties.customerSupport", - type: { - name: "Composite", - className: "ApplicationPackageContact" - } - }, - supportUrls: { - serializedName: "properties.supportUrls", - type: { - name: "Composite", - className: "ApplicationPackageSupportUrls" - } - }, - artifacts: { - serializedName: "properties.artifacts", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationArtifact" - } - } - } - }, - createdBy: { - serializedName: "properties.createdBy", - type: { - name: "Composite", - className: "ApplicationClientDetails" - } - }, - updatedBy: { - serializedName: "properties.updatedBy", - type: { - name: "Composite", - className: "ApplicationClientDetails" - } } } } @@ -1648,17 +593,18 @@ export const ApplicationDefinition: coreClient.CompositeMapper = { isEnabled: { serializedName: "properties.isEnabled", type: { - name: "Boolean" + name: "String" } }, authorizations: { serializedName: "properties.authorizations", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ApplicationAuthorization" + className: "ApplicationProviderAuthorization" } } } @@ -1670,7 +616,7 @@ export const ApplicationDefinition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ApplicationDefinitionArtifact" + className: "ApplicationArtifact" } } } @@ -1687,12 +633,6 @@ export const ApplicationDefinition: coreClient.CompositeMapper = { name: "String" } }, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, mainTemplate: { serializedName: "properties.mainTemplate", type: { @@ -1706,46 +646,6 @@ export const ApplicationDefinition: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "any" } } } - }, - notificationPolicy: { - serializedName: "properties.notificationPolicy", - type: { - name: "Composite", - className: "ApplicationNotificationPolicy" - } - }, - lockingPolicy: { - serializedName: "properties.lockingPolicy", - type: { - name: "Composite", - className: "ApplicationPackageLockingPolicyDefinition" - } - }, - deploymentPolicy: { - serializedName: "properties.deploymentPolicy", - type: { - name: "Composite", - className: "ApplicationDeploymentPolicy" - } - }, - managementPolicy: { - serializedName: "properties.managementPolicy", - type: { - name: "Composite", - className: "ApplicationManagementPolicy" - } - }, - policies: { - serializedName: "properties.policies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationPolicy" - } - } - } } } } diff --git a/sdk/managedapplications/arm-managedapplications/src/models/parameters.ts b/sdk/managedapplications/arm-managedapplications/src/models/parameters.ts index 86f119d130c6..edf96961fd7c 100644 --- a/sdk/managedapplications/arm-managedapplications/src/models/parameters.ts +++ b/sdk/managedapplications/arm-managedapplications/src/models/parameters.ts @@ -14,12 +14,7 @@ import { import { Application as ApplicationMapper, ApplicationPatchable as ApplicationPatchableMapper, - UpdateAccessDefinition as UpdateAccessDefinitionMapper, - ListTokenRequest as ListTokenRequestMapper, - ApplicationDefinition as ApplicationDefinitionMapper, - ApplicationDefinitionPatchable as ApplicationDefinitionPatchableMapper, - JitRequestDefinition as JitRequestDefinitionMapper, - JitRequestPatchable as JitRequestPatchableMapper + ApplicationDefinition as ApplicationDefinitionMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -49,7 +44,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-07-01", + defaultValue: "2018-06-01", isConstant: true, serializedName: "api-version", type: { @@ -70,24 +65,11 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } -}; - export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), MaxLength: 90, MinLength: 1 }, @@ -114,6 +96,17 @@ export const applicationName: OperationURLParameter = { } }; +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], mapper: { @@ -149,13 +142,8 @@ export const applicationId: OperationURLParameter = { }; export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: UpdateAccessDefinitionMapper -}; - -export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: ListTokenRequestMapper + parameterPath: ["options", "parameters"], + mapper: ApplicationMapper }; export const applicationDefinitionName: OperationURLParameter = { @@ -173,49 +161,7 @@ export const applicationDefinitionName: OperationURLParameter = { } }; -export const parameters4: OperationParameter = { +export const parameters3: OperationParameter = { parameterPath: "parameters", mapper: ApplicationDefinitionMapper }; - -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationDefinitionPatchableMapper -}; - -export const resourceGroupName1: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), - MaxLength: 90, - MinLength: 1 - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String" - } - } -}; - -export const jitRequestName: OperationURLParameter = { - parameterPath: "jitRequestName", - mapper: { - serializedName: "jitRequestName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: JitRequestDefinitionMapper -}; - -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: JitRequestPatchableMapper -}; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts b/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts index 079ec224a111..9f82f8911dd3 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts @@ -13,31 +13,28 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ApplicationClient } from "../applicationClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ApplicationDefinition, ApplicationDefinitionsListByResourceGroupNextOptionalParams, ApplicationDefinitionsListByResourceGroupOptionalParams, ApplicationDefinitionsListByResourceGroupResponse, - ApplicationDefinitionsListBySubscriptionNextOptionalParams, - ApplicationDefinitionsListBySubscriptionOptionalParams, - ApplicationDefinitionsListBySubscriptionResponse, ApplicationDefinitionsGetOptionalParams, ApplicationDefinitionsGetResponse, ApplicationDefinitionsDeleteOptionalParams, ApplicationDefinitionsCreateOrUpdateOptionalParams, ApplicationDefinitionsCreateOrUpdateResponse, - ApplicationDefinitionPatchable, - ApplicationDefinitionsUpdateOptionalParams, - ApplicationDefinitionsUpdateResponse, ApplicationDefinitionsGetByIdOptionalParams, ApplicationDefinitionsGetByIdResponse, ApplicationDefinitionsDeleteByIdOptionalParams, ApplicationDefinitionsCreateOrUpdateByIdOptionalParams, ApplicationDefinitionsCreateOrUpdateByIdResponse, - ApplicationDefinitionsUpdateByIdOptionalParams, - ApplicationDefinitionsUpdateByIdResponse, - ApplicationDefinitionsListByResourceGroupNextResponse, - ApplicationDefinitionsListBySubscriptionNextResponse + ApplicationDefinitionsListByResourceGroupNextResponse } from "../models"; /// @@ -122,60 +119,6 @@ export class ApplicationDefinitionsImpl implements ApplicationDefinitions { } } - /** - * Lists all the application definitions within a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: ApplicationDefinitionsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: ApplicationDefinitionsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApplicationDefinitionsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: ApplicationDefinitionsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - /** * Gets the managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -196,56 +139,183 @@ export class ApplicationDefinitionsImpl implements ApplicationDefinitions { /** * Deletes the managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationDefinitionName The name of the managed application definition. + * @param applicationDefinitionName The name of the managed application definition to delete. * @param options The options parameters. */ - delete( + async beginDelete( + resourceGroupName: string, + applicationDefinitionName: string, + options?: ApplicationDefinitionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, applicationDefinitionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition to delete. + * @param options The options parameters. + */ + async beginDeleteAndWait( resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteOptionalParams ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationDefinitionName, options }, - deleteOperationSpec + const poller = await this.beginDelete( + resourceGroupName, + applicationDefinitionName, + options ); + return poller.pollUntilDone(); } /** - * Creates or updates a managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. * @param parameters Parameters supplied to the create or update an managed application definition. * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationDefinitionName, parameters, options }, - createOrUpdateOperationSpec - ); + ): Promise< + SimplePollerLike< + OperationState, + ApplicationDefinitionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + applicationDefinitionName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApplicationDefinitionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; } /** - * Updates the managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. - * @param parameters Parameters supplied to the update a managed application definition. + * @param parameters Parameters supplied to the create or update an managed application definition. * @param options The options parameters. */ - update( + async beginCreateOrUpdateAndWait( resourceGroupName: string, applicationDefinitionName: string, - parameters: ApplicationDefinitionPatchable, - options?: ApplicationDefinitionsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationDefinitionName, parameters, options }, - updateOperationSpec + parameters: ApplicationDefinition, + options?: ApplicationDefinitionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + applicationDefinitionName, + parameters, + options ); + return poller.pollUntilDone(); } /** @@ -263,19 +333,6 @@ export class ApplicationDefinitionsImpl implements ApplicationDefinitions { ); } - /** - * Lists all the application definitions within a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ApplicationDefinitionsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - /** * Gets the managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -299,53 +356,180 @@ export class ApplicationDefinitionsImpl implements ApplicationDefinitions { * @param applicationDefinitionName The name of the managed application definition. * @param options The options parameters. */ - deleteById( + async beginDeleteById( + resourceGroupName: string, + applicationDefinitionName: string, + options?: ApplicationDefinitionsDeleteByIdOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, applicationDefinitionName, options }, + spec: deleteByIdOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param options The options parameters. + */ + async beginDeleteByIdAndWait( resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteByIdOptionalParams ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationDefinitionName, options }, - deleteByIdOperationSpec + const poller = await this.beginDeleteById( + resourceGroupName, + applicationDefinitionName, + options ); + return poller.pollUntilDone(); } /** - * Creates or updates a managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. * @param parameters Parameters supplied to the create or update a managed application definition. * @param options The options parameters. */ - createOrUpdateById( + async beginCreateOrUpdateById( resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationDefinitionName, parameters, options }, - createOrUpdateByIdOperationSpec - ); + ): Promise< + SimplePollerLike< + OperationState, + ApplicationDefinitionsCreateOrUpdateByIdResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + applicationDefinitionName, + parameters, + options + }, + spec: createOrUpdateByIdOperationSpec + }); + const poller = await createHttpPoller< + ApplicationDefinitionsCreateOrUpdateByIdResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; } /** - * Updates the managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. - * @param parameters Parameters supplied to the update a managed application definition. + * @param parameters Parameters supplied to the create or update a managed application definition. * @param options The options parameters. */ - updateById( + async beginCreateOrUpdateByIdAndWait( resourceGroupName: string, applicationDefinitionName: string, - parameters: ApplicationDefinitionPatchable, - options?: ApplicationDefinitionsUpdateByIdOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationDefinitionName, parameters, options }, - updateByIdOperationSpec + parameters: ApplicationDefinition, + options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdateById( + resourceGroupName, + applicationDefinitionName, + parameters, + options ); + return poller.pollUntilDone(); } /** @@ -364,21 +548,6 @@ export class ApplicationDefinitionsImpl implements ApplicationDefinitions { listByResourceGroupNextOperationSpec ); } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ApplicationDefinitionsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -399,8 +568,8 @@ const getOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.applicationDefinitionName ], headerParameters: [Parameters.accept], @@ -412,6 +581,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { httpMethod: "DELETE", responses: { 200: {}, + 201: {}, + 202: {}, 204: {}, default: { bodyMapper: Mappers.ErrorResponse @@ -420,8 +591,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.applicationDefinitionName ], headerParameters: [Parameters.accept], @@ -438,40 +609,22 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { 201: { bodyMapper: Mappers.ApplicationDefinition }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.applicationDefinitionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", - httpMethod: "PATCH", - responses: { - 200: { + 202: { + bodyMapper: Mappers.ApplicationDefinition + }, + 204: { bodyMapper: Mappers.ApplicationDefinition }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.applicationDefinitionName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -493,29 +646,12 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applicationDefinitions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationDefinitionListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; const getByIdOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", @@ -532,9 +668,9 @@ const getByIdOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.applicationDefinitionName, - Parameters.resourceGroupName1 + Parameters.applicationDefinitionName ], headerParameters: [Parameters.accept], serializer @@ -545,6 +681,8 @@ const deleteByIdOperationSpec: coreClient.OperationSpec = { httpMethod: "DELETE", responses: { 200: {}, + 201: {}, + 202: {}, 204: {}, default: { bodyMapper: Mappers.ErrorResponse @@ -553,9 +691,9 @@ const deleteByIdOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.applicationDefinitionName, - Parameters.resourceGroupName1 + Parameters.applicationDefinitionName ], headerParameters: [Parameters.accept], serializer @@ -571,40 +709,22 @@ const createOrUpdateByIdOperationSpec: coreClient.OperationSpec = { 201: { bodyMapper: Mappers.ApplicationDefinition }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.applicationDefinitionName, - Parameters.resourceGroupName1 - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateByIdOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", - httpMethod: "PATCH", - responses: { - 200: { + 202: { + bodyMapper: Mappers.ApplicationDefinition + }, + 204: { bodyMapper: Mappers.ApplicationDefinition }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.applicationDefinitionName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -625,26 +745,7 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationDefinitionListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, + Parameters.resourceGroupName, Parameters.subscriptionId ], headerParameters: [Parameters.accept], diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts b/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts index 7b4ccff523fa..f8721e78bce1 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts @@ -41,14 +41,6 @@ import { ApplicationsCreateOrUpdateByIdResponse, ApplicationsUpdateByIdOptionalParams, ApplicationsUpdateByIdResponse, - ApplicationsRefreshPermissionsOptionalParams, - ApplicationsListAllowedUpgradePlansOptionalParams, - ApplicationsListAllowedUpgradePlansResponse, - UpdateAccessDefinition, - ApplicationsUpdateAccessOptionalParams, - ListTokenRequest, - ApplicationsListTokensOptionalParams, - ApplicationsListTokensResponse, ApplicationsListByResourceGroupNextResponse, ApplicationsListBySubscriptionNextResponse } from "../models"; @@ -67,7 +59,7 @@ export class ApplicationsImpl implements Applications { } /** - * Lists all the applications within a resource group. + * Gets all the applications within a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -136,7 +128,7 @@ export class ApplicationsImpl implements Applications { } /** - * Lists all the applications within a subscription. + * Gets all the applications within a subscription. * @param options The options parameters. */ public listBySubscription( @@ -263,8 +255,7 @@ export class ApplicationsImpl implements Applications { }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + intervalInMs: options?.updateIntervalInMs }); await poller.poll(); return poller; @@ -290,7 +281,7 @@ export class ApplicationsImpl implements Applications { } /** - * Creates or updates a managed application. + * Creates a new managed application. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationName The name of the managed application. * @param parameters Parameters supplied to the create or update a managed application. @@ -356,15 +347,14 @@ export class ApplicationsImpl implements Applications { OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + intervalInMs: options?.updateIntervalInMs }); await poller.poll(); return poller; } /** - * Creates or updates a managed application. + * Creates a new managed application. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationName The name of the managed application. * @param parameters Parameters supplied to the create or update a managed application. @@ -386,98 +376,25 @@ export class ApplicationsImpl implements Applications { } /** - * Updates an existing managed application. + * Updates an existing managed application. The only value that can be updated via PATCH currently is + * the tags. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationName The name of the managed application. * @param options The options parameters. */ - async beginUpdate( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationName, options }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - ApplicationsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Updates an existing managed application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - async beginUpdateAndWait( + update( resourceGroupName: string, applicationName: string, options?: ApplicationsUpdateOptionalParams ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - applicationName, - options + return this.client.sendOperationRequest( + { resourceGroupName, applicationName, options }, + updateOperationSpec ); - return poller.pollUntilDone(); } /** - * Lists all the applications within a resource group. + * Gets all the applications within a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -492,7 +409,7 @@ export class ApplicationsImpl implements Applications { } /** - * Lists all the applications within a subscription. + * Gets all the applications within a subscription. * @param options The options parameters. */ private _listBySubscription( @@ -578,8 +495,7 @@ export class ApplicationsImpl implements Applications { }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + intervalInMs: options?.updateIntervalInMs }); await poller.poll(); return poller; @@ -601,7 +517,7 @@ export class ApplicationsImpl implements Applications { } /** - * Creates or updates a managed application. + * Creates a new managed application. * @param applicationId The fully qualified ID of the managed application, including the managed * application name and the managed application resource type. Use the format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @@ -667,15 +583,14 @@ export class ApplicationsImpl implements Applications { OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + intervalInMs: options?.updateIntervalInMs }); await poller.poll(); return poller; } /** - * Creates or updates a managed application. + * Creates a new managed application. * @param applicationId The fully qualified ID of the managed application, including the managed * application name and the managed application resource type. Use the format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @@ -696,296 +611,20 @@ export class ApplicationsImpl implements Applications { } /** - * Updates an existing managed application. - * @param applicationId The fully qualified ID of the managed application, including the managed - * application name and the managed application resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} - * @param options The options parameters. - */ - async beginUpdateById( - applicationId: string, - options?: ApplicationsUpdateByIdOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsUpdateByIdResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { applicationId, options }, - spec: updateByIdOperationSpec - }); - const poller = await createHttpPoller< - ApplicationsUpdateByIdResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Updates an existing managed application. + * Updates an existing managed application. The only value that can be updated via PATCH currently is + * the tags. * @param applicationId The fully qualified ID of the managed application, including the managed * application name and the managed application resource type. Use the format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} * @param options The options parameters. */ - async beginUpdateByIdAndWait( + updateById( applicationId: string, options?: ApplicationsUpdateByIdOptionalParams ): Promise { - const poller = await this.beginUpdateById(applicationId, options); - return poller.pollUntilDone(); - } - - /** - * Refresh Permissions for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - async beginRefreshPermissions( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsRefreshPermissionsOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationName, options }, - spec: refreshPermissionsOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Refresh Permissions for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - async beginRefreshPermissionsAndWait( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsRefreshPermissionsOptionalParams - ): Promise { - const poller = await this.beginRefreshPermissions( - resourceGroupName, - applicationName, - options - ); - return poller.pollUntilDone(); - } - - /** - * List allowed upgrade plans for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - listAllowedUpgradePlans( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsListAllowedUpgradePlansOptionalParams - ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, applicationName, options }, - listAllowedUpgradePlansOperationSpec - ); - } - - /** - * Update access for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param parameters Request body parameters to list tokens. - * @param options The options parameters. - */ - async beginUpdateAccess( - resourceGroupName: string, - applicationName: string, - parameters: UpdateAccessDefinition, - options?: ApplicationsUpdateAccessOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, applicationName, parameters, options }, - spec: updateAccessOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Update access for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param parameters Request body parameters to list tokens. - * @param options The options parameters. - */ - async beginUpdateAccessAndWait( - resourceGroupName: string, - applicationName: string, - parameters: UpdateAccessDefinition, - options?: ApplicationsUpdateAccessOptionalParams - ): Promise { - const poller = await this.beginUpdateAccess( - resourceGroupName, - applicationName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * List tokens for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param parameters Request body parameters to list tokens. - * @param options The options parameters. - */ - listTokens( - resourceGroupName: string, - applicationName: string, - parameters: ListTokenRequest, - options?: ApplicationsListTokensOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, applicationName, parameters, options }, - listTokensOperationSpec + { applicationId, options }, + updateByIdOperationSpec ); } @@ -1040,9 +679,9 @@ const getOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.applicationName + Parameters.applicationName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1063,9 +702,9 @@ const deleteOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.applicationName + Parameters.applicationName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1095,9 +734,9 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.applicationName + Parameters.applicationName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1109,16 +748,7 @@ const updateOperationSpec: coreClient.OperationSpec = { httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.ApplicationPatchable - }, - 201: { - bodyMapper: Mappers.ApplicationPatchable - }, - 202: { - bodyMapper: Mappers.ApplicationPatchable - }, - 204: { - bodyMapper: Mappers.ApplicationPatchable + bodyMapper: Mappers.Application }, default: { bodyMapper: Mappers.ErrorResponse @@ -1128,9 +758,9 @@ const updateOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.applicationName + Parameters.applicationName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1151,8 +781,8 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1240,118 +870,15 @@ const updateByIdOperationSpec: coreClient.OperationSpec = { httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.ApplicationPatchable - }, - 201: { - bodyMapper: Mappers.ApplicationPatchable - }, - 202: { - bodyMapper: Mappers.ApplicationPatchable - }, - 204: { - bodyMapper: Mappers.ApplicationPatchable - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.applicationId], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const refreshPermissionsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/refreshPermissions", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.applicationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listAllowedUpgradePlansOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/listAllowedUpgradePlans", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AllowedUpgradePlansResult + bodyMapper: Mappers.Application }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.applicationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateAccessOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/updateAccess", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.applicationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listTokensOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/listTokens", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ManagedIdentityTokenResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.applicationName - ], + urlParameters: [Parameters.$host, Parameters.applicationId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer @@ -1370,8 +897,8 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/index.ts b/sdk/managedapplications/arm-managedapplications/src/operations/index.ts index 63259e0e45c4..6ca98c210b1c 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operations/index.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operations/index.ts @@ -8,4 +8,3 @@ export * from "./applications"; export * from "./applicationDefinitions"; -export * from "./jitRequests"; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts b/sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts deleted file mode 100644 index 1005d0e2b145..000000000000 --- a/sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { JitRequests } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApplicationClient } from "../applicationClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - JitRequestsGetOptionalParams, - JitRequestsGetResponse, - JitRequestDefinition, - JitRequestsCreateOrUpdateOptionalParams, - JitRequestsCreateOrUpdateResponse, - JitRequestPatchable, - JitRequestsUpdateOptionalParams, - JitRequestsUpdateResponse, - JitRequestsDeleteOptionalParams, - JitRequestsListBySubscriptionOptionalParams, - JitRequestsListBySubscriptionResponse, - JitRequestsListByResourceGroupOptionalParams, - JitRequestsListByResourceGroupResponse -} from "../models"; - -/** Class containing JitRequests operations. */ -export class JitRequestsImpl implements JitRequests { - private readonly client: ApplicationClient; - - /** - * Initialize a new instance of the class JitRequests class. - * @param client Reference to the service client - */ - constructor(client: ApplicationClient) { - this.client = client; - } - - /** - * Gets the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - jitRequestName: string, - options?: JitRequestsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, jitRequestName, options }, - getOperationSpec - ); - } - - /** - * Creates or updates the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param parameters Parameters supplied to the update JIT request. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - jitRequestName: string, - parameters: JitRequestDefinition, - options?: JitRequestsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - JitRequestsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = 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 = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, jitRequestName, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - JitRequestsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param parameters Parameters supplied to the update JIT request. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - jitRequestName: string, - parameters: JitRequestDefinition, - options?: JitRequestsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - jitRequestName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Updates the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param parameters Parameters supplied to the update JIT request. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - jitRequestName: string, - parameters: JitRequestPatchable, - options?: JitRequestsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, jitRequestName, parameters, options }, - updateOperationSpec - ); - } - - /** - * Deletes the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - jitRequestName: string, - options?: JitRequestsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, jitRequestName, options }, - deleteOperationSpec - ); - } - - /** - * Lists all JIT requests within the subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: JitRequestsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Lists all JIT requests within the resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: JitRequestsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.JitRequestDefinition - }, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jitRequestName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.JitRequestDefinition - }, - 201: { - bodyMapper: Mappers.JitRequestDefinition - }, - 202: { - bodyMapper: Mappers.JitRequestDefinition - }, - 204: { - bodyMapper: Mappers.JitRequestDefinition - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jitRequestName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.JitRequestDefinition - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jitRequestName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jitRequestName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/jitRequests", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.JitRequestDefinitionListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.JitRequestDefinitionListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applicationDefinitions.ts b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applicationDefinitions.ts index f170bdb34088..ac174546be36 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applicationDefinitions.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applicationDefinitions.ts @@ -7,25 +7,20 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ApplicationDefinition, ApplicationDefinitionsListByResourceGroupOptionalParams, - ApplicationDefinitionsListBySubscriptionOptionalParams, ApplicationDefinitionsGetOptionalParams, ApplicationDefinitionsGetResponse, ApplicationDefinitionsDeleteOptionalParams, ApplicationDefinitionsCreateOrUpdateOptionalParams, ApplicationDefinitionsCreateOrUpdateResponse, - ApplicationDefinitionPatchable, - ApplicationDefinitionsUpdateOptionalParams, - ApplicationDefinitionsUpdateResponse, ApplicationDefinitionsGetByIdOptionalParams, ApplicationDefinitionsGetByIdResponse, ApplicationDefinitionsDeleteByIdOptionalParams, ApplicationDefinitionsCreateOrUpdateByIdOptionalParams, - ApplicationDefinitionsCreateOrUpdateByIdResponse, - ApplicationDefinitionsUpdateByIdOptionalParams, - ApplicationDefinitionsUpdateByIdResponse + ApplicationDefinitionsCreateOrUpdateByIdResponse } from "../models"; /// @@ -40,13 +35,6 @@ export interface ApplicationDefinitions { resourceGroupName: string, options?: ApplicationDefinitionsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; - /** - * Lists all the application definitions within a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ApplicationDefinitionsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; /** * Gets the managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -61,40 +49,56 @@ export interface ApplicationDefinitions { /** * Deletes the managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationDefinitionName The name of the managed application definition. + * @param applicationDefinitionName The name of the managed application definition to delete. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + applicationDefinitionName: string, + options?: ApplicationDefinitionsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition to delete. * @param options The options parameters. */ - delete( + beginDeleteAndWait( resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteOptionalParams ): Promise; /** - * Creates or updates a managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. * @param parameters Parameters supplied to the create or update an managed application definition. * @param options The options parameters. */ - createOrUpdate( + beginCreateOrUpdate( resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateOptionalParams - ): Promise; + ): Promise< + SimplePollerLike< + OperationState, + ApplicationDefinitionsCreateOrUpdateResponse + > + >; /** - * Updates the managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. - * @param parameters Parameters supplied to the update a managed application definition. + * @param parameters Parameters supplied to the create or update an managed application definition. * @param options The options parameters. */ - update( + beginCreateOrUpdateAndWait( resourceGroupName: string, applicationDefinitionName: string, - parameters: ApplicationDefinitionPatchable, - options?: ApplicationDefinitionsUpdateOptionalParams - ): Promise; + parameters: ApplicationDefinition, + options?: ApplicationDefinitionsCreateOrUpdateOptionalParams + ): Promise; /** * Gets the managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -112,35 +116,51 @@ export interface ApplicationDefinitions { * @param applicationDefinitionName The name of the managed application definition. * @param options The options parameters. */ - deleteById( + beginDeleteById( + resourceGroupName: string, + applicationDefinitionName: string, + options?: ApplicationDefinitionsDeleteByIdOptionalParams + ): Promise, void>>; + /** + * Deletes the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param options The options parameters. + */ + beginDeleteByIdAndWait( resourceGroupName: string, applicationDefinitionName: string, options?: ApplicationDefinitionsDeleteByIdOptionalParams ): Promise; /** - * Creates or updates a managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. * @param parameters Parameters supplied to the create or update a managed application definition. * @param options The options parameters. */ - createOrUpdateById( + beginCreateOrUpdateById( resourceGroupName: string, applicationDefinitionName: string, parameters: ApplicationDefinition, options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams - ): Promise; + ): Promise< + SimplePollerLike< + OperationState, + ApplicationDefinitionsCreateOrUpdateByIdResponse + > + >; /** - * Updates the managed application definition. + * Creates a new managed application definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationDefinitionName The name of the managed application definition. - * @param parameters Parameters supplied to the update a managed application definition. + * @param parameters Parameters supplied to the create or update a managed application definition. * @param options The options parameters. */ - updateById( + beginCreateOrUpdateByIdAndWait( resourceGroupName: string, applicationDefinitionName: string, - parameters: ApplicationDefinitionPatchable, - options?: ApplicationDefinitionsUpdateByIdOptionalParams - ): Promise; + parameters: ApplicationDefinition, + options?: ApplicationDefinitionsCreateOrUpdateByIdOptionalParams + ): Promise; } diff --git a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applications.ts b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applications.ts index 7a1527981881..33cd27cca1b3 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applications.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/applications.ts @@ -25,22 +25,14 @@ import { ApplicationsCreateOrUpdateByIdOptionalParams, ApplicationsCreateOrUpdateByIdResponse, ApplicationsUpdateByIdOptionalParams, - ApplicationsUpdateByIdResponse, - ApplicationsRefreshPermissionsOptionalParams, - ApplicationsListAllowedUpgradePlansOptionalParams, - ApplicationsListAllowedUpgradePlansResponse, - UpdateAccessDefinition, - ApplicationsUpdateAccessOptionalParams, - ListTokenRequest, - ApplicationsListTokensOptionalParams, - ApplicationsListTokensResponse + ApplicationsUpdateByIdResponse } from "../models"; /// /** Interface representing a Applications. */ export interface Applications { /** - * Lists all the applications within a resource group. + * Gets all the applications within a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -49,7 +41,7 @@ export interface Applications { options?: ApplicationsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Lists all the applications within a subscription. + * Gets all the applications within a subscription. * @param options The options parameters. */ listBySubscription( @@ -89,7 +81,7 @@ export interface Applications { options?: ApplicationsDeleteOptionalParams ): Promise; /** - * Creates or updates a managed application. + * Creates a new managed application. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationName The name of the managed application. * @param parameters Parameters supplied to the create or update a managed application. @@ -107,7 +99,7 @@ export interface Applications { > >; /** - * Creates or updates a managed application. + * Creates a new managed application. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationName The name of the managed application. * @param parameters Parameters supplied to the create or update a managed application. @@ -120,28 +112,13 @@ export interface Applications { options?: ApplicationsCreateOrUpdateOptionalParams ): Promise; /** - * Updates an existing managed application. + * Updates an existing managed application. The only value that can be updated via PATCH currently is + * the tags. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationName The name of the managed application. * @param options The options parameters. */ - beginUpdate( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsUpdateResponse - > - >; - /** - * Updates an existing managed application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - beginUpdateAndWait( + update( resourceGroupName: string, applicationName: string, options?: ApplicationsUpdateOptionalParams @@ -180,7 +157,7 @@ export interface Applications { options?: ApplicationsDeleteByIdOptionalParams ): Promise; /** - * Creates or updates a managed application. + * Creates a new managed application. * @param applicationId The fully qualified ID of the managed application, including the managed * application name and the managed application resource type. Use the format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @@ -198,7 +175,7 @@ export interface Applications { > >; /** - * Creates or updates a managed application. + * Creates a new managed application. * @param applicationId The fully qualified ID of the managed application, including the managed * application name and the managed application resource type. Use the format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @@ -211,102 +188,15 @@ export interface Applications { options?: ApplicationsCreateOrUpdateByIdOptionalParams ): Promise; /** - * Updates an existing managed application. + * Updates an existing managed application. The only value that can be updated via PATCH currently is + * the tags. * @param applicationId The fully qualified ID of the managed application, including the managed * application name and the managed application resource type. Use the format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} * @param options The options parameters. */ - beginUpdateById( - applicationId: string, - options?: ApplicationsUpdateByIdOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsUpdateByIdResponse - > - >; - /** - * Updates an existing managed application. - * @param applicationId The fully qualified ID of the managed application, including the managed - * application name and the managed application resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} - * @param options The options parameters. - */ - beginUpdateByIdAndWait( + updateById( applicationId: string, options?: ApplicationsUpdateByIdOptionalParams ): Promise; - /** - * Refresh Permissions for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - beginRefreshPermissions( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsRefreshPermissionsOptionalParams - ): Promise, void>>; - /** - * Refresh Permissions for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - beginRefreshPermissionsAndWait( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsRefreshPermissionsOptionalParams - ): Promise; - /** - * List allowed upgrade plans for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param options The options parameters. - */ - listAllowedUpgradePlans( - resourceGroupName: string, - applicationName: string, - options?: ApplicationsListAllowedUpgradePlansOptionalParams - ): Promise; - /** - * Update access for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param parameters Request body parameters to list tokens. - * @param options The options parameters. - */ - beginUpdateAccess( - resourceGroupName: string, - applicationName: string, - parameters: UpdateAccessDefinition, - options?: ApplicationsUpdateAccessOptionalParams - ): Promise, void>>; - /** - * Update access for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param parameters Request body parameters to list tokens. - * @param options The options parameters. - */ - beginUpdateAccessAndWait( - resourceGroupName: string, - applicationName: string, - parameters: UpdateAccessDefinition, - options?: ApplicationsUpdateAccessOptionalParams - ): Promise; - /** - * List tokens for application. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationName The name of the managed application. - * @param parameters Request body parameters to list tokens. - * @param options The options parameters. - */ - listTokens( - resourceGroupName: string, - applicationName: string, - parameters: ListTokenRequest, - options?: ApplicationsListTokensOptionalParams - ): Promise; } diff --git a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/index.ts b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/index.ts index 63259e0e45c4..6ca98c210b1c 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/index.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/index.ts @@ -8,4 +8,3 @@ export * from "./applications"; export * from "./applicationDefinitions"; -export * from "./jitRequests"; diff --git a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/jitRequests.ts b/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/jitRequests.ts deleted file mode 100644 index 980b0f074b76..000000000000 --- a/sdk/managedapplications/arm-managedapplications/src/operationsInterfaces/jitRequests.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - JitRequestsGetOptionalParams, - JitRequestsGetResponse, - JitRequestDefinition, - JitRequestsCreateOrUpdateOptionalParams, - JitRequestsCreateOrUpdateResponse, - JitRequestPatchable, - JitRequestsUpdateOptionalParams, - JitRequestsUpdateResponse, - JitRequestsDeleteOptionalParams, - JitRequestsListBySubscriptionOptionalParams, - JitRequestsListBySubscriptionResponse, - JitRequestsListByResourceGroupOptionalParams, - JitRequestsListByResourceGroupResponse -} from "../models"; - -/** Interface representing a JitRequests. */ -export interface JitRequests { - /** - * Gets the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - jitRequestName: string, - options?: JitRequestsGetOptionalParams - ): Promise; - /** - * Creates or updates the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param parameters Parameters supplied to the update JIT request. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - jitRequestName: string, - parameters: JitRequestDefinition, - options?: JitRequestsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - JitRequestsCreateOrUpdateResponse - > - >; - /** - * Creates or updates the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param parameters Parameters supplied to the update JIT request. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - jitRequestName: string, - parameters: JitRequestDefinition, - options?: JitRequestsCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param parameters Parameters supplied to the update JIT request. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - jitRequestName: string, - parameters: JitRequestPatchable, - options?: JitRequestsUpdateOptionalParams - ): Promise; - /** - * Deletes the JIT request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jitRequestName The name of the JIT request. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - jitRequestName: string, - options?: JitRequestsDeleteOptionalParams - ): Promise; - /** - * Lists all JIT requests within the subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: JitRequestsListBySubscriptionOptionalParams - ): Promise; - /** - * Lists all JIT requests within the resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: JitRequestsListByResourceGroupOptionalParams - ): Promise; -} diff --git a/sdk/managedapplications/arm-managedapplications/test/sampleTest.ts b/sdk/managedapplications/arm-managedapplications/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/managedapplications/arm-managedapplications/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/managedapplications/arm-managedapplications/tsconfig.json b/sdk/managedapplications/arm-managedapplications/tsconfig.json index 8c28d0f9be7e..5e2d9266f916 100644 --- a/sdk/managedapplications/arm-managedapplications/tsconfig.json +++ b/sdk/managedapplications/arm-managedapplications/tsconfig.json @@ -15,17 +15,16 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-managedapplications": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts", + "./test/**/*.ts", + "./test/**/*.ts", + "./test/**/*.ts", + "./test/**/*.ts" ], "exclude": [ "node_modules"