diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d98a2b64c477..6865a4c81127 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1234,7 +1234,7 @@ packages: dependencies: '@azure/core-auth': 1.4.0 '@azure/core-client': 1.6.1 - '@azure/core-rest-pipeline': 1.9.2 + '@azure/core-rest-pipeline': 1.10.0 '@azure/core-tracing': 1.0.1 '@azure/logger': 1.0.3 tslib: 2.4.1 @@ -2130,6 +2130,7 @@ packages: /@sinonjs/commons/1.8.4: resolution: {integrity: sha512-RpmQdHVo8hCEHDVpO39zToS9jOhR6nw+/lQAzRNq9ErrGV9IeHM71XCn68svVl/euFeVW6BWX4p35gkhbOcSIQ==} + deprecated: Breaks compatibility with ES5, use v1.8.5 dependencies: type-detect: 4.0.8 dev: false @@ -2209,7 +2210,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/chai-as-promised/7.1.5: @@ -2231,7 +2232,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/cookie/0.4.1: @@ -2266,7 +2267,7 @@ packages: /@types/express-serve-static-core/4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2283,20 +2284,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/inquirer/8.2.4: @@ -2308,7 +2309,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/json-schema/7.0.11: @@ -2322,13 +2323,13 @@ packages: /@types/jsonwebtoken/8.5.9: resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/md5/2.3.2: @@ -2364,13 +2365,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/ms/0.7.31: @@ -2388,7 +2389,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 form-data: 3.0.1 dev: false @@ -2443,7 +2444,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/semaphore/1.1.1: @@ -2454,7 +2455,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/sinon/10.0.13: @@ -2476,13 +2477,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/tough-cookie/4.0.2: @@ -2496,13 +2497,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/underscore/1.11.4: @@ -2520,19 +2521,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false /@types/yargs-parser/21.0.0: @@ -2549,7 +2550,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.33 + '@types/node': 18.11.9 dev: false optional: true @@ -3618,7 +3619,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3839,7 +3840,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 4.6.4 + typescript: 4.8.4 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3890,7 +3891,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 14.18.33 + '@types/node': 18.11.9 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4901,7 +4902,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -14092,7 +14093,7 @@ packages: dev: false file:projects/arm-resourceconnector.tgz: - resolution: {integrity: sha512-z8Lyx1xdSk6nnnbXKSUadhp6tbY4jKso3vHjvvHbQcb5nI1Tt+tM2bBM22LvIAKG/Y8eNqtp66Yvymwd29vs2w==, tarball: file:projects/arm-resourceconnector.tgz} + resolution: {integrity: sha512-sypdA+uVOMIU2x1OPRF6Zl3wRIrHFUeHgc7a686K09WozeXUwKVSgbuIUSyhIEnZ2+rLy4qmTksSsK6c7RJOPg==, tarball: file:projects/arm-resourceconnector.tgz} name: '@rush-temp/arm-resourceconnector' version: 0.0.0 dependencies: @@ -14111,7 +14112,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.1 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' @@ -17239,7 +17240,7 @@ packages: dev: false file:projects/keyvault-admin.tgz: - resolution: {integrity: sha512-9AdSE6mAhgBug4+H/fztaInMQdm+ganESX31eqPsHje34Dm4hfo0Caa2ypdEBcTrUOIG99i6M5XUxrhWEb37mQ==, tarball: file:projects/keyvault-admin.tgz} + resolution: {integrity: sha512-hW9yN/ZH5rhLsDyngPRQEP2GwVprO95oKpLJoRjAxt+3g3s0liiCpNhsuvv1TkNM6sfzvAeZnENboeA/OtHO4g==, tarball: file:projects/keyvault-admin.tgz} name: '@rush-temp/keyvault-admin' version: 0.0.0 dependencies: @@ -18908,7 +18909,7 @@ packages: dev: false file:projects/storage-blob.tgz: - resolution: {integrity: sha512-s54hiuhDzRVOEjfW1UpeybQaGgyva8odSDGeX18mpsMrNykqgvv8QCKV2ZDIN2I1KL1GrldwJtJ/pSdSmx9qDA==, tarball: file:projects/storage-blob.tgz} + resolution: {integrity: sha512-gSRlGWebNmHQ0pm27D14SFCHKT2g6vgaRSwL/qho4Me/2wW2NJEG3WLOEq3G7LXivOUKhsHVug8sJlJVmtnOjA==, tarball: file:projects/storage-blob.tgz} name: '@rush-temp/storage-blob' version: 0.0.0 dependencies: diff --git a/sdk/resourceconnector/arm-resourceconnector/CHANGELOG.md b/sdk/resourceconnector/arm-resourceconnector/CHANGELOG.md index 17ec56523d12..a262d21b8c51 100644 --- a/sdk/resourceconnector/arm-resourceconnector/CHANGELOG.md +++ b/sdk/resourceconnector/arm-resourceconnector/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History - -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.1 (2022-06-28) + +## 1.0.0 (2022-11-08) The package of @azure/arm-resourceconnector is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/resourceconnector/arm-resourceconnector/README.md b/sdk/resourceconnector/arm-resourceconnector/README.md index 1b2077fda729..0a8d8a33a9c2 100644 --- a/sdk/resourceconnector/arm-resourceconnector/README.md +++ b/sdk/resourceconnector/arm-resourceconnector/README.md @@ -6,7 +6,7 @@ The appliances Rest API spec. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourceconnector/arm-resourceconnector) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-resourceconnector) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-resourceconnector?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-resourceconnector) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/resourceconnector/arm-resourceconnector/_meta.json b/sdk/resourceconnector/arm-resourceconnector/_meta.json index 7824cc98c15b..2d8b89800e76 100644 --- a/sdk/resourceconnector/arm-resourceconnector/_meta.json +++ b/sdk/resourceconnector/arm-resourceconnector/_meta.json @@ -1,8 +1,8 @@ { - "commit": "b8fc2b4ff626aab886f929e49926c6e836548e01", + "commit": "582357ffeb2d46e56b27ec48cc9a3b13cdbd4263", "readme": "specification/resourceconnector/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\resourceconnector\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resourceconnector/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", - "use": "@autorest/typescript@6.0.0-rc.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/resourceconnector/arm-resourceconnector/package.json b/sdk/resourceconnector/arm-resourceconnector/package.json index 3d4203900a03..6d427dd13e7f 100644 --- a/sdk/resourceconnector/arm-resourceconnector/package.json +++ b/sdk/resourceconnector/arm-resourceconnector/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ResourceConnectorManagementClient.", - "version": "1.0.0-beta.2", + "version": "1.0.0", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resourceconnector?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/resourceconnector/arm-resourceconnector/recordings/node/my_test/recording_sample_test.json b/sdk/resourceconnector/arm-resourceconnector/recordings/node/my_test/recording_sample_test.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/recordings/node/my_test/recording_sample_test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/resourceconnector/arm-resourceconnector/review/arm-resourceconnector.api.md b/sdk/resourceconnector/arm-resourceconnector/review/arm-resourceconnector.api.md index e85310991509..a2e3c4e14941 100644 --- a/sdk/resourceconnector/arm-resourceconnector/review/arm-resourceconnector.api.md +++ b/sdk/resourceconnector/arm-resourceconnector/review/arm-resourceconnector.api.md @@ -21,7 +21,6 @@ export interface Appliance extends TrackedResource { readonly provisioningState?: string; publicKey?: string; readonly status?: Status; - readonly systemData?: SystemData; version?: string; } @@ -32,11 +31,8 @@ export interface ApplianceCredentialKubeconfig { } // @public -export interface ApplianceListClusterCustomerUserCredentialResults { - readonly kubeconfigs?: ApplianceCredentialKubeconfig[]; - readonly sshKeys?: { - [propertyName: string]: SSHKey; - }; +export interface ApplianceGetTelemetryConfigResult { + readonly telemetryInstrumentationKey?: string; } // @public @@ -45,6 +41,17 @@ export interface ApplianceListCredentialResults { readonly kubeconfigs?: ApplianceCredentialKubeconfig[]; } +// @public +export interface ApplianceListKeysResults { + readonly artifactProfiles?: { + [propertyName: string]: ArtifactProfile; + }; + readonly kubeconfigs?: ApplianceCredentialKubeconfig[]; + readonly sshKeys?: { + [propertyName: string]: SSHKey; + }; +} + // @public export interface ApplianceListResult { readonly nextLink?: string; @@ -80,11 +87,12 @@ export interface Appliances { beginDelete(resourceGroupName: string, resourceName: string, options?: AppliancesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: AppliancesDeleteOptionalParams): Promise; get(resourceGroupName: string, resourceName: string, options?: AppliancesGetOptionalParams): Promise; + getTelemetryConfig(options?: AppliancesGetTelemetryConfigOptionalParams): Promise; getUpgradeGraph(resourceGroupName: string, resourceName: string, upgradeGraph: string, options?: AppliancesGetUpgradeGraphOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: AppliancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: AppliancesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - listClusterCustomerUserCredential(resourceGroupName: string, resourceName: string, options?: AppliancesListClusterCustomerUserCredentialOptionalParams): Promise; listClusterUserCredential(resourceGroupName: string, resourceName: string, options?: AppliancesListClusterUserCredentialOptionalParams): Promise; + listKeys(resourceGroupName: string, resourceName: string, options?: AppliancesListKeysOptionalParams): Promise; listOperations(options?: AppliancesListOperationsOptionalParams): PagedAsyncIterableIterator; update(resourceGroupName: string, resourceName: string, options?: AppliancesUpdateOptionalParams): Promise; } @@ -111,6 +119,13 @@ export interface AppliancesGetOptionalParams extends coreClient.OperationOptions // @public export type AppliancesGetResponse = Appliance; +// @public +export interface AppliancesGetTelemetryConfigOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppliancesGetTelemetryConfigResponse = ApplianceGetTelemetryConfigResult; + // @public export interface AppliancesGetUpgradeGraphOptionalParams extends coreClient.OperationOptions { } @@ -147,18 +162,18 @@ export interface AppliancesListBySubscriptionOptionalParams extends coreClient.O export type AppliancesListBySubscriptionResponse = ApplianceListResult; // @public -export interface AppliancesListClusterCustomerUserCredentialOptionalParams extends coreClient.OperationOptions { +export interface AppliancesListClusterUserCredentialOptionalParams extends coreClient.OperationOptions { } // @public -export type AppliancesListClusterCustomerUserCredentialResponse = ApplianceListClusterCustomerUserCredentialResults; +export type AppliancesListClusterUserCredentialResponse = ApplianceListCredentialResults; // @public -export interface AppliancesListClusterUserCredentialOptionalParams extends coreClient.OperationOptions { +export interface AppliancesListKeysOptionalParams extends coreClient.OperationOptions { } // @public -export type AppliancesListClusterUserCredentialResponse = ApplianceListCredentialResults; +export type AppliancesListKeysResponse = ApplianceListKeysResults; // @public export interface AppliancesListOperationsNextOptionalParams extends coreClient.OperationOptions { @@ -184,6 +199,14 @@ export interface AppliancesUpdateOptionalParams extends coreClient.OperationOpti // @public export type AppliancesUpdateResponse = Appliance; +// @public +export interface ArtifactProfile { + readonly endpoint?: string; +} + +// @public +export type ArtifactType = string; + // @public export type CreatedByType = string; @@ -231,6 +254,11 @@ export enum KnownAccessProfileType { ClusterUser = "clusterUser" } +// @public +export enum KnownArtifactType { + LogsArtifactType = "LogsArtifactType" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -261,6 +289,9 @@ export enum KnownResourceIdentityType { // @public export enum KnownSSHKeyType { + LogsKey = "LogsKey", + ManagementCAKey = "ManagementCAKey", + ScopedAccessKey = "ScopedAccessKey", SSHCustomerUser = "SSHCustomerUser" } @@ -268,6 +299,13 @@ export enum KnownSSHKeyType { export enum KnownStatus { Connected = "Connected", Connecting = "Connecting", + ImageDeprovisioning = "ImageDeprovisioning", + ImageDownloaded = "ImageDownloaded", + ImageDownloading = "ImageDownloading", + ImagePending = "ImagePending", + ImageProvisioned = "ImageProvisioned", + ImageProvisioning = "ImageProvisioning", + ImageUnknown = "ImageUnknown", None = "None", Offline = "Offline", PostUpgrade = "PostUpgrade", @@ -281,9 +319,11 @@ export enum KnownStatus { UpgradeComplete = "UpgradeComplete", UpgradeFailed = "UpgradeFailed", UpgradePrerequisitesCompleted = "UpgradePrerequisitesCompleted", + UpgradingKvaio = "UpgradingKVAIO", Validating = "Validating", WaitingForCloudOperator = "WaitingForCloudOperator", - WaitingForHeartbeat = "WaitingForHeartbeat" + WaitingForHeartbeat = "WaitingForHeartbeat", + WaitingForKvaio = "WaitingForKVAIO" } // @public @@ -300,6 +340,7 @@ export type Provider = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -328,8 +369,11 @@ export type ResourceIdentityType = string; // @public export interface SSHKey { - privateKey?: string; - publicKey?: string; + readonly certificate?: string; + readonly creationTimeStamp?: number; + readonly expirationTimeStamp?: number; + readonly privateKey?: string; + readonly publicKey?: string; } // @public diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesCreateOrUpdateSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesCreateOrUpdateSample.ts deleted file mode 100644 index 99946a5d9a96..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Appliance, - ResourceConnectorManagementClient -} from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an Appliance in the specified Subscription and Resource Group. - * - * @summary Creates or updates an Appliance in the specified Subscription and Resource Group. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesCreate_Update.json - */ -async function createOrUpdateAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const parameters: Appliance = { - distro: "AKSEdge", - infrastructureConfig: { provider: "VMWare" }, - location: "West US" - }; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters - ); - console.log(result); -} - -createOrUpdateAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesDeleteSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesDeleteSample.ts deleted file mode 100644 index 7b3f3faa0871..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesDeleteSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * - * @summary Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesDelete.json - */ -async function deleteAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.beginDeleteAndWait( - resourceGroupName, - resourceName - ); - console.log(result); -} - -deleteAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesGetSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesGetSample.ts deleted file mode 100644 index fdd7de2f8453..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesGetSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets the details of an Appliance with a specified resource group and name. - * - * @summary Gets the details of an Appliance with a specified resource group and name. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesGet.json - */ -async function getAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.get(resourceGroupName, resourceName); - console.log(result); -} - -getAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesGetUpgradeGraphSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesGetUpgradeGraphSample.ts deleted file mode 100644 index e1041504793a..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesGetUpgradeGraphSample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * - * @summary Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/UpgradeGraph.json - */ -async function getApplianceUpgradeGraph() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const upgradeGraph = "stable"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.getUpgradeGraph( - resourceGroupName, - resourceName, - upgradeGraph - ); - console.log(result); -} - -getApplianceUpgradeGraph().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListByResourceGroupSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListByResourceGroupSample.ts deleted file mode 100644 index 23fc56b84965..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListByResourceGroupSample.ts +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. - * - * @summary Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListByResourceGroup.json - */ -async function listAppliancesByResourceGroup() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.appliances.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesByResourceGroup().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListBySubscriptionSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListBySubscriptionSample.ts deleted file mode 100644 index 297945f9cc3e..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListBySubscriptionSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance - * - * @summary Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListBySubscription.json - */ -async function listAppliancesBySubscription() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.appliances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesBySubscription().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListClusterCustomerUserCredentialSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListClusterCustomerUserCredentialSample.ts deleted file mode 100644 index c771174b0e63..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListClusterCustomerUserCredentialSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Returns the cluster customer user credentials for the dedicated appliance. - * - * @summary Returns the cluster customer user credentials for the dedicated appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterCustomerUserCredential.json - */ -async function listClusterCustomerUserCredentialAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.listClusterCustomerUserCredential( - resourceGroupName, - resourceName - ); - console.log(result); -} - -listClusterCustomerUserCredentialAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListClusterUserCredentialSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListClusterUserCredentialSample.ts deleted file mode 100644 index 78fa54a658df..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListClusterUserCredentialSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Returns the cluster user credentials for the dedicated appliance. - * - * @summary Returns the cluster user credentials for the dedicated appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterUserCredential.json - */ -async function listClusterUserCredentialAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.listClusterUserCredential( - resourceGroupName, - resourceName - ); - console.log(result); -} - -listClusterUserCredentialAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListOperationsSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListOperationsSample.ts deleted file mode 100644 index d79569f7af3c..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesListOperationsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all available Appliances operations. - * - * @summary Lists all available Appliances operations. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListOperations.json - */ -async function listAppliancesOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.appliances.listOperations()) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesOperations().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesUpdateSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesUpdateSample.ts deleted file mode 100644 index 6b92ca31d667..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples-dev/appliancesUpdateSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AppliancesUpdateOptionalParams, - ResourceConnectorManagementClient -} from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. - * - * @summary Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesPatch.json - */ -async function updateAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const tags = { key: "value" }; - const options: AppliancesUpdateOptionalParams = { tags }; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.update( - resourceGroupName, - resourceName, - options - ); - console.log(result); -} - -updateAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/README.md b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/README.md deleted file mode 100644 index 1993e466a0d0..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [appliancesCreateOrUpdateSample.js][appliancescreateorupdatesample] | Creates or updates an Appliance in the specified Subscription and Resource Group. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesCreate_Update.json | -| [appliancesDeleteSample.js][appliancesdeletesample] | Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesDelete.json | -| [appliancesGetSample.js][appliancesgetsample] | Gets the details of an Appliance with a specified resource group and name. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesGet.json | -| [appliancesGetUpgradeGraphSample.js][appliancesgetupgradegraphsample] | Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/UpgradeGraph.json | -| [appliancesListByResourceGroupSample.js][applianceslistbyresourcegroupsample] | Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListByResourceGroup.json | -| [appliancesListBySubscriptionSample.js][applianceslistbysubscriptionsample] | Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListBySubscription.json | -| [appliancesListClusterCustomerUserCredentialSample.js][applianceslistclustercustomerusercredentialsample] | Returns the cluster customer user credentials for the dedicated appliance. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterCustomerUserCredential.json | -| [appliancesListClusterUserCredentialSample.js][applianceslistclusterusercredentialsample] | Returns the cluster user credentials for the dedicated appliance. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterUserCredential.json | -| [appliancesListOperationsSample.js][applianceslistoperationssample] | Lists all available Appliances operations. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListOperations.json | -| [appliancesUpdateSample.js][appliancesupdatesample] | Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesPatch.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node appliancesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node appliancesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[appliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesCreateOrUpdateSample.js -[appliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesDeleteSample.js -[appliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetSample.js -[appliancesgetupgradegraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetUpgradeGraphSample.js -[applianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListByResourceGroupSample.js -[applianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListBySubscriptionSample.js -[applianceslistclustercustomerusercredentialsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterCustomerUserCredentialSample.js -[applianceslistclusterusercredentialsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterUserCredentialSample.js -[applianceslistoperationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListOperationsSample.js -[appliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-resourceconnector?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourceconnector/arm-resourceconnector/README.md diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesCreateOrUpdateSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesCreateOrUpdateSample.js deleted file mode 100644 index 6394bcde54b2..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesCreateOrUpdateSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates an Appliance in the specified Subscription and Resource Group. - * - * @summary Creates or updates an Appliance in the specified Subscription and Resource Group. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesCreate_Update.json - */ -async function createOrUpdateAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const parameters = { - distro: "AKSEdge", - infrastructureConfig: { provider: "VMWare" }, - location: "West US", - }; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters - ); - console.log(result); -} - -createOrUpdateAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesDeleteSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesDeleteSample.js deleted file mode 100644 index 2eeec35aecd4..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * - * @summary Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesDelete.json - */ -async function deleteAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.beginDeleteAndWait(resourceGroupName, resourceName); - console.log(result); -} - -deleteAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetSample.js deleted file mode 100644 index de3c1f7a7541..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Gets the details of an Appliance with a specified resource group and name. - * - * @summary Gets the details of an Appliance with a specified resource group and name. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesGet.json - */ -async function getAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.get(resourceGroupName, resourceName); - console.log(result); -} - -getAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetUpgradeGraphSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetUpgradeGraphSample.js deleted file mode 100644 index 0177557be7c1..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesGetUpgradeGraphSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * - * @summary Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/UpgradeGraph.json - */ -async function getApplianceUpgradeGraph() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const upgradeGraph = "stable"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.getUpgradeGraph( - resourceGroupName, - resourceName, - upgradeGraph - ); - console.log(result); -} - -getApplianceUpgradeGraph().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListByResourceGroupSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListByResourceGroupSample.js deleted file mode 100644 index 0bab37984965..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListByResourceGroupSample.js +++ /dev/null @@ -1,32 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. - * - * @summary Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListByResourceGroup.json - */ -async function listAppliancesByResourceGroup() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.appliances.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesByResourceGroup().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListBySubscriptionSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListBySubscriptionSample.js deleted file mode 100644 index a45c68f803d0..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListBySubscriptionSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance - * - * @summary Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListBySubscription.json - */ -async function listAppliancesBySubscription() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.appliances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesBySubscription().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterCustomerUserCredentialSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterCustomerUserCredentialSample.js deleted file mode 100644 index 2a108917b51c..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterCustomerUserCredentialSample.js +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Returns the cluster customer user credentials for the dedicated appliance. - * - * @summary Returns the cluster customer user credentials for the dedicated appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterCustomerUserCredential.json - */ -async function listClusterCustomerUserCredentialAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.listClusterCustomerUserCredential( - resourceGroupName, - resourceName - ); - console.log(result); -} - -listClusterCustomerUserCredentialAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterUserCredentialSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterUserCredentialSample.js deleted file mode 100644 index f88df99b995f..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListClusterUserCredentialSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Returns the cluster user credentials for the dedicated appliance. - * - * @summary Returns the cluster user credentials for the dedicated appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterUserCredential.json - */ -async function listClusterUserCredentialAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.listClusterUserCredential(resourceGroupName, resourceName); - console.log(result); -} - -listClusterUserCredentialAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListOperationsSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListOperationsSample.js deleted file mode 100644 index 374f5f05a960..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesListOperationsSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Lists all available Appliances operations. - * - * @summary Lists all available Appliances operations. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListOperations.json - */ -async function listAppliancesOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.appliances.listOperations()) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesOperations().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesUpdateSample.js b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesUpdateSample.js deleted file mode 100644 index 5dc5448d148a..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/appliancesUpdateSample.js +++ /dev/null @@ -1,32 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ResourceConnectorManagementClient } = require("@azure/arm-resourceconnector"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. - * - * @summary Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesPatch.json - */ -async function updateAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const tags = { key: "value" }; - const options = { tags }; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient(credential, subscriptionId); - const result = await client.appliances.update(resourceGroupName, resourceName, options); - console.log(result); -} - -updateAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/package.json b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/package.json deleted file mode 100644 index 20b01423812e..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-resourceconnector-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/resourceconnector/arm-resourceconnector" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourceconnector/arm-resourceconnector", - "dependencies": { - "@azure/arm-resourceconnector": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/sample.env b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/README.md b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/README.md deleted file mode 100644 index 3d185539f836..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [appliancesCreateOrUpdateSample.ts][appliancescreateorupdatesample] | Creates or updates an Appliance in the specified Subscription and Resource Group. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesCreate_Update.json | -| [appliancesDeleteSample.ts][appliancesdeletesample] | Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesDelete.json | -| [appliancesGetSample.ts][appliancesgetsample] | Gets the details of an Appliance with a specified resource group and name. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesGet.json | -| [appliancesGetUpgradeGraphSample.ts][appliancesgetupgradegraphsample] | Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/UpgradeGraph.json | -| [appliancesListByResourceGroupSample.ts][applianceslistbyresourcegroupsample] | Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListByResourceGroup.json | -| [appliancesListBySubscriptionSample.ts][applianceslistbysubscriptionsample] | Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListBySubscription.json | -| [appliancesListClusterCustomerUserCredentialSample.ts][applianceslistclustercustomerusercredentialsample] | Returns the cluster customer user credentials for the dedicated appliance. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterCustomerUserCredential.json | -| [appliancesListClusterUserCredentialSample.ts][applianceslistclusterusercredentialsample] | Returns the cluster user credentials for the dedicated appliance. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterUserCredential.json | -| [appliancesListOperationsSample.ts][applianceslistoperationssample] | Lists all available Appliances operations. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListOperations.json | -| [appliancesUpdateSample.ts][appliancesupdatesample] | Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesPatch.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/appliancesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node dist/appliancesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[appliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesCreateOrUpdateSample.ts -[appliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesDeleteSample.ts -[appliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetSample.ts -[appliancesgetupgradegraphsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetUpgradeGraphSample.ts -[applianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListByResourceGroupSample.ts -[applianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListBySubscriptionSample.ts -[applianceslistclustercustomerusercredentialsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterCustomerUserCredentialSample.ts -[applianceslistclusterusercredentialsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterUserCredentialSample.ts -[applianceslistoperationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListOperationsSample.ts -[appliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-resourceconnector?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourceconnector/arm-resourceconnector/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/package.json b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/package.json deleted file mode 100644 index 80d986bb986c..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-resourceconnector-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/resourceconnector/arm-resourceconnector" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourceconnector/arm-resourceconnector", - "dependencies": { - "@azure/arm-resourceconnector": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~4.4.0", - "rimraf": "latest" - } -} diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/sample.env b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesCreateOrUpdateSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesCreateOrUpdateSample.ts deleted file mode 100644 index 99946a5d9a96..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Appliance, - ResourceConnectorManagementClient -} from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an Appliance in the specified Subscription and Resource Group. - * - * @summary Creates or updates an Appliance in the specified Subscription and Resource Group. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesCreate_Update.json - */ -async function createOrUpdateAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const parameters: Appliance = { - distro: "AKSEdge", - infrastructureConfig: { provider: "VMWare" }, - location: "West US" - }; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.beginCreateOrUpdateAndWait( - resourceGroupName, - resourceName, - parameters - ); - console.log(result); -} - -createOrUpdateAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesDeleteSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesDeleteSample.ts deleted file mode 100644 index 7b3f3faa0871..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesDeleteSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * - * @summary Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesDelete.json - */ -async function deleteAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.beginDeleteAndWait( - resourceGroupName, - resourceName - ); - console.log(result); -} - -deleteAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetSample.ts deleted file mode 100644 index fdd7de2f8453..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets the details of an Appliance with a specified resource group and name. - * - * @summary Gets the details of an Appliance with a specified resource group and name. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesGet.json - */ -async function getAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.get(resourceGroupName, resourceName); - console.log(result); -} - -getAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetUpgradeGraphSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetUpgradeGraphSample.ts deleted file mode 100644 index e1041504793a..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesGetUpgradeGraphSample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * - * @summary Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/UpgradeGraph.json - */ -async function getApplianceUpgradeGraph() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const upgradeGraph = "stable"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.getUpgradeGraph( - resourceGroupName, - resourceName, - upgradeGraph - ); - console.log(result); -} - -getApplianceUpgradeGraph().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListByResourceGroupSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListByResourceGroupSample.ts deleted file mode 100644 index 23fc56b84965..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListByResourceGroupSample.ts +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. - * - * @summary Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of each Appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListByResourceGroup.json - */ -async function listAppliancesByResourceGroup() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.appliances.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesByResourceGroup().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListBySubscriptionSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListBySubscriptionSample.ts deleted file mode 100644 index 297945f9cc3e..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListBySubscriptionSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance - * - * @summary Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListBySubscription.json - */ -async function listAppliancesBySubscription() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.appliances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesBySubscription().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterCustomerUserCredentialSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterCustomerUserCredentialSample.ts deleted file mode 100644 index c771174b0e63..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterCustomerUserCredentialSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Returns the cluster customer user credentials for the dedicated appliance. - * - * @summary Returns the cluster customer user credentials for the dedicated appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterCustomerUserCredential.json - */ -async function listClusterCustomerUserCredentialAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.listClusterCustomerUserCredential( - resourceGroupName, - resourceName - ); - console.log(result); -} - -listClusterCustomerUserCredentialAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterUserCredentialSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterUserCredentialSample.ts deleted file mode 100644 index 78fa54a658df..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListClusterUserCredentialSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Returns the cluster user credentials for the dedicated appliance. - * - * @summary Returns the cluster user credentials for the dedicated appliance. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterUserCredential.json - */ -async function listClusterUserCredentialAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.listClusterUserCredential( - resourceGroupName, - resourceName - ); - console.log(result); -} - -listClusterUserCredentialAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListOperationsSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListOperationsSample.ts deleted file mode 100644 index d79569f7af3c..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesListOperationsSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ResourceConnectorManagementClient } from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all available Appliances operations. - * - * @summary Lists all available Appliances operations. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListOperations.json - */ -async function listAppliancesOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const resArray = new Array(); - for await (let item of client.appliances.listOperations()) { - resArray.push(item); - } - console.log(resArray); -} - -listAppliancesOperations().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesUpdateSample.ts b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesUpdateSample.ts deleted file mode 100644 index 6b92ca31d667..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/src/appliancesUpdateSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AppliancesUpdateOptionalParams, - ResourceConnectorManagementClient -} from "@azure/arm-resourceconnector"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. - * - * @summary Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. - * x-ms-original-file: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesPatch.json - */ -async function updateAppliance() { - const subscriptionId = "11111111-2222-3333-4444-555555555555"; - const resourceGroupName = "testresourcegroup"; - const resourceName = "appliance01"; - const tags = { key: "value" }; - const options: AppliancesUpdateOptionalParams = { tags }; - const credential = new DefaultAzureCredential(); - const client = new ResourceConnectorManagementClient( - credential, - subscriptionId - ); - const result = await client.appliances.update( - resourceGroupName, - resourceName, - options - ); - console.log(result); -} - -updateAppliance().catch(console.error); diff --git a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/tsconfig.json b/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/resourceconnector/arm-resourceconnector/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/resourceconnector/arm-resourceconnector/src/models/index.ts b/sdk/resourceconnector/arm-resourceconnector/src/models/index.ts index bbe33677d50a..2e89be634b67 100644 --- a/sdk/resourceconnector/arm-resourceconnector/src/models/index.ts +++ b/sdk/resourceconnector/arm-resourceconnector/src/models/index.ts @@ -140,6 +140,30 @@ export interface AppliancePropertiesInfrastructureConfig { provider?: Provider; } +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * 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. */ @@ -156,23 +180,13 @@ export interface SystemData { lastModifiedAt?: Date; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; +/** The Get Telemetry Config Result appliance. */ +export interface ApplianceGetTelemetryConfigResult { /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * Telemetry instrumentation key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly telemetryInstrumentationKey?: string; } /** The Appliances patchable resource definition. */ @@ -181,18 +195,42 @@ export interface PatchableAppliance { tags?: { [propertyName: string]: string }; } -/** The List Cluster Customer User Credential Results appliance. */ -export interface ApplianceListClusterCustomerUserCredentialResults { +/** The List Cluster User Credential appliance. */ +export interface ApplianceListCredentialResults { + /** + * Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hybridConnectionConfig?: HybridConnectionConfig; /** * The list of appliance kubeconfigs. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly kubeconfigs?: ApplianceCredentialKubeconfig[]; +} + +/** Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS). */ +export interface HybridConnectionConfig { /** - * Map of Customer User Public and Private SSH Keys + * Timestamp when this token will be expired. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sshKeys?: { [propertyName: string]: SSHKey }; + readonly expirationTime?: number; + /** + * Name of the connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hybridConnectionName?: string; + /** + * Name of the notification service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly relay?: string; + /** + * Listener access token + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly token?: string; } /** Cluster User Credential appliance. */ @@ -209,50 +247,61 @@ export interface ApplianceCredentialKubeconfig { readonly value?: string; } -/** Appliance SSHKey definition. */ -export interface SSHKey { - /** User Private Key. */ - privateKey?: string; - /** User Public Key. */ - publicKey?: string; -} - -/** The List Cluster User Credential appliance. */ -export interface ApplianceListCredentialResults { +/** The List Cluster Keys Results appliance. */ +export interface ApplianceListKeysResults { /** - * Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS). + * Map of artifacts that contains a list of ArtifactProfile used to upload artifacts such as logs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hybridConnectionConfig?: HybridConnectionConfig; + readonly artifactProfiles?: { [propertyName: string]: ArtifactProfile }; /** * The list of appliance kubeconfigs. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly kubeconfigs?: ApplianceCredentialKubeconfig[]; + /** + * Map of Customer User Public, Private SSH Keys and Certificate when available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sshKeys?: { [propertyName: string]: SSHKey }; } -/** Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS). */ -export interface HybridConnectionConfig { +/** Appliance ArtifactProfile definition. */ +export interface ArtifactProfile { /** - * Timestamp when this token will be expired. + * Endpoint is the URL to upload artifacts to. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly expirationTime?: number; + readonly endpoint?: string; +} + +/** Appliance SSHKey definition. */ +export interface SSHKey { /** - * Name of the connection + * Certificate associated with the public key if the key is signed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hybridConnectionName?: string; + readonly certificate?: string; /** - * Name of the notification service. + * Certificate creation timestamp (Unix). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly relay?: string; + readonly creationTimeStamp?: number; /** - * Listener access token + * Certificate expiration timestamp (Unix). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly token?: string; + readonly expirationTimeStamp?: number; + /** + * Private Key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateKey?: string; + /** + * Public Key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicKey?: string; } /** The Upgrade Graph for appliance. */ @@ -363,11 +412,6 @@ export interface TrackedResource extends Resource { export interface Appliance extends TrackedResource { /** Identity for the resource. */ identity?: Identity; - /** - * 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; /** Represents a supported Fabric/Infra. (AKSEdge etc...). */ distro?: Distro; /** Contains infrastructure information about the Appliance */ @@ -377,7 +421,7 @@ export interface Appliance extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; - /** Certificates pair used to download MSI certificate from HIS */ + /** Certificates pair used to download MSI certificate from HIS. Can only be set once. */ publicKey?: string; /** * Appliance’s health and state of connection to on-prem @@ -466,6 +510,24 @@ export enum KnownStatus { UpgradePrerequisitesCompleted = "UpgradePrerequisitesCompleted", /** PreUpgrade */ PreUpgrade = "PreUpgrade", + /** UpgradingKvaio */ + UpgradingKvaio = "UpgradingKVAIO", + /** WaitingForKvaio */ + WaitingForKvaio = "WaitingForKVAIO", + /** ImagePending */ + ImagePending = "ImagePending", + /** ImageProvisioning */ + ImageProvisioning = "ImageProvisioning", + /** ImageProvisioned */ + ImageProvisioned = "ImageProvisioned", + /** ImageDownloading */ + ImageDownloading = "ImageDownloading", + /** ImageDownloaded */ + ImageDownloaded = "ImageDownloaded", + /** ImageDeprovisioning */ + ImageDeprovisioning = "ImageDeprovisioning", + /** ImageUnknown */ + ImageUnknown = "ImageUnknown", /** UpdatingCloudOperator */ UpdatingCloudOperator = "UpdatingCloudOperator", /** WaitingForCloudOperator */ @@ -501,6 +563,15 @@ export enum KnownStatus { * **PreparingForUpgrade** \ * **UpgradePrerequisitesCompleted** \ * **PreUpgrade** \ + * **UpgradingKVAIO** \ + * **WaitingForKVAIO** \ + * **ImagePending** \ + * **ImageProvisioning** \ + * **ImageProvisioned** \ + * **ImageDownloading** \ + * **ImageDownloaded** \ + * **ImageDeprovisioning** \ + * **ImageUnknown** \ * **UpdatingCloudOperator** \ * **WaitingForCloudOperator** \ * **UpdatingCAPI** \ @@ -556,10 +627,31 @@ export enum KnownAccessProfileType { */ export type AccessProfileType = string; +/** Known values of {@link ArtifactType} that the service accepts. */ +export enum KnownArtifactType { + /** LogsArtifactType */ + LogsArtifactType = "LogsArtifactType" +} + +/** + * Defines values for ArtifactType. \ + * {@link KnownArtifactType} can be used interchangeably with ArtifactType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LogsArtifactType** + */ +export type ArtifactType = string; + /** Known values of {@link SSHKeyType} that the service accepts. */ export enum KnownSSHKeyType { /** SSHCustomerUser */ - SSHCustomerUser = "SSHCustomerUser" + SSHCustomerUser = "SSHCustomerUser", + /** ManagementCAKey */ + ManagementCAKey = "ManagementCAKey", + /** LogsKey */ + LogsKey = "LogsKey", + /** ScopedAccessKey */ + ScopedAccessKey = "ScopedAccessKey" } /** @@ -567,7 +659,10 @@ export enum KnownSSHKeyType { * {@link KnownSSHKeyType} can be used interchangeably with SSHKeyType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **SSHCustomerUser** + * **SSHCustomerUser** \ + * **ManagementCAKey** \ + * **LogsKey** \ + * **ScopedAccessKey** */ export type SSHKeyType = string; @@ -585,6 +680,13 @@ export interface AppliancesListBySubscriptionOptionalParams /** Contains response data for the listBySubscription operation. */ export type AppliancesListBySubscriptionResponse = ApplianceListResult; +/** Optional parameters. */ +export interface AppliancesGetTelemetryConfigOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getTelemetryConfig operation. */ +export type AppliancesGetTelemetryConfigResponse = ApplianceGetTelemetryConfigResult; + /** Optional parameters. */ export interface AppliancesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} @@ -631,18 +733,18 @@ export interface AppliancesUpdateOptionalParams export type AppliancesUpdateResponse = Appliance; /** Optional parameters. */ -export interface AppliancesListClusterCustomerUserCredentialOptionalParams +export interface AppliancesListClusterUserCredentialOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listClusterCustomerUserCredential operation. */ -export type AppliancesListClusterCustomerUserCredentialResponse = ApplianceListClusterCustomerUserCredentialResults; +/** Contains response data for the listClusterUserCredential operation. */ +export type AppliancesListClusterUserCredentialResponse = ApplianceListCredentialResults; /** Optional parameters. */ -export interface AppliancesListClusterUserCredentialOptionalParams +export interface AppliancesListKeysOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listClusterUserCredential operation. */ -export type AppliancesListClusterUserCredentialResponse = ApplianceListCredentialResults; +/** Contains response data for the listKeys operation. */ +export type AppliancesListKeysResponse = ApplianceListKeysResults; /** Optional parameters. */ export interface AppliancesGetUpgradeGraphOptionalParams diff --git a/sdk/resourceconnector/arm-resourceconnector/src/models/mappers.ts b/sdk/resourceconnector/arm-resourceconnector/src/models/mappers.ts index ea946336724e..070c703e3ae0 100644 --- a/sdk/resourceconnector/arm-resourceconnector/src/models/mappers.ts +++ b/sdk/resourceconnector/arm-resourceconnector/src/models/mappers.ts @@ -263,6 +263,43 @@ export const AppliancePropertiesInfrastructureConfig: coreClient.CompositeMapper } }; +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" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", @@ -308,27 +345,13 @@ export const SystemData: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const ApplianceGetTelemetryConfigResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ApplianceGetTelemetryConfigResult", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", + telemetryInstrumentationKey: { + serializedName: "telemetryInstrumentationKey", readOnly: true, type: { name: "String" @@ -354,11 +377,18 @@ export const PatchableAppliance: coreClient.CompositeMapper = { } }; -export const ApplianceListClusterCustomerUserCredentialResults: coreClient.CompositeMapper = { +export const ApplianceListCredentialResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplianceListClusterCustomerUserCredentialResults", + className: "ApplianceListCredentialResults", modelProperties: { + hybridConnectionConfig: { + serializedName: "hybridConnectionConfig", + type: { + name: "Composite", + className: "HybridConnectionConfig" + } + }, kubeconfigs: { serializedName: "kubeconfigs", readOnly: true, @@ -371,33 +401,39 @@ export const ApplianceListClusterCustomerUserCredentialResults: coreClient.Compo } } } - }, - sshKeys: { - serializedName: "sshKeys", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "SSHKey" } } - } } } } }; -export const ApplianceCredentialKubeconfig: coreClient.CompositeMapper = { +export const HybridConnectionConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplianceCredentialKubeconfig", + className: "HybridConnectionConfig", modelProperties: { - name: { - serializedName: "name", + expirationTime: { + serializedName: "expirationTime", + readOnly: true, + type: { + name: "Number" + } + }, + hybridConnectionName: { + serializedName: "hybridConnectionName", readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", + relay: { + serializedName: "relay", + readOnly: true, + type: { + name: "String" + } + }, + token: { + serializedName: "token", readOnly: true, type: { name: "String" @@ -407,19 +443,21 @@ export const ApplianceCredentialKubeconfig: coreClient.CompositeMapper = { } }; -export const SSHKey: coreClient.CompositeMapper = { +export const ApplianceCredentialKubeconfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SSHKey", + className: "ApplianceCredentialKubeconfig", modelProperties: { - privateKey: { - serializedName: "privateKey", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - publicKey: { - serializedName: "publicKey", + value: { + serializedName: "value", + readOnly: true, type: { name: "String" } @@ -428,16 +466,17 @@ export const SSHKey: coreClient.CompositeMapper = { } }; -export const ApplianceListCredentialResults: coreClient.CompositeMapper = { +export const ApplianceListKeysResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplianceListCredentialResults", + className: "ApplianceListKeysResults", modelProperties: { - hybridConnectionConfig: { - serializedName: "hybridConnectionConfig", + artifactProfiles: { + serializedName: "artifactProfiles", + readOnly: true, type: { - name: "Composite", - className: "HybridConnectionConfig" + name: "Dictionary", + value: { type: { name: "Composite", className: "ArtifactProfile" } } } }, kubeconfigs: { @@ -452,39 +491,70 @@ export const ApplianceListCredentialResults: coreClient.CompositeMapper = { } } } + }, + sshKeys: { + serializedName: "sshKeys", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "SSHKey" } } + } } } } }; -export const HybridConnectionConfig: coreClient.CompositeMapper = { +export const ArtifactProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridConnectionConfig", + className: "ArtifactProfile", modelProperties: { - expirationTime: { - serializedName: "expirationTime", + endpoint: { + serializedName: "endpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SSHKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SSHKey", + modelProperties: { + certificate: { + serializedName: "certificate", + readOnly: true, + type: { + name: "String" + } + }, + creationTimeStamp: { + serializedName: "creationTimeStamp", readOnly: true, type: { name: "Number" } }, - hybridConnectionName: { - serializedName: "hybridConnectionName", + expirationTimeStamp: { + serializedName: "expirationTimeStamp", readOnly: true, type: { - name: "String" + name: "Number" } }, - relay: { - serializedName: "relay", + privateKey: { + serializedName: "privateKey", readOnly: true, type: { name: "String" } }, - token: { - serializedName: "token", + publicKey: { + serializedName: "publicKey", readOnly: true, type: { name: "String" @@ -696,13 +766,6 @@ export const Appliance: coreClient.CompositeMapper = { className: "Identity" } }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, distro: { defaultValue: "AKSEdge", serializedName: "properties.distro", diff --git a/sdk/resourceconnector/arm-resourceconnector/src/models/parameters.ts b/sdk/resourceconnector/arm-resourceconnector/src/models/parameters.ts index 492603e90df5..6f6c9287f8c7 100644 --- a/sdk/resourceconnector/arm-resourceconnector/src/models/parameters.ts +++ b/sdk/resourceconnector/arm-resourceconnector/src/models/parameters.ts @@ -43,7 +43,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-04-15-preview", + defaultValue: "2022-10-27", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/resourceconnector/arm-resourceconnector/src/operations/appliances.ts b/sdk/resourceconnector/arm-resourceconnector/src/operations/appliances.ts index ec64b115b3e4..2a99ee1a8dc9 100644 --- a/sdk/resourceconnector/arm-resourceconnector/src/operations/appliances.ts +++ b/sdk/resourceconnector/arm-resourceconnector/src/operations/appliances.ts @@ -25,6 +25,8 @@ import { AppliancesListByResourceGroupOptionalParams, AppliancesListOperationsResponse, AppliancesListBySubscriptionResponse, + AppliancesGetTelemetryConfigOptionalParams, + AppliancesGetTelemetryConfigResponse, AppliancesListByResourceGroupResponse, AppliancesGetOptionalParams, AppliancesGetResponse, @@ -33,10 +35,10 @@ import { AppliancesDeleteOptionalParams, AppliancesUpdateOptionalParams, AppliancesUpdateResponse, - AppliancesListClusterCustomerUserCredentialOptionalParams, - AppliancesListClusterCustomerUserCredentialResponse, AppliancesListClusterUserCredentialOptionalParams, AppliancesListClusterUserCredentialResponse, + AppliancesListKeysOptionalParams, + AppliancesListKeysResponse, AppliancesGetUpgradeGraphOptionalParams, AppliancesGetUpgradeGraphResponse, AppliancesListOperationsNextResponse, @@ -223,6 +225,19 @@ export class AppliancesImpl implements Appliances { ); } + /** + * Gets the telemetry config. + * @param options The options parameters. + */ + getTelemetryConfig( + options?: AppliancesGetTelemetryConfigOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + getTelemetryConfigOperationSpec + ); + } + /** * Gets a list of Appliances in the specified subscription and resource group. The operation returns * properties of each Appliance. @@ -451,36 +466,36 @@ export class AppliancesImpl implements Appliances { } /** - * Returns the cluster customer user credentials for the dedicated appliance. + * Returns the cluster user credentials for the dedicated appliance. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param options The options parameters. */ - listClusterCustomerUserCredential( + listClusterUserCredential( resourceGroupName: string, resourceName: string, - options?: AppliancesListClusterCustomerUserCredentialOptionalParams - ): Promise { + options?: AppliancesListClusterUserCredentialOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listClusterCustomerUserCredentialOperationSpec + listClusterUserCredentialOperationSpec ); } /** - * Returns the cluster user credentials for the dedicated appliance. + * Returns the cluster customer credentials for the dedicated appliance. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param options The options parameters. */ - listClusterUserCredential( + listKeys( resourceGroupName: string, resourceName: string, - options?: AppliancesListClusterUserCredentialOptionalParams - ): Promise { + options?: AppliancesListKeysOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listClusterUserCredentialOperationSpec + listKeysOperationSpec ); } @@ -587,6 +602,23 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const getTelemetryConfigOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/telemetryconfig", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplianceGetTelemetryConfigResult + }, + 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.ResourceConnector/appliances", @@ -713,13 +745,13 @@ const updateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const listClusterCustomerUserCredentialOperationSpec: coreClient.OperationSpec = { +const listClusterUserCredentialOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterCustomerUserCredential", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApplianceListClusterCustomerUserCredentialResults + bodyMapper: Mappers.ApplianceListCredentialResults }, default: { bodyMapper: Mappers.ErrorResponse @@ -735,13 +767,13 @@ const listClusterCustomerUserCredentialOperationSpec: coreClient.OperationSpec = headerParameters: [Parameters.accept], serializer }; -const listClusterUserCredentialOperationSpec: coreClient.OperationSpec = { +const listKeysOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listkeys", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApplianceListCredentialResults + bodyMapper: Mappers.ApplianceListKeysResults }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/resourceconnector/arm-resourceconnector/src/operationsInterfaces/appliances.ts b/sdk/resourceconnector/arm-resourceconnector/src/operationsInterfaces/appliances.ts index 30b93c2f76ed..e47f3ec6fa30 100644 --- a/sdk/resourceconnector/arm-resourceconnector/src/operationsInterfaces/appliances.ts +++ b/sdk/resourceconnector/arm-resourceconnector/src/operationsInterfaces/appliances.ts @@ -14,6 +14,8 @@ import { Appliance, AppliancesListBySubscriptionOptionalParams, AppliancesListByResourceGroupOptionalParams, + AppliancesGetTelemetryConfigOptionalParams, + AppliancesGetTelemetryConfigResponse, AppliancesGetOptionalParams, AppliancesGetResponse, AppliancesCreateOrUpdateOptionalParams, @@ -21,10 +23,10 @@ import { AppliancesDeleteOptionalParams, AppliancesUpdateOptionalParams, AppliancesUpdateResponse, - AppliancesListClusterCustomerUserCredentialOptionalParams, - AppliancesListClusterCustomerUserCredentialResponse, AppliancesListClusterUserCredentialOptionalParams, AppliancesListClusterUserCredentialResponse, + AppliancesListKeysOptionalParams, + AppliancesListKeysResponse, AppliancesGetUpgradeGraphOptionalParams, AppliancesGetUpgradeGraphResponse } from "../models"; @@ -57,6 +59,13 @@ export interface Appliances { resourceGroupName: string, options?: AppliancesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; + /** + * Gets the telemetry config. + * @param options The options parameters. + */ + getTelemetryConfig( + options?: AppliancesGetTelemetryConfigOptionalParams + ): Promise; /** * Gets the details of an Appliance with a specified resource group and name. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -134,27 +143,27 @@ export interface Appliances { options?: AppliancesUpdateOptionalParams ): Promise; /** - * Returns the cluster customer user credentials for the dedicated appliance. + * Returns the cluster user credentials for the dedicated appliance. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param options The options parameters. */ - listClusterCustomerUserCredential( + listClusterUserCredential( resourceGroupName: string, resourceName: string, - options?: AppliancesListClusterCustomerUserCredentialOptionalParams - ): Promise; + options?: AppliancesListClusterUserCredentialOptionalParams + ): Promise; /** - * Returns the cluster user credentials for the dedicated appliance. + * Returns the cluster customer credentials for the dedicated appliance. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param options The options parameters. */ - listClusterUserCredential( + listKeys( resourceGroupName: string, resourceName: string, - options?: AppliancesListClusterUserCredentialOptionalParams - ): Promise; + options?: AppliancesListKeysOptionalParams + ): Promise; /** * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release * train. diff --git a/sdk/resourceconnector/arm-resourceconnector/src/resourceConnectorManagementClient.ts b/sdk/resourceconnector/arm-resourceconnector/src/resourceConnectorManagementClient.ts index 8ab7e6ae1a09..76e1ca9639ee 100644 --- a/sdk/resourceconnector/arm-resourceconnector/src/resourceConnectorManagementClient.ts +++ b/sdk/resourceconnector/arm-resourceconnector/src/resourceConnectorManagementClient.ts @@ -50,12 +50,15 @@ export class ResourceConnectorManagementClient extends coreClient.ServiceClient credential: credentials }; - const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } const optionsWithDefaults = { ...defaults, ...options, @@ -67,34 +70,41 @@ export class ResourceConnectorManagementClient extends coreClient.ServiceClient }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-04-15-preview"; + this.apiVersion = options.apiVersion || "2022-10-27"; this.appliances = new AppliancesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } diff --git a/sdk/resourceconnector/arm-resourceconnector/tsconfig.json b/sdk/resourceconnector/arm-resourceconnector/tsconfig.json index 680d60e04904..3e6ae96443f3 100644 --- a/sdk/resourceconnector/arm-resourceconnector/tsconfig.json +++ b/sdk/resourceconnector/arm-resourceconnector/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-resourceconnector": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"