From e87c546de4cbecf1a5b950ff15c5c4e4e504649d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 25 Apr 2023 06:29:05 +0000 Subject: [PATCH] CodeGen from PR 23282 in Azure/azure-rest-api-specs Merge 682a10138617add18c373b1fae858a5c4529342d into 31e4ac67cf550d676d13a46fbbf9c6baf0010daa --- common/config/rush/pnpm-lock.yaml | 55 +- .../arm-hybridcompute/CHANGELOG.md | 78 +- sdk/hybridcompute/arm-hybridcompute/LICENSE | 2 +- .../arm-hybridcompute/_meta.json | 10 +- .../arm-hybridcompute/package.json | 23 +- .../review/arm-hybridcompute.api.md | 437 ++++- .../src/hybridComputeManagementClient.ts | 53 +- .../arm-hybridcompute/src/lroImpl.ts | 54 +- .../arm-hybridcompute/src/models/index.ts | 793 +++++++-- .../arm-hybridcompute/src/models/mappers.ts | 1431 ++++++++++++----- .../src/models/parameters.ts | 78 +- .../src/operations/agentVersionOperations.ts | 101 ++ .../src/operations/extensionMetadata.ts | 194 +++ .../hybridIdentityMetadataOperations.ts | 247 +++ .../arm-hybridcompute/src/operations/index.ts | 4 + .../src/operations/machineExtensions.ts | 73 +- .../src/operations/machines.ts | 4 +- .../operations/networkProfileOperations.ts | 72 + .../operations/privateEndpointConnections.ts | 55 +- .../src/operations/privateLinkResources.ts | 1 - .../src/operations/privateLinkScopes.ts | 30 +- .../agentVersionOperations.ts | 39 + .../operationsInterfaces/extensionMetadata.ts | 48 + .../hybridIdentityMetadataOperations.ts | 44 + .../src/operationsInterfaces/index.ts | 4 + .../operationsInterfaces/machineExtensions.ts | 12 +- .../src/operationsInterfaces/machines.ts | 2 +- .../networkProfileOperations.ts | 27 + .../privateEndpointConnections.ts | 8 +- .../operationsInterfaces/privateLinkScopes.ts | 4 +- .../arm-hybridcompute/src/pagingHelper.ts | 8 +- .../arm-hybridcompute/tsconfig.json | 10 +- 32 files changed, 3204 insertions(+), 797 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/networkProfileOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/agentVersionOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/hybridIdentityMetadataOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/networkProfileOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ef660b3217c7..0ae87f0b858b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2238,7 +2238,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/chai-as-promised/7.1.5: @@ -2260,7 +2260,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/cookie/0.4.1: @@ -2270,7 +2270,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/debug/4.1.7: @@ -2282,7 +2282,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/eslint/8.4.10: @@ -2303,7 +2303,7 @@ packages: /@types/express-serve-static-core/4.17.33: resolution: {integrity: sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2320,13 +2320,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/inquirer/8.2.6: @@ -2339,7 +2339,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/json-schema/7.0.11: @@ -2353,13 +2353,13 @@ packages: /@types/jsonwebtoken/9.0.1: resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/linkify-it/3.0.2: @@ -2406,7 +2406,7 @@ packages: /@types/node-fetch/2.6.3: resolution: {integrity: sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 form-data: 3.0.1 dev: false @@ -2449,7 +2449,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/semaphore/1.1.1: @@ -2464,7 +2464,7 @@ packages: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/sinon/10.0.14: @@ -2486,13 +2486,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/tough-cookie/4.0.2: @@ -2506,7 +2506,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/underscore/1.11.4: @@ -2524,19 +2524,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false /@types/yargs-parser/21.0.0: @@ -2553,7 +2553,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.42 + '@types/node': 18.16.0 dev: false optional: true @@ -3624,7 +3624,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3913,7 +3913,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.42 + '@types/node': 18.16.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4927,7 +4927,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -7350,7 +7350,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.42 + '@types/node': 18.16.0 long: 5.2.3 dev: false @@ -12387,7 +12387,7 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-Fps4gZR7xrBRDouDuwIncIbYOzeRI/kRXoyYR5U0IJazEYPRy/FQuFTTbtJjK9WRSGOry/jPKWfSkV3zMZfc9A==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-ImsyfWC+jX+5bcHIFCVZjdr6Tnic0I1KazT1QJJAX2TNq81l94hanMXLUktDCZAZNQeoKDi6IIE3Nwnna3dm/Q==, tarball: file:projects/arm-hybridcompute.tgz} name: '@rush-temp/arm-hybridcompute' version: 0.0.0 dependencies: @@ -12401,13 +12401,14 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_c43y4oaxxwie3ialrfuzfwwhqq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index 16c6165c364f..7ea2de4e73a4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,37 +1,85 @@ # Release History - -## 3.1.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 3.1.0-beta.2 (2022-11-25) + +## 4.0.0-beta.1 (2023-04-25) **Features** + - Added operation group AgentVersionOperations + - Added operation group ExtensionMetadata + - Added operation group HybridIdentityMetadataOperations + - Added operation group NetworkProfileOperations + - Added Interface AgentConfiguration + - Added Interface AgentUpgrade + - Added Interface AgentVersion + - Added Interface AgentVersionGetOptionalParams + - Added Interface AgentVersionListOptionalParams + - Added Interface AgentVersionsList + - Added Interface CloudMetadata + - Added Interface ConfigurationExtension + - Added Interface ErrorDetailAutoGenerated + - Added Interface ErrorResponseAutoGenerated + - Added Interface ExtensionMetadataGetOptionalParams + - Added Interface ExtensionMetadataListOptionalParams + - Added Interface ExtensionValue + - Added Interface ExtensionValueListResult + - Added Interface HybridComputeManagementClientUpgradeExtensionsHeaders - Added Interface HybridComputePrivateLinkScope + - Added Interface HybridIdentityMetadata + - Added Interface HybridIdentityMetadataGetOptionalParams + - Added Interface HybridIdentityMetadataList + - Added Interface HybridIdentityMetadataListByMachinesNextOptionalParams + - Added Interface HybridIdentityMetadataListByMachinesOptionalParams + - Added Interface IpAddress - Added Interface Machine - Added Interface MachineExtension + - Added Interface MachineExtensionsDeleteHeaders + - Added Interface MachineExtensionsUpdateHeaders - Added Interface MachineExtensionUpdate - Added Interface MachineUpdate + - Added Interface NetworkInterface + - Added Interface NetworkProfile + - Added Interface NetworkProfileGetOptionalParams - Added Interface OSProfileLinuxConfiguration - Added Interface OSProfileWindowsConfiguration - Added Interface PrivateEndpointConnection - Added Interface PrivateEndpointConnectionDataModel + - Added Interface PrivateEndpointConnectionsDeleteHeaders - Added Interface PrivateLinkResource + - Added Interface PrivateLinkScopesDeleteHeaders - Added Interface ProxyResource + - Added Interface ServiceStatus + - Added Interface ServiceStatuses + - Added Interface Subnet - Added Interface TrackedResource + - Added Type Alias AgentConfigurationMode + - Added Type Alias AgentVersionGetResponse + - Added Type Alias AgentVersionListResponse + - Added Type Alias AssessmentModeTypes + - Added Type Alias ExtensionMetadataGetResponse + - Added Type Alias ExtensionMetadataListResponse + - Added Type Alias HybridIdentityMetadataGetResponse + - Added Type Alias HybridIdentityMetadataListByMachinesNextResponse + - Added Type Alias HybridIdentityMetadataListByMachinesResponse + - Added Type Alias LastAttemptStatusEnum + - Added Type Alias NetworkProfileGetResponse + - Added Type Alias PatchModeTypes + - Added Type Alias PrivateCloudKind - Interface HybridComputePrivateLinkScopeProperties has a new optional parameter privateEndpointConnections - - Interface MachineProperties has a new optional parameter mssqlDiscovered - - Interface MachineProperties has a new optional parameter osType - - Interface MachineUpdateProperties has a new optional parameter osProfile + - Interface OperationValue has a new optional parameter isDataAction - Interface OSProfile has a new optional parameter linuxConfiguration - Interface OSProfile has a new optional parameter windowsConfiguration + - Interface PrivateEndpointConnectionProperties has a new optional parameter groupIds + - Interface Resource has a new optional parameter systemData + - Added Enum KnownAgentConfigurationMode + - Added Enum KnownAssessmentModeTypes + - Added Enum KnownLastAttemptStatusEnum + - Added Enum KnownPatchModeTypes + - Added Enum KnownPrivateCloudKind + - Added function getContinuationToken + +**Breaking Changes** + + - Interface MachineExtensionsListNextOptionalParams no longer has parameter expand ## 3.0.0 (2022-01-18) diff --git a/sdk/hybridcompute/arm-hybridcompute/LICENSE b/sdk/hybridcompute/arm-hybridcompute/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/LICENSE +++ b/sdk/hybridcompute/arm-hybridcompute/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json index 66ea1bf1fe32..35dad7ea9889 100644 --- a/sdk/hybridcompute/arm-hybridcompute/_meta.json +++ b/sdk/hybridcompute/arm-hybridcompute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a", - "readme": "specification\\hybridcompute\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hybridcompute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "179fd62013e001899d8708625d22b438c59d50e3", + "readme": "specification/hybridcompute/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 167dde9aa5ac..4878e3eb12a5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HybridComputeManagementClient.", - "version": "3.1.0-beta.3", + "version": "4.0.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute" +} \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md index 0705649247f5..43557e63f0d4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -6,9 +6,82 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface AgentConfiguration { + readonly configMode?: AgentConfigurationMode; + readonly extensionsAllowList?: ConfigurationExtension[]; + readonly extensionsBlockList?: ConfigurationExtension[]; + readonly extensionsEnabled?: string; + readonly guestConfigurationEnabled?: string; + readonly incomingConnectionsPorts?: string[]; + readonly proxyBypass?: string[]; + readonly proxyUrl?: string; +} + +// @public +export type AgentConfigurationMode = string; + +// @public +export interface AgentUpgrade { + correlationId?: string; + desiredVersion?: string; + enableAutomaticUpgrade?: boolean; + readonly lastAttemptDesiredVersion?: string; + readonly lastAttemptMessage?: string; + readonly lastAttemptStatus?: LastAttemptStatusEnum; + readonly lastAttemptTimestamp?: string; +} + +// @public +export interface AgentVersion { + agentVersion?: string; + downloadLink?: string; + osType?: string; +} + +// @public +export interface AgentVersionGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AgentVersionGetResponse = AgentVersion; + +// @public +export interface AgentVersionListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AgentVersionListResponse = AgentVersionsList; + +// @public +export interface AgentVersionOperations { + get(osType: string, version: string, options?: AgentVersionGetOptionalParams): Promise; + list(osType: string, options?: AgentVersionListOptionalParams): Promise; +} + +// @public +export interface AgentVersionsList { + nextLink?: string; + value?: AgentVersion[]; +} + +// @public +export type AssessmentModeTypes = string; + +// @public +export interface CloudMetadata { + readonly provider?: string; +} + +// @public +export interface ConfigurationExtension { + readonly publisher?: string; + readonly type?: string; +} // @public (undocumented) export interface ConnectionDetail { @@ -37,16 +110,62 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + +// @public +export interface ExtensionMetadata { + get(location: string, publisher: string, extensionType: string, version: string, options?: ExtensionMetadataGetOptionalParams): Promise; + list(location: string, publisher: string, extensionType: string, options?: ExtensionMetadataListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExtensionMetadataGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionMetadataGetResponse = ExtensionValue; + +// @public +export interface ExtensionMetadataListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionMetadataListResponse = ExtensionValueListResult; + // @public export interface ExtensionTargetProperties { targetVersion?: string; } +// @public +export interface ExtensionValue extends ProxyResource { + readonly extensionType?: string; + readonly publisher?: string; + readonly version?: string; +} + +// @public +export interface ExtensionValueListResult { + readonly value?: ExtensionValue[]; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -56,14 +175,22 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridComputeManagementClientOptionalParams); // (undocumented) + agentVersionOperations: AgentVersionOperations; + // (undocumented) apiVersion: string; - beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise, void>>; + beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise, void>>; beginUpgradeExtensionsAndWait(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise; // (undocumented) + extensionMetadata: ExtensionMetadata; + // (undocumented) + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + // (undocumented) machineExtensions: MachineExtensions; // (undocumented) machines: Machines; // (undocumented) + networkProfileOperations: NetworkProfileOperations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -82,6 +209,13 @@ export interface HybridComputeManagementClientOptionalParams extends coreClient. endpoint?: string; } +// @public +export interface HybridComputeManagementClientUpgradeExtensionsHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface HybridComputePrivateLinkScope extends PrivateLinkScopesResource { properties?: HybridComputePrivateLinkScopeProperties; @@ -102,6 +236,46 @@ export interface HybridComputePrivateLinkScopeProperties { publicNetworkAccess?: PublicNetworkAccessType; } +// @public +export interface HybridIdentityMetadata extends ProxyResource { + readonly identity?: Identity; + publicKey?: string; + vmId?: string; +} + +// @public +export interface HybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; + +// @public +export interface HybridIdentityMetadataList { + nextLink?: string; + value: HybridIdentityMetadata[]; +} + +// @public +export interface HybridIdentityMetadataListByMachinesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HybridIdentityMetadataListByMachinesNextResponse = HybridIdentityMetadataList; + +// @public +export interface HybridIdentityMetadataListByMachinesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HybridIdentityMetadataListByMachinesResponse = HybridIdentityMetadataList; + +// @public +export interface HybridIdentityMetadataOperations { + get(resourceGroupName: string, machineName: string, metadataName: string, options?: HybridIdentityMetadataGetOptionalParams): Promise; + listByMachines(resourceGroupName: string, machineName: string, options?: HybridIdentityMetadataListByMachinesOptionalParams): PagedAsyncIterableIterator; +} + // @public export interface Identity { readonly principalId?: string; @@ -112,6 +286,25 @@ export interface Identity { // @public export type InstanceViewTypes = string; +// @public +export interface IpAddress { + address?: string; + ipAddressVersion?: string; + readonly subnet?: Subnet; +} + +// @public +export enum KnownAgentConfigurationMode { + Full = "full", + Monitor = "monitor" +} + +// @public +export enum KnownAssessmentModeTypes { + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -125,6 +318,28 @@ export enum KnownInstanceViewTypes { InstanceView = "instanceView" } +// @public +export enum KnownLastAttemptStatusEnum { + Failed = "Failed", + Success = "Success" +} + +// @public +export enum KnownPatchModeTypes { + AutomaticByOS = "AutomaticByOS", + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault", + Manual = "Manual" +} + +// @public +export enum KnownPrivateCloudKind { + AVS = "AVS", + HCI = "HCI", + Scvmm = "SCVMM", + VMware = "VMware" +} + // @public export enum KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -145,6 +360,9 @@ export enum KnownStatusTypes { Error = "Error" } +// @public +export type LastAttemptStatusEnum = string; + // @public export interface LocationData { city?: string; @@ -155,15 +373,58 @@ export interface LocationData { // @public export interface Machine extends TrackedResource { + readonly adFqdn?: string; + readonly agentConfiguration?: AgentConfiguration; + agentUpgrade?: AgentUpgrade; + readonly agentVersion?: string; + clientPublicKey?: string; + cloudMetadata?: CloudMetadata; + readonly detectedProperties?: { + [propertyName: string]: string; + }; + readonly displayName?: string; + readonly dnsFqdn?: string; + readonly domainName?: string; + readonly errorDetails?: ErrorDetail[]; + extensions?: MachineExtensionInstanceView[]; identity?: Identity; - properties?: MachineProperties; - readonly systemData?: SystemData; + kind?: PrivateCloudKind; + readonly lastStatusChange?: Date; + locationData?: LocationData; + readonly machineFqdn?: string; + mssqlDiscovered?: string; + readonly networkProfile?: NetworkProfile; + readonly osName?: string; + osProfile?: OSProfile; + readonly osSku?: string; + osType?: string; + readonly osVersion?: string; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; + readonly provisioningState?: string; + readonly resources?: MachineExtension[]; + serviceStatuses?: ServiceStatuses; + readonly status?: StatusTypes; + vmId?: string; + readonly vmUuid?: string; } // @public export interface MachineExtension extends TrackedResource { - properties?: MachineExtensionProperties; - readonly systemData?: SystemData; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + forceUpdateTag?: string; + instanceView?: MachineExtensionInstanceView; + protectedSettings?: { + [propertyName: string]: any; + }; + readonly provisioningState?: string; + publisher?: string; + settings?: { + [propertyName: string]: any; + }; + typeHandlerVersion?: string; + typePropertiesType?: string; } // @public @@ -183,26 +444,13 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -// @public -export interface MachineExtensionProperties { - autoUpgradeMinorVersion?: boolean; - forceUpdateTag?: string; - instanceView?: MachineExtensionInstanceView; - protectedSettings?: Record; - readonly provisioningState?: string; - publisher?: string; - settings?: Record; - type?: string; - typeHandlerVersion?: string; -} - // @public export interface MachineExtensions { - beginCreateOrUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise; get(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsGetOptionalParams): Promise; list(resourceGroupName: string, machineName: string, options?: MachineExtensionsListOptionalParams): PagedAsyncIterableIterator; @@ -217,6 +465,13 @@ export interface MachineExtensionsCreateOrUpdateOptionalParams extends coreClien // @public export type MachineExtensionsCreateOrUpdateResponse = MachineExtension; +// @public +export interface MachineExtensionsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface MachineExtensionsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -232,7 +487,6 @@ export type MachineExtensionsGetResponse = MachineExtension; // @public export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -252,6 +506,13 @@ export interface MachineExtensionsListResult { value?: MachineExtension[]; } +// @public +export interface MachineExtensionsUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface MachineExtensionsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -263,16 +524,16 @@ export type MachineExtensionsUpdateResponse = MachineExtension; // @public export interface MachineExtensionUpdate extends ResourceUpdate { - properties?: MachineExtensionUpdateProperties; -} - -// @public -export interface MachineExtensionUpdateProperties { autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; - protectedSettings?: Record; + protectedSettings?: { + [propertyName: string]: any; + }; publisher?: string; - settings?: Record; + settings?: { + [propertyName: string]: any; + }; type?: string; typeHandlerVersion?: string; } @@ -290,36 +551,6 @@ export interface MachineListResult { value: Machine[]; } -// @public -export interface MachineProperties { - readonly adFqdn?: string; - readonly agentVersion?: string; - clientPublicKey?: string; - readonly detectedProperties?: { - [propertyName: string]: string; - }; - readonly displayName?: string; - readonly dnsFqdn?: string; - readonly domainName?: string; - readonly errorDetails?: ErrorDetail[]; - extensions?: MachineExtensionInstanceView[]; - readonly lastStatusChange?: Date; - locationData?: LocationData; - readonly machineFqdn?: string; - mssqlDiscovered?: string; - readonly osName?: string; - osProfile?: OSProfile; - readonly osSku?: string; - osType?: string; - readonly osVersion?: string; - parentClusterResourceId?: string; - privateLinkScopeResourceId?: string; - readonly provisioningState?: string; - readonly status?: StatusTypes; - vmId?: string; - readonly vmUuid?: string; -} - // @public export interface Machines { delete(resourceGroupName: string, machineName: string, options?: MachinesDeleteOptionalParams): Promise; @@ -370,18 +601,38 @@ export type MachinesListBySubscriptionResponse = MachineListResult; // @public export interface MachineUpdate extends ResourceUpdate { + agentUpgrade?: AgentUpgrade; + cloudMetadata?: CloudMetadata; identity?: Identity; - properties?: MachineUpdateProperties; -} - -// @public -export interface MachineUpdateProperties { + kind?: PrivateCloudKind; locationData?: LocationData; osProfile?: OSProfile; parentClusterResourceId?: string; privateLinkScopeResourceId?: string; } +// @public +export interface NetworkInterface { + ipAddresses?: IpAddress[]; +} + +// @public +export interface NetworkProfile { + networkInterfaces?: NetworkInterface[]; +} + +// @public +export interface NetworkProfileGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkProfileGetResponse = NetworkProfile; + +// @public +export interface NetworkProfileOperations { + get(resourceGroupName: string, machineName: string, options?: NetworkProfileGetOptionalParams): Promise; +} + // @public export interface OperationListResult { readonly value?: OperationValue[]; @@ -402,6 +653,7 @@ export type OperationsListResponse = OperationListResult; // @public export interface OperationValue { display?: OperationValueDisplay; + readonly isDataAction?: boolean; readonly name?: string; readonly origin?: string; } @@ -423,18 +675,25 @@ export interface OSProfile { // @public export interface OSProfileLinuxConfiguration { - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + patchMode?: PatchModeTypes; } // @public export interface OSProfileWindowsConfiguration { - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + patchMode?: PatchModeTypes; } +// @public +export type PatchModeTypes = string; + +// @public +export type PrivateCloudKind = string; + // @public export interface PrivateEndpointConnection extends ProxyResource { properties?: PrivateEndpointConnectionProperties; - readonly systemData?: SystemData; } // @public @@ -453,6 +712,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: string; @@ -460,9 +720,9 @@ export interface PrivateEndpointConnectionProperties { // @public export interface PrivateEndpointConnections { - beginCreateOrUpdate(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams): PagedAsyncIterableIterator; @@ -477,6 +737,13 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends // @public export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +// @public +export interface PrivateEndpointConnectionsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -512,7 +779,6 @@ export interface PrivateEndpointProperty { // @public export interface PrivateLinkResource extends ProxyResource { properties?: PrivateLinkResourceProperties; - readonly systemData?: SystemData; } // @public @@ -557,7 +823,7 @@ export type PrivateLinkResourcesListByPrivateLinkScopeResponse = PrivateLinkReso // @public export interface PrivateLinkScopes { - beginDelete(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise; createOrUpdate(resourceGroupName: string, scopeName: string, parameters: HybridComputePrivateLinkScope, options?: PrivateLinkScopesCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesGetOptionalParams): Promise; @@ -575,6 +841,13 @@ export interface PrivateLinkScopesCreateOrUpdateOptionalParams extends coreClien // @public export type PrivateLinkScopesCreateOrUpdateResponse = HybridComputePrivateLinkScope; +// @public +export interface PrivateLinkScopesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface PrivateLinkScopesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -673,6 +946,7 @@ export type PublicNetworkAccessType = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -683,12 +957,29 @@ export interface ResourceUpdate { }; } +// @public +export interface ServiceStatus { + startupType?: string; + status?: string; +} + +// @public +export interface ServiceStatuses { + extensionService?: ServiceStatus; + guestConfigurationService?: ServiceStatus; +} + // @public export type StatusLevelTypes = string; // @public export type StatusTypes = string; +// @public +export interface Subnet { + addressPrefix?: string; +} + // @public export interface SystemData { createdAt?: Date; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index e4aba1055e13..d12a5c29d438 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -14,12 +14,20 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "./lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "./lroImpl"; import { MachinesImpl, MachineExtensionsImpl, + ExtensionMetadataImpl, OperationsImpl, + NetworkProfileOperationsImpl, + HybridIdentityMetadataOperationsImpl, + AgentVersionOperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl @@ -27,7 +35,11 @@ import { import { Machines, MachineExtensions, + ExtensionMetadata, Operations, + NetworkProfileOperations, + HybridIdentityMetadataOperations, + AgentVersionOperations, PrivateLinkScopes, PrivateLinkResources, PrivateEndpointConnections @@ -72,7 +84,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-hybridcompute/3.1.0-beta.3`; + const packageDetails = `azsdk-js-arm-hybridcompute/4.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -125,10 +137,16 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-10-preview"; + this.apiVersion = options.apiVersion || "2023-03-15-preview"; this.machines = new MachinesImpl(this); this.machineExtensions = new MachineExtensionsImpl(this); + this.extensionMetadata = new ExtensionMetadataImpl(this); this.operations = new OperationsImpl(this); + this.networkProfileOperations = new NetworkProfileOperationsImpl(this); + this.hybridIdentityMetadataOperations = new HybridIdentityMetadataOperationsImpl( + this + ); + this.agentVersionOperations = new AgentVersionOperationsImpl(this); this.privateLinkScopes = new PrivateLinkScopesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -175,14 +193,14 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -215,13 +233,18 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, machineName, extensionUpgradeParameters, options }, - upgradeExtensionsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + machineName, + extensionUpgradeParameters, + options + }, + spec: upgradeExtensionsOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -252,7 +275,11 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { machines: Machines; machineExtensions: MachineExtensions; + extensionMetadata: ExtensionMetadata; operations: Operations; + networkProfileOperations: NetworkProfileOperations; + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + agentVersionOperations: AgentVersionOperations; privateLinkScopes: PrivateLinkScopes; privateLinkResources: PrivateLinkResources; privateEndpointConnections: PrivateEndpointConnections; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts b/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index c8fc24124f04..42f9386aa2dd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -57,113 +57,129 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** Describes the properties of a hybrid machine. */ -export interface MachineProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; +/** Metadata pertaining to the geographic location of the resource. */ +export interface LocationData { + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located */ + countryOrRegion?: string; +} + +/** Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. */ +export interface AgentConfiguration { /** - * The provisioning state, which only appears in the response. + * Specifies the URL of the proxy to be used. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly proxyUrl?: string; /** - * The status of the hybrid machine agent. + * Specifies the list of ports that the agent will be able to listen on. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: StatusTypes; + readonly incomingConnectionsPorts?: string[]; /** - * The time of the last status change. + * Array of extensions that are allowed to be installed or updated. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastStatusChange?: Date; + readonly extensionsAllowList?: ConfigurationExtension[]; /** - * Details about the error state. + * Array of extensions that are blocked (cannot be installed or updated) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: ErrorDetail[]; + readonly extensionsBlockList?: ConfigurationExtension[]; /** - * The hybrid machine agent full version. + * List of service names which should not use the specified proxy server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly agentVersion?: string; - /** Specifies the hybrid machine unique ID. */ - vmId?: string; + readonly proxyBypass?: string[]; /** - * Specifies the hybrid machine display name. + * Specifies whether the extension service is enabled or disabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayName?: string; + readonly extensionsEnabled?: string; /** - * Specifies the hybrid machine FQDN. + * Specified whether the guest configuration service is enabled or disabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly machineFqdn?: string; - /** Public Key that the client provides to be used during initial resource onboarding */ - clientPublicKey?: string; + readonly guestConfigurationEnabled?: string; /** - * The Operating System running on the hybrid machine. + * Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists and guest configuration, maintained by Microsoft. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly configMode?: AgentConfigurationMode; +} + +/** Describes properties that can identify extensions. */ +export interface ConfigurationExtension { /** - * The version of Operating System running on the hybrid machine. + * Publisher of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osVersion?: string; - /** The type of Operating System (windows/linux). */ - osType?: string; + readonly publisher?: string; /** - * Specifies the Arc Machine's unique SMBIOS ID + * Type of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmUuid?: string; - /** Machine Extensions information */ - extensions?: MachineExtensionInstanceView[]; + readonly type?: string; +} + +/** Reports the state and behavior of dependent services. */ +export interface ServiceStatuses { + /** The state of the extension service on the Arc-enabled machine. */ + extensionService?: ServiceStatus; + /** The state of the guest configuration service on the Arc-enabled machine. */ + guestConfigurationService?: ServiceStatus; +} + +/** Describes the status and behavior of a service. */ +export interface ServiceStatus { + /** The current status of the service. */ + status?: string; + /** The behavior of the service when the Arc-enabled machine starts up. */ + startupType?: string; +} + +/** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ +export interface CloudMetadata { /** - * Specifies the Operating System product SKU. + * Specifies the cloud provider (Azure/AWS/GCP...). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osSku?: string; + readonly provider?: string; +} + +/** The info w.r.t Agent Upgrade. */ +export interface AgentUpgrade { + /** Specifies the version info w.r.t AgentUpgrade for the machine. */ + desiredVersion?: string; + /** The correlation ID passed in from RSM per upgrade. */ + correlationId?: string; + /** Specifies if RSM should try to upgrade this machine */ + enableAutomaticUpgrade?: boolean; /** - * Specifies the Windows domain name. + * Specifies the version of the last attempt * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly domainName?: string; + readonly lastAttemptDesiredVersion?: string; /** - * Specifies the AD fully qualified display name. + * Timestamp of last upgrade attempt * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly adFqdn?: string; + readonly lastAttemptTimestamp?: string; /** - * Specifies the DNS fully qualified display name. + * Specifies the status of Agent Upgrade. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsFqdn?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** Specifies whether any MS SQL instance is discovered on the machine. */ - mssqlDiscovered?: string; + readonly lastAttemptStatus?: LastAttemptStatusEnum; /** - * Detected properties from the machine. + * Failure message of last upgrade attempt if any. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly detectedProperties?: { [propertyName: string]: string }; -} - -/** Metadata pertaining to the geographic location of the resource. */ -export interface LocationData { - /** A canonical name for the geographic or physical location. */ - name: string; - /** The city or locality where the resource is located. */ - city?: string; - /** The district, state, or province where the resource is located. */ - district?: string; - /** The country or region where the resource is located */ - countryOrRegion?: string; + readonly lastAttemptMessage?: string; } /** Specifies the operating system settings for the hybrid machine. */ @@ -182,13 +198,17 @@ export interface OSProfile { /** Specifies the windows configuration for update management. */ export interface OSProfileWindowsConfiguration { /** Specifies the assessment mode. */ - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + /** Specifies the patch mode. */ + patchMode?: PatchModeTypes; } /** Specifies the linux configuration for update management. */ export interface OSProfileLinuxConfiguration { /** Specifies the assessment mode. */ - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + /** Specifies the patch mode. */ + patchMode?: PatchModeTypes; } /** Describes the Machine Extension Instance View. */ @@ -217,20 +237,59 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -/** Identity for the resource. */ -export interface Identity { +/** Describes the network information on this machine. */ +export interface NetworkProfile { + /** The list of network interfaces. */ + networkInterfaces?: NetworkInterface[]; +} + +/** Describes a network interface. */ +export interface NetworkInterface { + /** The list of IP addresses in this interface. */ + ipAddresses?: IpAddress[]; +} + +/** Describes properties of the IP address. */ +export interface IpAddress { + /** Represents the IP Address. */ + address?: string; + /** Represents the Ip Address Version. */ + ipAddressVersion?: string; /** - * The principal ID of resource identity. + * The subnet to which this IP address belongs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly subnet?: Subnet; +} + +/** Describes the subnet. */ +export interface Subnet { + /** Represents address prefix. */ + addressPrefix?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The tenant ID of 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 tenantId?: string; - /** The identity type. */ - type?: "SystemAssigned"; + 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. */ @@ -249,23 +308,20 @@ 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; +/** Identity for the resource. */ +export interface Identity { /** - * The name of the resource + * The principal ID of resource identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly principalId?: string; /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * The tenant ID of resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; } /** The List hybrid machine operation response. */ @@ -276,49 +332,6 @@ export interface MachineListResult { nextLink?: string; } -/** Describes the properties of a Machine Extension. */ -export interface MachineExtensionProperties { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; - /** - * The provisioning state, which only appears in the response. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The machine extension instance view. */ - instanceView?: MachineExtensionInstanceView; -} - -/** Describes the properties of a Machine Extension. */ -export interface MachineExtensionUpdateProperties { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; -} - /** The Update Resource model definition. */ export interface ResourceUpdate { /** Resource tags */ @@ -333,7 +346,7 @@ export interface MachineExtensionsListResult { nextLink?: string; } -/** Describes the Machine Extension Upgrade Properties */ +/** Describes the Machine Extension Upgrade Properties. */ export interface MachineExtensionUpgrade { /** Describes the Extension Target Properties. */ extensionTargets?: { [propertyName: string]: ExtensionTargetProperties }; @@ -345,6 +358,15 @@ export interface ExtensionTargetProperties { targetVersion?: string; } +/** The List Extension Metadata response. */ +export interface ExtensionValueListResult { + /** + * The list of extension metadata + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ExtensionValue[]; +} + /** The List Compute Operation operation response. */ export interface OperationListResult { /** @@ -368,6 +390,11 @@ export interface OperationValue { readonly name?: string; /** Display properties */ display?: OperationValueDisplay; + /** + * This property indicates if the operation is an action or a data action + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; } /** Describes the properties of a Hybrid Compute Operation Value Display. */ @@ -394,6 +421,67 @@ export interface OperationValueDisplay { readonly provider?: string; } +/** List of HybridIdentityMetadata. */ +export interface HybridIdentityMetadataList { + /** Url to follow for getting next page of HybridIdentityMetadata. */ + nextLink?: string; + /** Array of HybridIdentityMetadata */ + value: HybridIdentityMetadata[]; +} + +/** Describes AgentVersions List. */ +export interface AgentVersionsList { + /** The list of available Agent Versions. */ + value?: AgentVersion[]; + /** The URI to fetch the next 10 available Agent Versions. */ + nextLink?: string; +} + +/** Describes properties of Agent Version. */ +export interface AgentVersion { + /** Represents the agent version. */ + agentVersion?: string; + /** Represents the download link of specific agent version. */ + downloadLink?: string; + /** Defines the os type. */ + osType?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + /** Describes the list of Azure Arc PrivateLinkScope resources. */ export interface HybridComputePrivateLinkScopeListResult { /** List of Azure Arc PrivateLinkScope definitions. */ @@ -455,6 +543,11 @@ export interface PrivateEndpointConnectionProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; + /** + * List of group IDs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; } /** Private endpoint which the connection belongs to. */ @@ -592,18 +685,6 @@ export interface ConnectionDetail { readonly memberName?: string; } -/** Describes the ARM updatable properties of a hybrid machine. */ -export interface MachineUpdateProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; -} - /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export interface TrackedResource extends Resource { /** Resource tags. */ @@ -617,16 +698,42 @@ export interface ProxyResource extends Resource {} /** Describes a Machine Extension Update. */ export interface MachineExtensionUpdate extends ResourceUpdate { - /** Describes Machine Extension Update Properties. */ - properties?: MachineExtensionUpdateProperties; + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; } /** Describes a hybrid machine Update. */ export interface MachineUpdate extends ResourceUpdate { /** Identity for the resource. */ identity?: Identity; - /** Hybrid Compute Machine properties */ - properties?: MachineUpdateProperties; + /** Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. */ + kind?: PrivateCloudKind; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; + /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ + cloudMetadata?: CloudMetadata; + /** The info of the machine w.r.t Agent Upgrade */ + agentUpgrade?: AgentUpgrade; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; } /** An Azure Arc PrivateLinkScope definition. */ @@ -641,50 +748,247 @@ export interface HybridComputePrivateLinkScope readonly systemData?: SystemData; } +/** Describes a Machine Extension. */ +export interface MachineExtension extends TrackedResource { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The machine extension instance view. */ + instanceView?: MachineExtensionInstanceView; +} + /** Describes a hybrid machine. */ export interface Machine extends TrackedResource { - /** Hybrid Compute Machine properties */ - properties?: MachineProperties; + /** + * The list of extensions affiliated to the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resources?: MachineExtension[]; /** Identity for the resource. */ identity?: Identity; + /** Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. */ + kind?: PrivateCloudKind; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; /** - * The system meta data relating to this resource. + * Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly agentConfiguration?: AgentConfiguration; + /** Statuses of dependent services that are reported back to ARM. */ + serviceStatuses?: ServiceStatuses; + /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ + cloudMetadata?: CloudMetadata; + /** The info of the machine w.r.t Agent Upgrade */ + agentUpgrade?: AgentUpgrade; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The status of the hybrid machine agent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: StatusTypes; + /** + * The time of the last status change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastStatusChange?: Date; + /** + * Details about the error state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorDetails?: ErrorDetail[]; + /** + * The hybrid machine agent full version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly agentVersion?: string; + /** Specifies the hybrid machine unique ID. */ + vmId?: string; + /** + * Specifies the hybrid machine display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** + * Specifies the hybrid machine FQDN. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly machineFqdn?: string; + /** Public Key that the client provides to be used during initial resource onboarding */ + clientPublicKey?: string; + /** + * The Operating System running on the hybrid machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osName?: string; + /** + * The version of Operating System running on the hybrid machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osVersion?: string; + /** The type of Operating System (windows/linux). */ + osType?: string; + /** + * Specifies the Arc Machine's unique SMBIOS ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmUuid?: string; + /** Machine Extensions information (deprecated field) */ + extensions?: MachineExtensionInstanceView[]; + /** + * Specifies the Operating System product SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osSku?: string; + /** + * Specifies the Windows domain name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly domainName?: string; + /** + * Specifies the AD fully qualified display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly adFqdn?: string; + /** + * Specifies the DNS fully qualified display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dnsFqdn?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** Specifies whether any MS SQL instance is discovered on the machine. */ + mssqlDiscovered?: string; + /** + * Detected properties from the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly detectedProperties?: { [propertyName: string]: string }; + /** + * Information about the network the machine is on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkProfile?: NetworkProfile; } -/** Describes a Machine Extension. */ -export interface MachineExtension extends TrackedResource { - /** Describes Machine Extension Properties. */ - properties?: MachineExtensionProperties; +/** Describes a Extension Metadata */ +export interface ExtensionValue extends ProxyResource { /** - * The system meta data relating to this resource. + * The version of the Extension being received. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly version?: string; + /** + * The type of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly extensionType?: string; + /** + * The publisher of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publisher?: string; +} + +/** Defines the HybridIdentityMetadata. */ +export interface HybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + vmId?: string; + /** The Public Key. */ + publicKey?: string; + /** + * Identity for the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly identity?: Identity; } /** A private link resource */ export interface PrivateLinkResource extends ProxyResource { /** Resource properties. */ properties?: PrivateLinkResourceProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; } /** A private endpoint connection */ export interface PrivateEndpointConnection extends ProxyResource { /** Resource properties. */ properties?: PrivateEndpointConnectionProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; +} + +/** Defines headers for MachineExtensions_update operation. */ +export interface MachineExtensionsUpdateHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for MachineExtensions_delete operation. */ +export interface MachineExtensionsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for HybridComputeManagementClient_upgradeExtensions operation. */ +export interface HybridComputeManagementClientUpgradeExtensionsHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for PrivateLinkScopes_delete operation. */ +export interface PrivateLinkScopesDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for PrivateEndpointConnections_delete operation. */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; } /** Known values of {@link InstanceViewTypes} that the service accepts. */ @@ -702,6 +1006,84 @@ export enum KnownInstanceViewTypes { */ export type InstanceViewTypes = string; +/** Known values of {@link AgentConfigurationMode} that the service accepts. */ +export enum KnownAgentConfigurationMode { + /** Full */ + Full = "full", + /** Monitor */ + Monitor = "monitor" +} + +/** + * Defines values for AgentConfigurationMode. \ + * {@link KnownAgentConfigurationMode} can be used interchangeably with AgentConfigurationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **full** \ + * **monitor** + */ +export type AgentConfigurationMode = string; + +/** Known values of {@link LastAttemptStatusEnum} that the service accepts. */ +export enum KnownLastAttemptStatusEnum { + /** Success */ + Success = "Success", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for LastAttemptStatusEnum. \ + * {@link KnownLastAttemptStatusEnum} can be used interchangeably with LastAttemptStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Success** \ + * **Failed** + */ +export type LastAttemptStatusEnum = string; + +/** Known values of {@link AssessmentModeTypes} that the service accepts. */ +export enum KnownAssessmentModeTypes { + /** ImageDefault */ + ImageDefault = "ImageDefault", + /** AutomaticByPlatform */ + AutomaticByPlatform = "AutomaticByPlatform" +} + +/** + * Defines values for AssessmentModeTypes. \ + * {@link KnownAssessmentModeTypes} can be used interchangeably with AssessmentModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** + */ +export type AssessmentModeTypes = string; + +/** Known values of {@link PatchModeTypes} that the service accepts. */ +export enum KnownPatchModeTypes { + /** ImageDefault */ + ImageDefault = "ImageDefault", + /** AutomaticByPlatform */ + AutomaticByPlatform = "AutomaticByPlatform", + /** AutomaticByOS */ + AutomaticByOS = "AutomaticByOS", + /** Manual */ + Manual = "Manual" +} + +/** + * Defines values for PatchModeTypes. \ + * {@link KnownPatchModeTypes} can be used interchangeably with PatchModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** \ + * **AutomaticByOS** \ + * **Manual** + */ +export type PatchModeTypes = string; + /** Known values of {@link StatusTypes} that the service accepts. */ export enum KnownStatusTypes { /** Connected */ @@ -768,6 +1150,30 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link PrivateCloudKind} that the service accepts. */ +export enum KnownPrivateCloudKind { + /** AVS */ + AVS = "AVS", + /** HCI */ + HCI = "HCI", + /** Scvmm */ + Scvmm = "SCVMM", + /** VMware */ + VMware = "VMware" +} + +/** + * Defines values for PrivateCloudKind. \ + * {@link KnownPrivateCloudKind} can be used interchangeably with PrivateCloudKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AVS** \ + * **HCI** \ + * **SCVMM** \ + * **VMware** + */ +export type PrivateCloudKind = string; + /** Known values of {@link PublicNetworkAccessType} that the service accepts. */ export enum KnownPublicNetworkAccessType { /** Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and private endpoints. */ @@ -879,10 +1285,7 @@ export type MachineExtensionsListResponse = MachineExtensionsListResult; /** Optional parameters. */ export interface MachineExtensionsListNextOptionalParams - extends coreClient.OperationOptions { - /** The expand expression to apply on the operation. */ - expand?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type MachineExtensionsListNextResponse = MachineExtensionsListResult; @@ -896,6 +1299,20 @@ export interface UpgradeExtensionsOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ExtensionMetadataGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExtensionMetadataGetResponse = ExtensionValue; + +/** Optional parameters. */ +export interface ExtensionMetadataListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ExtensionMetadataListResponse = ExtensionValueListResult; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -903,6 +1320,48 @@ export interface OperationsListOptionalParams /** Contains response data for the list operation. */ export type OperationsListResponse = OperationListResult; +/** Optional parameters. */ +export interface NetworkProfileGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkProfileGetResponse = NetworkProfile; + +/** Optional parameters. */ +export interface HybridIdentityMetadataGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type HybridIdentityMetadataGetResponse = HybridIdentityMetadata; + +/** Optional parameters. */ +export interface HybridIdentityMetadataListByMachinesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByMachines operation. */ +export type HybridIdentityMetadataListByMachinesResponse = HybridIdentityMetadataList; + +/** Optional parameters. */ +export interface HybridIdentityMetadataListByMachinesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByMachinesNext operation. */ +export type HybridIdentityMetadataListByMachinesNextResponse = HybridIdentityMetadataList; + +/** Optional parameters. */ +export interface AgentVersionListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AgentVersionListResponse = AgentVersionsList; + +/** Optional parameters. */ +export interface AgentVersionGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AgentVersionGetResponse = AgentVersion; + /** Optional parameters. */ export interface PrivateLinkScopesListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts index 18083d2ef24f..c585de490a26 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -104,218 +104,260 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const MachineProperties: coreClient.CompositeMapper = { +export const LocationData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineProperties", + className: "LocationData", modelProperties: { - locationData: { - serializedName: "locationData", + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, type: { - name: "Composite", - className: "LocationData" + name: "String" } }, - osProfile: { - serializedName: "osProfile", + city: { + serializedName: "city", type: { - name: "Composite", - className: "OSProfile" + name: "String" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + district: { + serializedName: "district", type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + countryOrRegion: { + serializedName: "countryOrRegion", type: { name: "String" } - }, - lastStatusChange: { - serializedName: "lastStatusChange", + } + } + } +}; + +export const AgentConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentConfiguration", + modelProperties: { + proxyUrl: { + serializedName: "proxyUrl", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + incomingConnectionsPorts: { + serializedName: "incomingConnectionsPorts", readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ErrorDetail" + name: "String" } } } }, - agentVersion: { - serializedName: "agentVersion", + extensionsAllowList: { + serializedName: "extensionsAllowList", readOnly: true, type: { - name: "String" - } - }, - vmId: { - serializedName: "vmId", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - displayName: { - serializedName: "displayName", + extensionsBlockList: { + serializedName: "extensionsBlockList", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - machineFqdn: { - serializedName: "machineFqdn", + proxyBypass: { + serializedName: "proxyBypass", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - clientPublicKey: { - serializedName: "clientPublicKey", + extensionsEnabled: { + serializedName: "extensionsEnabled", + readOnly: true, type: { name: "String" } }, - osName: { - serializedName: "osName", + guestConfigurationEnabled: { + serializedName: "guestConfigurationEnabled", readOnly: true, type: { name: "String" } }, - osVersion: { - serializedName: "osVersion", + configMode: { + serializedName: "configMode", readOnly: true, type: { name: "String" } - }, - osType: { - serializedName: "osType", + } + } + } +}; + +export const ConfigurationExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationExtension", + modelProperties: { + publisher: { + serializedName: "publisher", + readOnly: true, type: { name: "String" } }, - vmUuid: { - serializedName: "vmUuid", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } - }, - extensions: { - serializedName: "extensions", + } + } + } +}; + +export const ServiceStatuses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatuses", + modelProperties: { + extensionService: { + serializedName: "extensionService", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MachineExtensionInstanceView" - } - } + name: "Composite", + className: "ServiceStatus" } }, - osSku: { - serializedName: "osSku", - readOnly: true, + guestConfigurationService: { + serializedName: "guestConfigurationService", type: { - name: "String" + name: "Composite", + className: "ServiceStatus" } - }, - domainName: { - serializedName: "domainName", - readOnly: true, + } + } + } +}; + +export const ServiceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatus", + modelProperties: { + status: { + serializedName: "status", type: { name: "String" } }, - adFqdn: { - serializedName: "adFqdn", - readOnly: true, + startupType: { + serializedName: "startupType", type: { name: "String" } - }, - dnsFqdn: { - serializedName: "dnsFqdn", + } + } + } +}; + +export const CloudMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudMetadata", + modelProperties: { + provider: { + serializedName: "provider", readOnly: true, type: { name: "String" } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + } + } + } +}; + +export const AgentUpgrade: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentUpgrade", + modelProperties: { + desiredVersion: { + serializedName: "desiredVersion", type: { name: "String" } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + correlationId: { + serializedName: "correlationId", type: { name: "String" } }, - mssqlDiscovered: { - serializedName: "mssqlDiscovered", + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", type: { - name: "String" + name: "Boolean" } }, - detectedProperties: { - serializedName: "detectedProperties", + lastAttemptDesiredVersion: { + serializedName: "lastAttemptDesiredVersion", readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const LocationData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocationData", - modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, type: { name: "String" } }, - city: { - serializedName: "city", + lastAttemptTimestamp: { + serializedName: "lastAttemptTimestamp", + readOnly: true, type: { name: "String" } }, - district: { - serializedName: "district", + lastAttemptStatus: { + serializedName: "lastAttemptStatus", + readOnly: true, type: { name: "String" } }, - countryOrRegion: { - serializedName: "countryOrRegion", + lastAttemptMessage: { + serializedName: "lastAttemptMessage", + readOnly: true, type: { name: "String" } @@ -364,6 +406,12 @@ export const OSProfileWindowsConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -379,6 +427,12 @@ export const OSProfileLinuxConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -457,77 +511,86 @@ export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { } }; -export const Identity: coreClient.CompositeMapper = { +export const NetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Identity", + className: "NetworkProfile", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + networkInterfaces: { + serializedName: "networkInterfaces", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterface" + } + } } - }, - type: { - defaultValue: "SystemAssigned", - isConstant: true, - serializedName: "type", + } + } + } +}; + +export const NetworkInterface: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterface", + modelProperties: { + ipAddresses: { + serializedName: "ipAddresses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddress" + } + } } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const IpAddress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "IpAddress", modelProperties: { - createdBy: { - serializedName: "createdBy", + address: { + serializedName: "address", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + ipAddressVersion: { + serializedName: "ipAddressVersion", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", + subnet: { + serializedName: "subnet", type: { - name: "DateTime" + name: "Composite", + className: "Subnet" } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + } + } + } +}; + +export const Subnet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Subnet", + modelProperties: { + addressPrefix: { + serializedName: "addressPrefix", type: { name: "String" } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } } } } @@ -558,153 +621,116 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const MachineListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Machine" - } - } - } }, - nextLink: { - serializedName: "nextLink", + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } } }; -export const MachineExtensionProperties: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionProperties", + className: "SystemData", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - publisher: { - serializedName: "publisher", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - type: { - serializedName: "type", + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - instanceView: { - serializedName: "instanceView", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "Composite", - className: "MachineExtensionInstanceView" + name: "DateTime" } } } } }; -export const MachineExtensionUpdateProperties: coreClient.CompositeMapper = { +export const Identity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdateProperties", + className: "Identity", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", + principalId: { + serializedName: "principalId", + readOnly: true, type: { name: "String" } }, - publisher: { - serializedName: "publisher", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { name: "String" } }, type: { + defaultValue: "SystemAssigned", + isConstant: true, serializedName: "type", type: { name: "String" } - }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", - type: { - name: "String" - } - }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "settings", + } + } + } +}; + +export const MachineListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Machine" + } + } } }, - protectedSettings: { - serializedName: "protectedSettings", + nextLink: { + serializedName: "nextLink", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } } } @@ -787,6 +813,28 @@ export const ExtensionTargetProperties: coreClient.CompositeMapper = { } }; +export const ExtensionValueListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionValueListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExtensionValue" + } + } + } + } + } + } +}; + export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -834,6 +882,13 @@ export const OperationValue: coreClient.CompositeMapper = { name: "Composite", className: "OperationValueDisplay" } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } } } } @@ -876,11 +931,17 @@ export const OperationValueDisplay: coreClient.CompositeMapper = { } }; -export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { +export const HybridIdentityMetadataList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridComputePrivateLinkScopeListResult", + className: "HybridIdentityMetadataList", modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, value: { serializedName: "value", required: true, @@ -889,7 +950,28 @@ export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper element: { type: { name: "Composite", - className: "HybridComputePrivateLinkScope" + className: "HybridIdentityMetadata" + } + } + } + } + } + } +}; + +export const AgentVersionsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentVersionsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AgentVersion" } } } @@ -904,85 +986,212 @@ export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper } }; -export const HybridComputePrivateLinkScopeProperties: coreClient.CompositeMapper = { +export const AgentVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridComputePrivateLinkScopeProperties", + className: "AgentVersion", modelProperties: { - publicNetworkAccess: { - defaultValue: "Disabled", - serializedName: "publicNetworkAccess", + agentVersion: { + serializedName: "agentVersion", type: { name: "String" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + downloadLink: { + serializedName: "downloadLink", type: { name: "String" } }, - privateLinkScopeId: { - serializedName: "privateLinkScopeId", - readOnly: true, + osType: { + serializedName: "osType", type: { name: "String" } - }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", - readOnly: true, + } + } + } +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnectionDataModel" - } - } + name: "Composite", + className: "ErrorDetailAutoGenerated" } } } } }; -export const PrivateEndpointConnectionDataModel: coreClient.CompositeMapper = { +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionDataModel", + className: "ErrorDetailAutoGenerated", modelProperties: { - id: { - serializedName: "id", + code: { + serializedName: "code", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + message: { + serializedName: "message", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + target: { + serializedName: "target", readOnly: true, type: { name: "String" } }, - properties: { - serializedName: "properties", + details: { + serializedName: "details", + readOnly: true, type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" - } - } - } - } -}; + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridComputePrivateLinkScopeListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HybridComputePrivateLinkScope" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const HybridComputePrivateLinkScopeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridComputePrivateLinkScopeProperties", + modelProperties: { + publicNetworkAccess: { + defaultValue: "Disabled", + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + privateLinkScopeId: { + serializedName: "privateLinkScopeId", + readOnly: true, + type: { + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnectionDataModel" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionDataModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionDataModel", + 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" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { type: { @@ -1009,6 +1218,18 @@ export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + groupIds: { + serializedName: "groupIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1296,41 +1517,6 @@ export const ConnectionDetail: coreClient.CompositeMapper = { } }; -export const MachineUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineUpdateProperties", - modelProperties: { - locationData: { - serializedName: "locationData", - type: { - name: "Composite", - className: "LocationData" - } - }, - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "OSProfile" - } - }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", - type: { - name: "String" - } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", - type: { - name: "String" - } - } - } - } -}; - export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1371,11 +1557,54 @@ export const MachineExtensionUpdate: coreClient.CompositeMapper = { className: "MachineExtensionUpdate", modelProperties: { ...ResourceUpdate.type.modelProperties, - properties: { - serializedName: "properties", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { - name: "Composite", - className: "MachineExtensionUpdateProperties" + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", + type: { + name: "String" + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -1395,11 +1624,50 @@ export const MachineUpdate: coreClient.CompositeMapper = { className: "Identity" } }, - properties: { - serializedName: "properties", + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + locationData: { + serializedName: "properties.locationData", + type: { + name: "Composite", + className: "LocationData" + } + }, + osProfile: { + serializedName: "properties.osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + cloudMetadata: { + serializedName: "properties.cloudMetadata", + type: { + name: "Composite", + className: "CloudMetadata" + } + }, + agentUpgrade: { + serializedName: "properties.agentUpgrade", type: { name: "Composite", - className: "MachineUpdateProperties" + className: "AgentUpgrade" + } + }, + parentClusterResourceId: { + serializedName: "properties.parentClusterResourceId", + type: { + name: "String" + } + }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" } } } @@ -1430,55 +1698,379 @@ export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { } }; -export const Machine: coreClient.CompositeMapper = { +export const MachineExtension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Machine", + className: "MachineExtension", modelProperties: { ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { - name: "Composite", - className: "MachineProperties" + name: "String" } }, - identity: { - serializedName: "identity", + publisher: { + serializedName: "properties.publisher", type: { - name: "Composite", - className: "Identity" + name: "String" } }, - systemData: { - serializedName: "systemData", + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", + type: { + name: "String" + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + instanceView: { + serializedName: "properties.instanceView", type: { name: "Composite", - className: "SystemData" + className: "MachineExtensionInstanceView" } } } } }; -export const MachineExtension: coreClient.CompositeMapper = { +export const Machine: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtension", + className: "Machine", modelProperties: { ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + resources: { + serializedName: "resources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } + } + }, + identity: { + serializedName: "identity", type: { name: "Composite", - className: "MachineExtensionProperties" + className: "Identity" } }, - systemData: { - serializedName: "systemData", + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + locationData: { + serializedName: "properties.locationData", type: { name: "Composite", - className: "SystemData" + className: "LocationData" + } + }, + agentConfiguration: { + serializedName: "properties.agentConfiguration", + type: { + name: "Composite", + className: "AgentConfiguration" + } + }, + serviceStatuses: { + serializedName: "properties.serviceStatuses", + type: { + name: "Composite", + className: "ServiceStatuses" + } + }, + cloudMetadata: { + serializedName: "properties.cloudMetadata", + type: { + name: "Composite", + className: "CloudMetadata" + } + }, + agentUpgrade: { + serializedName: "properties.agentUpgrade", + type: { + name: "Composite", + className: "AgentUpgrade" + } + }, + osProfile: { + serializedName: "properties.osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + lastStatusChange: { + serializedName: "properties.lastStatusChange", + readOnly: true, + type: { + name: "DateTime" + } + }, + errorDetails: { + serializedName: "properties.errorDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + agentVersion: { + serializedName: "properties.agentVersion", + readOnly: true, + type: { + name: "String" + } + }, + vmId: { + serializedName: "properties.vmId", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + readOnly: true, + type: { + name: "String" + } + }, + machineFqdn: { + serializedName: "properties.machineFqdn", + readOnly: true, + type: { + name: "String" + } + }, + clientPublicKey: { + serializedName: "properties.clientPublicKey", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", + readOnly: true, + type: { + name: "String" + } + }, + osVersion: { + serializedName: "properties.osVersion", + readOnly: true, + type: { + name: "String" + } + }, + osType: { + serializedName: "properties.osType", + type: { + name: "String" + } + }, + vmUuid: { + serializedName: "properties.vmUuid", + readOnly: true, + type: { + name: "String" + } + }, + extensions: { + serializedName: "properties.extensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtensionInstanceView" + } + } + } + }, + osSku: { + serializedName: "properties.osSku", + readOnly: true, + type: { + name: "String" + } + }, + domainName: { + serializedName: "properties.domainName", + readOnly: true, + type: { + name: "String" + } + }, + adFqdn: { + serializedName: "properties.adFqdn", + readOnly: true, + type: { + name: "String" + } + }, + dnsFqdn: { + serializedName: "properties.dnsFqdn", + readOnly: true, + type: { + name: "String" + } + }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" + } + }, + parentClusterResourceId: { + serializedName: "properties.parentClusterResourceId", + type: { + name: "String" + } + }, + mssqlDiscovered: { + serializedName: "properties.mssqlDiscovered", + type: { + name: "String" + } + }, + detectedProperties: { + serializedName: "properties.detectedProperties", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + } + } + } +}; + +export const ExtensionValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionValue", + modelProperties: { + ...ProxyResource.type.modelProperties, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "String" + } + }, + extensionType: { + serializedName: "properties.extensionType", + readOnly: true, + type: { + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const HybridIdentityMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadata", + modelProperties: { + ...ProxyResource.type.modelProperties, + vmId: { + serializedName: "properties.vmId", + type: { + name: "String" + } + }, + publicKey: { + serializedName: "properties.publicKey", + type: { + name: "String" + } + }, + identity: { + serializedName: "properties.identity", + type: { + name: "Composite", + className: "Identity" } } } @@ -1497,13 +2089,6 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Composite", className: "PrivateLinkResourceProperties" } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } } } } @@ -1521,12 +2106,140 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { name: "Composite", className: "PrivateEndpointConnectionProperties" } + } + } + } +}; + +export const MachineExtensionsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } }, - systemData: { - serializedName: "systemData", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "SystemData" + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const MachineExtensionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const HybridComputeManagementClientUpgradeExtensionsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridComputeManagementClientUpgradeExtensionsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkScopesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 3e589fbc8dbd..1e65111d2cbd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -47,7 +47,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-10-preview", + defaultValue: "2023-03-15-preview", isConstant: true, serializedName: "api-version", type: { @@ -88,6 +88,11 @@ export const resourceGroupName: OperationURLParameter = { export const machineName: OperationURLParameter = { parameterPath: "machineName", mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, serializedName: "machineName", required: true, type: { @@ -166,6 +171,75 @@ export const extensionUpgradeParameters: OperationParameter = { mapper: MachineExtensionUpgradeMapper }; +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const publisher: OperationURLParameter = { + parameterPath: "publisher", + mapper: { + serializedName: "publisher", + required: true, + type: { + name: "String" + } + } +}; + +export const extensionType: OperationURLParameter = { + parameterPath: "extensionType", + mapper: { + serializedName: "extensionType", + required: true, + type: { + name: "String" + } + } +}; + +export const version: OperationURLParameter = { + parameterPath: "version", + mapper: { + serializedName: "version", + required: true, + type: { + name: "String" + } + } +}; + +export const metadataName: OperationURLParameter = { + parameterPath: "metadataName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]") + }, + serializedName: "metadataName", + required: true, + type: { + name: "String" + } + } +}; + +export const osType: OperationURLParameter = { + parameterPath: "osType", + mapper: { + serializedName: "osType", + required: true, + type: { + name: "String" + } + } +}; + export const scopeName: OperationURLParameter = { parameterPath: "scopeName", mapper: { @@ -187,7 +261,7 @@ export const privateLinkScopeTags: OperationParameter = { mapper: TagsResourceMapper }; -export const location: OperationURLParameter = { +export const location1: OperationURLParameter = { parameterPath: "location", mapper: { constraints: { diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts new file mode 100644 index 000000000000..530e78500e4e --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts @@ -0,0 +1,101 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { AgentVersionOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + AgentVersionListOptionalParams, + AgentVersionListResponse, + AgentVersionGetOptionalParams, + AgentVersionGetResponse +} from "../models"; + +/** Class containing AgentVersionOperations operations. */ +export class AgentVersionOperationsImpl implements AgentVersionOperations { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class AgentVersionOperations class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all Agent Versions along with the download link currently present. + * @param osType Defines the os type. + * @param options The options parameters. + */ + list( + osType: string, + options?: AgentVersionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { osType, options }, + listOperationSpec + ); + } + + /** + * Gets an Agent Version along with the download link currently present. + * @param osType Defines the os type + * @param version Defines the agent version. To get latest, use latest or else a specific agent + * version. + * @param options The options parameters. + */ + get( + osType: string, + version: string, + options?: AgentVersionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { osType, version, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AgentVersionsList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.osType], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AgentVersion + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.version, Parameters.osType], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts new file mode 100644 index 000000000000..637b6f7d6f40 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts @@ -0,0 +1,194 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ExtensionMetadata } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataListResponse, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse +} from "../models"; + +/// +/** Class containing ExtensionMetadata operations. */ +export class ExtensionMetadataImpl implements ExtensionMetadata { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class ExtensionMetadata class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + public list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + location, + publisher, + extensionType, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + location, + publisher, + extensionType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: ExtensionMetadataListResponse; + result = await this._list(location, publisher, extensionType, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + publisher, + extensionType, + options + )) { + yield* page; + } + } + + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, version, options }, + getOperationSpec + ); + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + private _list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValue + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisher, + Parameters.extensionType, + Parameters.version + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValueListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisher, + Parameters.extensionType + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..03244cd37b88 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts @@ -0,0 +1,247 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { HybridIdentityMetadataOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + HybridIdentityMetadata, + HybridIdentityMetadataListByMachinesNextOptionalParams, + HybridIdentityMetadataListByMachinesOptionalParams, + HybridIdentityMetadataListByMachinesResponse, + HybridIdentityMetadataGetOptionalParams, + HybridIdentityMetadataGetResponse, + HybridIdentityMetadataListByMachinesNextResponse +} from "../models"; + +/// +/** Class containing HybridIdentityMetadataOperations operations. */ +export class HybridIdentityMetadataOperationsImpl + implements HybridIdentityMetadataOperations { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class HybridIdentityMetadataOperations class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Returns the list of HybridIdentityMetadata of the given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + public listByMachines( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByMachinesPagingAll( + resourceGroupName, + machineName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByMachinesPagingPage( + resourceGroupName, + machineName, + options, + settings + ); + } + }; + } + + private async *listByMachinesPagingPage( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: HybridIdentityMetadataListByMachinesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMachines( + resourceGroupName, + machineName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByMachinesNext( + resourceGroupName, + machineName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByMachinesPagingAll( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByMachinesPagingPage( + resourceGroupName, + machineName, + options + )) { + yield* page; + } + } + + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param metadataName Name of the HybridIdentityMetadata. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + metadataName: string, + options?: HybridIdentityMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, metadataName, options }, + getOperationSpec + ); + } + + /** + * Returns the list of HybridIdentityMetadata of the given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + private _listByMachines( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + listByMachinesOperationSpec + ); + } + + /** + * ListByMachinesNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param nextLink The nextLink from the previous successful call to the ListByMachines method. + * @param options The options parameters. + */ + private _listByMachinesNext( + resourceGroupName: string, + machineName: string, + nextLink: string, + options?: HybridIdentityMetadataListByMachinesNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, nextLink, options }, + listByMachinesNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata/{metadataName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadata + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName, + Parameters.metadataName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByMachinesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByMachinesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index f8024e8bc5a1..7aac6aec7463 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -8,7 +8,11 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; +export * from "./networkProfileOperations"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./agentVersionOperations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index eebebbcb00e7..ee82b13295cd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MachineExtension, MachineExtensionsListNextOptionalParams, @@ -135,8 +139,8 @@ export class MachineExtensionsImpl implements MachineExtensions { extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsCreateOrUpdateResponse > > { @@ -146,7 +150,7 @@ export class MachineExtensionsImpl implements MachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -179,19 +183,22 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MachineExtensionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -238,8 +245,8 @@ export class MachineExtensionsImpl implements MachineExtensions { extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsUpdateResponse > > { @@ -249,7 +256,7 @@ export class MachineExtensionsImpl implements MachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -282,19 +289,22 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + MachineExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -338,14 +348,14 @@ export class MachineExtensionsImpl implements MachineExtensions { machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -378,13 +388,13 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, machineName, extensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -619,7 +629,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 59d68ce49514..d67d6d77e0f5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts @@ -167,7 +167,7 @@ export class MachinesImpl implements Machines { } /** - * The operation to remove a hybrid machine identity in Azure. + * The operation to delete a hybrid machine. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param options The options parameters. @@ -357,7 +357,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -378,7 +377,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/networkProfileOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/networkProfileOperations.ts new file mode 100644 index 000000000000..cf0bd952fcbb --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/networkProfileOperations.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { NetworkProfileOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + NetworkProfileGetOptionalParams, + NetworkProfileGetResponse +} from "../models"; + +/** Class containing NetworkProfileOperations operations. */ +export class NetworkProfileOperationsImpl implements NetworkProfileOperations { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class NetworkProfileOperations class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * The operation to get network information of hybrid machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + options?: NetworkProfileGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts index 77a4bc75fb63..f612107a6912 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams, @@ -160,8 +164,8 @@ export class PrivateEndpointConnectionsImpl parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > > { @@ -171,7 +175,7 @@ export class PrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -204,19 +208,22 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -260,14 +267,14 @@ export class PrivateEndpointConnectionsImpl scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,13 +307,18 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, scopeName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + scopeName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,7 +500,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts index c58e1dc77baa..762e9cb1b6d2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts @@ -234,7 +234,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts index 8c7b8cc9f9b1..5df1ef02b642 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { HybridComputePrivateLinkScope, PrivateLinkScopesListNextOptionalParams, @@ -210,14 +214,14 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -250,13 +254,13 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, scopeName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, scopeName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -559,7 +563,7 @@ const getValidationDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location, + Parameters.location1, Parameters.privateLinkScopeId ], headerParameters: [Parameters.accept], @@ -598,7 +602,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -618,7 +621,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/agentVersionOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/agentVersionOperations.ts new file mode 100644 index 000000000000..73a93d051d5a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/agentVersionOperations.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + AgentVersionListOptionalParams, + AgentVersionListResponse, + AgentVersionGetOptionalParams, + AgentVersionGetResponse +} from "../models"; + +/** Interface representing a AgentVersionOperations. */ +export interface AgentVersionOperations { + /** + * Gets all Agent Versions along with the download link currently present. + * @param osType Defines the os type. + * @param options The options parameters. + */ + list( + osType: string, + options?: AgentVersionListOptionalParams + ): Promise; + /** + * Gets an Agent Version along with the download link currently present. + * @param osType Defines the os type + * @param version Defines the agent version. To get latest, use latest or else a specific agent + * version. + * @param options The options parameters. + */ + get( + osType: string, + version: string, + options?: AgentVersionGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts new file mode 100644 index 000000000000..69eff6605ed3 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a ExtensionMetadata. */ +export interface ExtensionMetadata { + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/hybridIdentityMetadataOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/hybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..e21821851ae2 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/hybridIdentityMetadataOperations.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + HybridIdentityMetadata, + HybridIdentityMetadataListByMachinesOptionalParams, + HybridIdentityMetadataGetOptionalParams, + HybridIdentityMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a HybridIdentityMetadataOperations. */ +export interface HybridIdentityMetadataOperations { + /** + * Returns the list of HybridIdentityMetadata of the given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + listByMachines( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param metadataName Name of the HybridIdentityMetadata. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + metadataName: string, + options?: HybridIdentityMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts index f8024e8bc5a1..7aac6aec7463 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -8,7 +8,11 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; +export * from "./networkProfileOperations"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./agentVersionOperations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts index 0aae932d1c04..426ece06c8da 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MachineExtension, MachineExtensionsListOptionalParams, @@ -50,8 +50,8 @@ export interface MachineExtensions { extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsCreateOrUpdateResponse > >; @@ -85,8 +85,8 @@ export interface MachineExtensions { extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsUpdateResponse > >; @@ -117,7 +117,7 @@ export interface MachineExtensions { machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts index 1fb8be19778a..d8a58a3756d7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts @@ -38,7 +38,7 @@ export interface Machines { options?: MachinesListBySubscriptionOptionalParams ): PagedAsyncIterableIterator; /** - * The operation to remove a hybrid machine identity in Azure. + * The operation to delete a hybrid machine. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param options The options parameters. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/networkProfileOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/networkProfileOperations.ts new file mode 100644 index 000000000000..464d0b7325bf --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/networkProfileOperations.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + NetworkProfileGetOptionalParams, + NetworkProfileGetResponse +} from "../models"; + +/** Interface representing a NetworkProfileOperations. */ +export interface NetworkProfileOperations { + /** + * The operation to get network information of hybrid machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + options?: NetworkProfileGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts index 36e96d115fc1..15dd67bb7ffc 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams, @@ -60,8 +60,8 @@ export interface PrivateEndpointConnections { parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface PrivateEndpointConnections { scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a private endpoint connection with a given name. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts index 6d244d426636..4c49ea06cbf7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { HybridComputePrivateLinkScope, PrivateLinkScopesListOptionalParams, @@ -55,7 +55,7 @@ export interface PrivateLinkScopes { resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Azure Arc PrivateLinkScope. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts b/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json index a87ba17ac142..3e6ae96443f3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json +++ b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-hybridcompute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"