diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a180cc36f5e8..8b0b59aa1ff4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2900,7 +2900,7 @@ packages: /@types/is-buffer@2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/istanbul-lib-coverage@2.0.5: @@ -2918,13 +2918,13 @@ packages: /@types/jsonwebtoken@9.0.3: resolution: {integrity: sha512-b0jGiOgHtZ2jqdPgPnP6WLCXZk1T8p06A/vPGzUvxpFGgKMbjXJDjC5m52ErqBnIuWZFgGoIJyRdeG5AyreJjA==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/jws@3.2.6: resolution: {integrity: sha512-SVbs88FPvGVMj19JYVOV+NpWu3HO5LUjz0+z6ks/rdRbrWlxs6fBz6Qxb/PKalZaweJisPyfikeoPu8VlpljQQ==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/linkify-it@3.0.3: @@ -2975,13 +2975,13 @@ packages: /@types/mysql@2.15.22: resolution: {integrity: sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/node-fetch@2.6.6: resolution: {integrity: sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 form-data: 4.0.0 dev: false @@ -3006,7 +3006,7 @@ packages: /@types/pg@8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -3085,7 +3085,7 @@ packages: /@types/stoppable@1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/through@0.0.31: @@ -3105,7 +3105,7 @@ packages: /@types/tunnel@0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/underscore@1.11.11: @@ -3135,7 +3135,7 @@ packages: /@types/xml2js@0.4.12: resolution: {integrity: sha512-CZPpQKBZ8db66EP5hCjwvYrLThgZvnyZrPXK2W+UI1oOaWezGt34iOaUCX4Jah2X8+rQqjvl9VKEIT8TR1I0rA==} dependencies: - '@types/node': 16.18.58 + '@types/node': 18.18.6 dev: false /@types/yargs-parser@21.0.1: @@ -8847,6 +8847,37 @@ packages: code-block-writer: 12.0.0 dev: false + /ts-node@10.9.1(@types/node@16.18.58)(typescript@5.0.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 16.18.58 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.0.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.1(@types/node@16.18.58)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -12518,21 +12549,30 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-3ezQoA/9/WfIBSzwlhkoohnyYNV0wG242c1Qoel1ivIFwDDCJUj9Ik/Q49CvrFRs++DlqkuTnoa84BPVHF5YqA==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-xuHskddgKER+U+dpnvfy52ZAYjDKE2DK4mx10ocQu6S94KeCsjV+1Isu0dyWlXN6B1wUPbqpGLKcGNnMYRxFkw==, tarball: file:projects/arm-hybridcompute.tgz} name: '@rush-temp/arm-hybridcompute' version: 0.0.0 dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@16.18.58) + '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) + '@rollup/plugin-json': 6.0.1(rollup@2.79.1) + '@rollup/plugin-multi-entry': 6.0.1(rollup@2.79.1) + '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.9 + '@types/mocha': 10.0.2 '@types/node': 16.18.58 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 - ts-node: 10.9.1(@types/node@16.18.58)(typescript@5.2.2) + rimraf: 5.0.5 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.58)(rollup@2.79.1) + ts-node: 10.9.1(@types/node@16.18.58)(typescript@5.0.4) tslib: 2.6.2 - typescript: 5.2.2 + typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index 2915f9a8673f..13707df208a4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,37 +1,193 @@ # 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-10-23) **Features** + - Added operation group AgentVersionOperations + - Added operation group ExtensionMetadata + - Added operation group HybridIdentityMetadataOperations + - Added operation group LicenseProfiles + - Added operation group Licenses + - Added operation group NetworkProfileOperations + - Added operation Machines.beginAssessPatches + - Added operation Machines.beginAssessPatchesAndWait + - Added operation Machines.beginInstallPatches + - Added operation Machines.beginInstallPatchesAndWait + - Added Interface AgentConfiguration + - Added Interface AgentUpgrade + - Added Interface AgentVersion + - Added Interface AgentVersionGetOptionalParams + - Added Interface AgentVersionListOptionalParams + - Added Interface AgentVersionsList + - Added Interface AvailablePatchCountByClassification + - Added Interface CloudMetadata + - Added Interface ConfigurationExtension + - Added Interface ErrorDetailAutoGenerated + - Added Interface ErrorResponseAutoGenerated + - Added Interface EsuKey + - 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 License + - Added Interface LicenseDetails + - Added Interface LicenseProfile + - Added Interface LicenseProfileArmEsuProperties + - Added Interface LicenseProfileArmEsuPropertiesWithoutAssignedLicense + - Added Interface LicenseProfileMachineInstanceView + - Added Interface LicenseProfileMachineInstanceViewEsuProperties + - Added Interface LicenseProfilesCreateOrUpdateHeaders + - Added Interface LicenseProfilesCreateOrUpdateOptionalParams + - Added Interface LicenseProfilesDeleteHeaders + - Added Interface LicenseProfilesDeleteOptionalParams + - Added Interface LicenseProfilesGetOptionalParams + - Added Interface LicenseProfilesListNextOptionalParams + - Added Interface LicenseProfilesListOptionalParams + - Added Interface LicenseProfilesListResult + - Added Interface LicenseProfileStorageModelEsuProperties + - Added Interface LicenseProfilesUpdateHeaders + - Added Interface LicenseProfilesUpdateOptionalParams + - Added Interface LicenseProfileUpdate + - Added Interface LicensesCreateOrUpdateOptionalParams + - Added Interface LicensesDeleteOptionalParams + - Added Interface LicensesGetOptionalParams + - Added Interface LicensesListByResourceGroupNextOptionalParams + - Added Interface LicensesListByResourceGroupOptionalParams + - Added Interface LicensesListBySubscriptionNextOptionalParams + - Added Interface LicensesListBySubscriptionOptionalParams + - Added Interface LicensesListResult + - Added Interface LicensesUpdateOptionalParams + - Added Interface LicensesValidateLicenseOptionalParams + - Added Interface LicenseUpdate + - Added Interface LinuxParameters - Added Interface Machine + - Added Interface MachineAssessPatchesResult - Added Interface MachineExtension + - Added Interface MachineExtensionsDeleteHeaders + - Added Interface MachineExtensionsUpdateHeaders - Added Interface MachineExtensionUpdate + - Added Interface MachineInstallPatchesParameters + - Added Interface MachineInstallPatchesResult + - Added Interface MachinesAssessPatchesHeaders + - Added Interface MachinesAssessPatchesOptionalParams + - Added Interface MachinesInstallPatchesHeaders + - Added Interface MachinesInstallPatchesOptionalParams - 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 Interface WindowsParameters + - Added Type Alias AgentConfigurationMode + - Added Type Alias AgentVersionGetResponse + - Added Type Alias AgentVersionListResponse + - Added Type Alias ArcKindEnum + - Added Type Alias AssessmentModeTypes + - Added Type Alias EsuEligibility + - Added Type Alias EsuKeyState + - Added Type Alias EsuServerType + - 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 LicenseAssignmentState + - Added Type Alias LicenseCoreType + - Added Type Alias LicenseEdition + - Added Type Alias LicenseProfilesCreateOrUpdateResponse + - Added Type Alias LicenseProfilesDeleteResponse + - Added Type Alias LicenseProfilesGetResponse + - Added Type Alias LicenseProfilesListNextResponse + - Added Type Alias LicenseProfilesListResponse + - Added Type Alias LicenseProfilesUpdateResponse + - Added Type Alias LicensesCreateOrUpdateResponse + - Added Type Alias LicensesGetResponse + - Added Type Alias LicensesListByResourceGroupNextResponse + - Added Type Alias LicensesListByResourceGroupResponse + - Added Type Alias LicensesListBySubscriptionNextResponse + - Added Type Alias LicensesListBySubscriptionResponse + - Added Type Alias LicenseState + - Added Type Alias LicensesUpdateResponse + - Added Type Alias LicensesValidateLicenseResponse + - Added Type Alias LicenseTarget + - Added Type Alias LicenseType + - Added Type Alias MachinesAssessPatchesResponse + - Added Type Alias MachinesInstallPatchesResponse + - Added Type Alias NetworkProfileGetResponse + - Added Type Alias OsType + - Added Type Alias PatchModeTypes + - Added Type Alias PatchOperationStartedBy + - Added Type Alias PatchOperationStatus + - Added Type Alias PatchServiceUsed + - Added Type Alias ProvisioningState + - Added Type Alias VMGuestPatchClassificationLinux + - Added Type Alias VMGuestPatchClassificationWindows + - Added Type Alias VMGuestPatchRebootSetting + - Added Type Alias VMGuestPatchRebootStatus - 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 MachineExtensionProperties has a new optional parameter enableAutomaticUpgrade + - Interface MachinesListByResourceGroupOptionalParams has a new optional parameter expand + - 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 KnownArcKindEnum + - Added Enum KnownAssessmentModeTypes + - Added Enum KnownEsuEligibility + - Added Enum KnownEsuKeyState + - Added Enum KnownEsuServerType + - Added Enum KnownLastAttemptStatusEnum + - Added Enum KnownLicenseAssignmentState + - Added Enum KnownLicenseCoreType + - Added Enum KnownLicenseEdition + - Added Enum KnownLicenseState + - Added Enum KnownLicenseTarget + - Added Enum KnownLicenseType + - Added Enum KnownOsType + - Added Enum KnownPatchModeTypes + - Added Enum KnownPatchOperationStartedBy + - Added Enum KnownPatchOperationStatus + - Added Enum KnownPatchServiceUsed + - Added Enum KnownProvisioningState + - Added Enum KnownVMGuestPatchClassificationLinux + - Added Enum KnownVMGuestPatchClassificationWindows + - Added Enum KnownVMGuestPatchRebootSetting + - Added Enum KnownVMGuestPatchRebootStatus + - Added function getContinuationToken + +**Breaking Changes** + + - Class HybridComputeManagementClient has a new signature + - Interface MachineExtensionsListNextOptionalParams no longer has parameter expand + - Type of parameter protectedSettings of interface MachineExtensionProperties is changed from Record to { + [propertyName: string]: any; + } + - Type of parameter settings of interface MachineExtensionProperties is changed from Record to { + [propertyName: string]: any; + } ## 3.0.0 (2022-01-18) @@ -42,4 +198,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/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..085cb78ece68 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": "25d228d308a2ede1ea03f0a3f61f95aba39d3d16", + "readme": "specification/hybridcompute/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", "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.2", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 2198aa80f7ef..fb1d6a3734f6 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -3,17 +3,17 @@ "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": ">=16.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@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", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,22 +29,30 @@ "types": "./types/arm-hybridcompute.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", - "typescript": "~5.2.0", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^2.1.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.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" @@ -64,20 +72,21 @@ "src/**/*.ts", "README.md", "LICENSE", + "rollup.config.js", "tsconfig.json", "review/*", "CHANGELOG.md", "types/*" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "prepack": "npm run build", "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,12 +114,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..e3945cf0ee07 100644 --- a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -6,9 +6,98 @@ 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 ArcKindEnum = string; + +// @public +export type AssessmentModeTypes = string; + +// @public +export interface AvailablePatchCountByClassification { + readonly critical?: number; + readonly definition?: number; + readonly featurePack?: number; + readonly other?: number; + readonly security?: number; + readonly servicePack?: number; + readonly tools?: number; + readonly updateRollup?: number; + readonly updates?: number; +} + +// @public +export interface CloudMetadata { + readonly provider?: string; +} + +// @public +export interface ConfigurationExtension { + readonly publisher?: string; + readonly type?: string; +} // @public (undocumented) export interface ConnectionDetail { @@ -37,16 +126,77 @@ 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 type EsuEligibility = string; + +// @public +export interface EsuKey { + licenseStatus?: string; + sku?: string; +} + +// @public +export type EsuKeyState = string; + +// @public +export type EsuServerType = string; + +// @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; @@ -55,15 +205,28 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridComputeManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, 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) + licenseProfiles: LicenseProfiles; + // (undocumented) + licenses: Licenses; + // (undocumented) machineExtensions: MachineExtensions; // (undocumented) machines: Machines; // (undocumented) + networkProfileOperations: NetworkProfileOperations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -72,7 +235,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // (undocumented) privateLinkScopes: PrivateLinkScopes; // (undocumented) - subscriptionId: string; + subscriptionId?: string; } // @public @@ -82,6 +245,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 +272,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 +322,36 @@ 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 KnownArcKindEnum { + AVS = "AVS", + AWS = "AWS", + EPS = "EPS", + GCP = "GCP", + HCI = "HCI", + Scvmm = "SCVMM", + VMware = "VMware" +} + +// @public +export enum KnownAssessmentModeTypes { + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -120,11 +360,122 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownEsuEligibility { + Eligible = "Eligible", + Ineligible = "Ineligible", + Unknown = "Unknown" +} + +// @public +export enum KnownEsuKeyState { + Active = "Active", + Inactive = "Inactive" +} + +// @public +export enum KnownEsuServerType { + Datacenter = "Datacenter", + Standard = "Standard" +} + // @public export enum KnownInstanceViewTypes { InstanceView = "instanceView" } +// @public +export enum KnownLastAttemptStatusEnum { + Failed = "Failed", + Success = "Success" +} + +// @public +export enum KnownLicenseAssignmentState { + Assigned = "Assigned", + NotAssigned = "NotAssigned" +} + +// @public +export enum KnownLicenseCoreType { + PCore = "pCore", + VCore = "vCore" +} + +// @public +export enum KnownLicenseEdition { + Datacenter = "Datacenter", + Standard = "Standard" +} + +// @public +export enum KnownLicenseState { + Activated = "Activated", + Deactivated = "Deactivated" +} + +// @public +export enum KnownLicenseTarget { + WindowsServer2012 = "Windows Server 2012", + WindowsServer2012R2 = "Windows Server 2012 R2" +} + +// @public +export enum KnownLicenseType { + ESU = "ESU" +} + +// @public +export enum KnownOsType { + Linux = "Linux", + Windows = "Windows" +} + +// @public +export enum KnownPatchModeTypes { + AutomaticByOS = "AutomaticByOS", + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault", + Manual = "Manual" +} + +// @public +export enum KnownPatchOperationStartedBy { + Platform = "Platform", + User = "User" +} + +// @public +export enum KnownPatchOperationStatus { + CompletedWithWarnings = "CompletedWithWarnings", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded", + Unknown = "Unknown" +} + +// @public +export enum KnownPatchServiceUsed { + APT = "APT", + Unknown = "Unknown", + WU = "WU", + WUWsus = "WU_WSUS", + YUM = "YUM", + Zypper = "Zypper" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleted = "Deleted", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -145,6 +496,320 @@ export enum KnownStatusTypes { Error = "Error" } +// @public +export enum KnownVMGuestPatchClassificationLinux { + Critical = "Critical", + Other = "Other", + Security = "Security" +} + +// @public +export enum KnownVMGuestPatchClassificationWindows { + Critical = "Critical", + Definition = "Definition", + FeaturePack = "FeaturePack", + Security = "Security", + ServicePack = "ServicePack", + Tools = "Tools", + UpdateRollUp = "UpdateRollUp", + Updates = "Updates" +} + +// @public +export enum KnownVMGuestPatchRebootSetting { + Always = "Always", + IfRequired = "IfRequired", + Never = "Never" +} + +// @public +export enum KnownVMGuestPatchRebootStatus { + Completed = "Completed", + Failed = "Failed", + NotNeeded = "NotNeeded", + Required = "Required", + Started = "Started", + Unknown = "Unknown" +} + +// @public +export type LastAttemptStatusEnum = string; + +// @public +export interface License extends TrackedResource { + licenseDetails?: LicenseDetails; + licenseType?: LicenseType; + readonly provisioningState?: ProvisioningState; + tenantId?: string; +} + +// @public +export type LicenseAssignmentState = string; + +// @public +export type LicenseCoreType = string; + +// @public +export interface LicenseDetails { + readonly assignedLicenses?: number; + edition?: LicenseEdition; + readonly immutableId?: string; + processors?: number; + state?: LicenseState; + target?: LicenseTarget; + type?: LicenseCoreType; +} + +// @public +export type LicenseEdition = string; + +// @public +export interface LicenseProfile extends TrackedResource { + assignedLicense?: string; + readonly assignedLicenseImmutableId?: string; + readonly esuEligibility?: EsuEligibility; + readonly esuKeys?: EsuKey[]; + readonly esuKeyState?: EsuKeyState; + readonly provisioningState?: ProvisioningState; + readonly serverType?: EsuServerType; +} + +// @public +export interface LicenseProfileArmEsuProperties extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { + assignedLicense?: string; +} + +// @public +export interface LicenseProfileArmEsuPropertiesWithoutAssignedLicense extends LicenseProfileStorageModelEsuProperties { + readonly esuEligibility?: EsuEligibility; + readonly esuKeyState?: EsuKeyState; + readonly serverType?: EsuServerType; +} + +// @public +export interface LicenseProfileMachineInstanceView { + esuProfile?: LicenseProfileMachineInstanceViewEsuProperties; +} + +// @public +export interface LicenseProfileMachineInstanceViewEsuProperties extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { + assignedLicense?: License; + licenseAssignmentState?: LicenseAssignmentState; +} + +// @public +export interface LicenseProfiles { + beginCreateOrUpdate(resourceGroupName: string, machineName: string, parameters: LicenseProfile, options?: LicenseProfilesCreateOrUpdateOptionalParams): Promise, LicenseProfilesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, machineName: string, parameters: LicenseProfile, options?: LicenseProfilesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, machineName: string, options?: LicenseProfilesDeleteOptionalParams): Promise, LicenseProfilesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, machineName: string, options?: LicenseProfilesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, machineName: string, parameters: LicenseProfileUpdate, options?: LicenseProfilesUpdateOptionalParams): Promise, LicenseProfilesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, machineName: string, parameters: LicenseProfileUpdate, options?: LicenseProfilesUpdateOptionalParams): Promise; + get(resourceGroupName: string, machineName: string, options?: LicenseProfilesGetOptionalParams): Promise; + list(resourceGroupName: string, machineName: string, options?: LicenseProfilesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LicenseProfilesCreateOrUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface LicenseProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LicenseProfilesCreateOrUpdateResponse = LicenseProfile; + +// @public +export interface LicenseProfilesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface LicenseProfilesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LicenseProfilesDeleteResponse = LicenseProfilesDeleteHeaders; + +// @public +export interface LicenseProfilesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicenseProfilesGetResponse = LicenseProfile; + +// @public +export interface LicenseProfilesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicenseProfilesListNextResponse = LicenseProfilesListResult; + +// @public +export interface LicenseProfilesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicenseProfilesListResponse = LicenseProfilesListResult; + +// @public +export interface LicenseProfilesListResult { + nextLink?: string; + value: LicenseProfile[]; +} + +// @public +export interface LicenseProfileStorageModelEsuProperties { + readonly assignedLicenseImmutableId?: string; + readonly esuKeys?: EsuKey[]; +} + +// @public +export interface LicenseProfilesUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface LicenseProfilesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LicenseProfilesUpdateResponse = LicenseProfile; + +// @public +export interface LicenseProfileUpdate extends ResourceUpdate { + assignedLicense?: string; +} + +// @public +export interface Licenses { + beginCreateOrUpdate(resourceGroupName: string, licenseName: string, parameters: License, options?: LicensesCreateOrUpdateOptionalParams): Promise, LicensesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, licenseName: string, parameters: License, options?: LicensesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, licenseName: string, options?: LicensesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, licenseName: string, options?: LicensesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, licenseName: string, parameters: LicenseUpdate, options?: LicensesUpdateOptionalParams): Promise, LicensesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, licenseName: string, parameters: LicenseUpdate, options?: LicensesUpdateOptionalParams): Promise; + beginValidateLicense(parameters: License, options?: LicensesValidateLicenseOptionalParams): Promise, LicensesValidateLicenseResponse>>; + beginValidateLicenseAndWait(parameters: License, options?: LicensesValidateLicenseOptionalParams): Promise; + get(resourceGroupName: string, licenseName: string, options?: LicensesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: LicensesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: LicensesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LicensesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LicensesCreateOrUpdateResponse = License; + +// @public +export interface LicensesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface LicensesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicensesGetResponse = License; + +// @public +export interface LicensesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicensesListByResourceGroupNextResponse = LicensesListResult; + +// @public +export interface LicensesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicensesListByResourceGroupResponse = LicensesListResult; + +// @public +export interface LicensesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicensesListBySubscriptionNextResponse = LicensesListResult; + +// @public +export interface LicensesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LicensesListBySubscriptionResponse = LicensesListResult; + +// @public +export interface LicensesListResult { + nextLink?: string; + value: License[]; +} + +// @public +export type LicenseState = string; + +// @public +export interface LicensesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LicensesUpdateResponse = License; + +// @public +export interface LicensesValidateLicenseOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LicensesValidateLicenseResponse = License; + +// @public +export type LicenseTarget = string; + +// @public +export type LicenseType = string; + +// @public +export interface LicenseUpdate extends ResourceUpdate { + edition?: LicenseEdition; + licenseType?: LicenseType; + processors?: number; + state?: LicenseState; + target?: LicenseTarget; + type?: LicenseCoreType; +} + +// @public +export interface LinuxParameters { + classificationsToInclude?: VMGuestPatchClassificationLinux[]; + packageNameMasksToExclude?: string[]; + packageNameMasksToInclude?: string[]; +} + // @public export interface LocationData { city?: string; @@ -155,15 +820,60 @@ 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?: ArcKindEnum; + readonly lastStatusChange?: Date; + licenseProfile?: LicenseProfileMachineInstanceView; + 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 MachineAssessPatchesResult { + readonly assessmentActivityId?: string; + availablePatchCountByClassification?: AvailablePatchCountByClassification; + readonly errorDetails?: ErrorDetail; + readonly lastModifiedDateTime?: Date; + readonly osType?: OsType; + readonly patchServiceUsed?: PatchServiceUsed; + readonly rebootPending?: boolean; + readonly startDateTime?: Date; + readonly startedBy?: PatchOperationStartedBy; + readonly status?: PatchOperationStatus; } // @public export interface MachineExtension extends TrackedResource { properties?: MachineExtensionProperties; - readonly systemData?: SystemData; } // @public @@ -186,23 +896,28 @@ export interface MachineExtensionInstanceViewStatus { // @public export interface MachineExtensionProperties { autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; instanceView?: MachineExtensionInstanceView; - protectedSettings?: Record; + protectedSettings?: { + [propertyName: string]: any; + }; readonly provisioningState?: string; publisher?: string; - settings?: Record; + settings?: { + [propertyName: string]: any; + }; 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 +932,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 +954,6 @@ export type MachineExtensionsGetResponse = MachineExtension; // @public export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -252,6 +973,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 +991,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; } @@ -285,49 +1013,64 @@ export interface MachineExtensionUpgrade { } // @public -export interface MachineListResult { - nextLink?: string; - value: Machine[]; +export interface MachineInstallPatchesParameters { + linuxParameters?: LinuxParameters; + maximumDuration: string; + rebootSetting: VMGuestPatchRebootSetting; + windowsParameters?: WindowsParameters; } // @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; +export interface MachineInstallPatchesResult { + readonly errorDetails?: ErrorDetail; + readonly excludedPatchCount?: number; + readonly failedPatchCount?: number; + readonly installationActivityId?: string; + readonly installedPatchCount?: number; + readonly lastModifiedDateTime?: Date; + readonly maintenanceWindowExceeded?: boolean; + readonly notSelectedPatchCount?: number; + readonly osType?: OsType; + readonly patchServiceUsed?: PatchServiceUsed; + readonly pendingPatchCount?: number; + readonly rebootStatus?: VMGuestPatchRebootStatus; + readonly startDateTime?: Date; + readonly startedBy?: PatchOperationStartedBy; + readonly status?: PatchOperationStatus; +} + +// @public +export interface MachineListResult { + nextLink?: string; + value: Machine[]; } // @public export interface Machines { + beginAssessPatches(resourceGroupName: string, name: string, options?: MachinesAssessPatchesOptionalParams): Promise, MachinesAssessPatchesResponse>>; + beginAssessPatchesAndWait(resourceGroupName: string, name: string, options?: MachinesAssessPatchesOptionalParams): Promise; + beginInstallPatches(resourceGroupName: string, name: string, installPatchesInput: MachineInstallPatchesParameters, options?: MachinesInstallPatchesOptionalParams): Promise, MachinesInstallPatchesResponse>>; + beginInstallPatchesAndWait(resourceGroupName: string, name: string, installPatchesInput: MachineInstallPatchesParameters, options?: MachinesInstallPatchesOptionalParams): Promise; delete(resourceGroupName: string, machineName: string, options?: MachinesDeleteOptionalParams): Promise; get(resourceGroupName: string, machineName: string, options?: MachinesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: MachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: MachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface MachinesAssessPatchesHeaders { + location?: string; +} + +// @public +export interface MachinesAssessPatchesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachinesAssessPatchesResponse = MachineAssessPatchesResult; + // @public export interface MachinesDeleteOptionalParams extends coreClient.OperationOptions { } @@ -340,6 +1083,20 @@ export interface MachinesGetOptionalParams extends coreClient.OperationOptions { // @public export type MachinesGetResponse = Machine; +// @public +export interface MachinesInstallPatchesHeaders { + location?: string; +} + +// @public +export interface MachinesInstallPatchesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachinesInstallPatchesResponse = MachineInstallPatchesResult; + // @public export interface MachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } @@ -349,6 +1106,7 @@ export type MachinesListByResourceGroupNextResponse = MachineListResult; // @public export interface MachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { + expand?: string; } // @public @@ -370,18 +1128,38 @@ export type MachinesListBySubscriptionResponse = MachineListResult; // @public export interface MachineUpdate extends ResourceUpdate { + agentUpgrade?: AgentUpgrade; + cloudMetadata?: CloudMetadata; identity?: Identity; - properties?: MachineUpdateProperties; -} - -// @public -export interface MachineUpdateProperties { + kind?: ArcKindEnum; 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 +1180,7 @@ export type OperationsListResponse = OperationListResult; // @public export interface OperationValue { display?: OperationValueDisplay; + readonly isDataAction?: boolean; readonly name?: string; readonly origin?: string; } @@ -423,18 +1202,34 @@ 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 OsType = string; + +// @public +export type PatchModeTypes = string; + +// @public +export type PatchOperationStartedBy = string; + +// @public +export type PatchOperationStatus = string; + +// @public +export type PatchServiceUsed = string; + // @public export interface PrivateEndpointConnection extends ProxyResource { properties?: PrivateEndpointConnectionProperties; - readonly systemData?: SystemData; } // @public @@ -453,6 +1248,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: string; @@ -460,9 +1256,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 +1273,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 +1315,6 @@ export interface PrivateEndpointProperty { // @public export interface PrivateLinkResource extends ProxyResource { properties?: PrivateLinkResourceProperties; - readonly systemData?: SystemData; } // @public @@ -557,7 +1359,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 +1377,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; @@ -662,6 +1471,9 @@ export interface PrivateLinkServiceConnectionStateProperty { status: string; } +// @public +export type ProvisioningState = string; + // @public export interface ProxyResource extends Resource { } @@ -673,6 +1485,7 @@ export type PublicNetworkAccessType = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -683,12 +1496,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; @@ -720,6 +1550,27 @@ export interface UpgradeExtensionsOptionalParams extends coreClient.OperationOpt updateIntervalInMs?: number; } +// @public +export type VMGuestPatchClassificationLinux = string; + +// @public +export type VMGuestPatchClassificationWindows = string; + +// @public +export type VMGuestPatchRebootSetting = string; + +// @public +export type VMGuestPatchRebootStatus = string; + +// @public +export interface WindowsParameters { + classificationsToInclude?: VMGuestPatchClassificationWindows[]; + excludeKbsRequiringReboot?: boolean; + kbNumbersToExclude?: string[]; + kbNumbersToInclude?: string[]; + maxPatchPublishDate?: Date; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/hybridcompute/arm-hybridcompute/rollup.config.js b/sdk/hybridcompute/arm-hybridcompute/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/rollup.config.js @@ -0,0 +1,122 @@ +/* + * 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 nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index e4aba1055e13..3ebfd5a96a69 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -14,20 +14,36 @@ 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 { + LicensesImpl, MachinesImpl, + LicenseProfilesImpl, MachineExtensionsImpl, + ExtensionMetadataImpl, OperationsImpl, + NetworkProfileOperationsImpl, + HybridIdentityMetadataOperationsImpl, + AgentVersionOperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl } from "./operations"; import { + Licenses, Machines, + LicenseProfiles, MachineExtensions, + ExtensionMetadata, Operations, + NetworkProfileOperations, + HybridIdentityMetadataOperations, + AgentVersionOperations, PrivateLinkScopes, PrivateLinkResources, PrivateEndpointConnections @@ -43,7 +59,7 @@ import { export class HybridComputeManagementClient extends coreClient.ServiceClient { $host: string; apiVersion: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the HybridComputeManagementClient class. @@ -55,12 +71,28 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridComputeManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: HybridComputeManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: + | HybridComputeManagementClientOptionalParams + | string, + options?: HybridComputeManagementClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -72,7 +104,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 +157,18 @@ 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-06-20-preview"; + this.licenses = new LicensesImpl(this); this.machines = new MachinesImpl(this); + this.licenseProfiles = new LicenseProfilesImpl(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 +215,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 +255,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(); @@ -250,9 +295,15 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { return poller.pollUntilDone(); } + licenses: Licenses; machines: Machines; + licenseProfiles: LicenseProfiles; machineExtensions: MachineExtensions; + extensionMetadata: ExtensionMetadata; operations: Operations; + networkProfileOperations: NetworkProfileOperations; + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + agentVersionOperations: AgentVersionOperations; privateLinkScopes: PrivateLinkScopes; privateLinkResources: PrivateLinkResources; privateEndpointConnections: PrivateEndpointConnections; @@ -281,7 +332,7 @@ const upgradeExtensionsOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.machineName ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; 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..ba2fe68d9bd1 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -8,6 +8,70 @@ import * as coreClient from "@azure/core-client"; +/** Describes the properties of a License. */ +export interface LicenseDetails { + /** Describes the state of the license. */ + state?: LicenseState; + /** Describes the license target server. */ + target?: LicenseTarget; + /** Describes the edition of the license. The values are either Standard or Datacenter. */ + edition?: LicenseEdition; + /** Describes the license core type (pCore or vCore). */ + type?: LicenseCoreType; + /** Describes the number of processors. */ + processors?: number; + /** + * Describes the number of assigned licenses. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly assignedLicenses?: number; + /** + * Describes the immutable id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly immutableId?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ export interface ErrorResponse { /** The error object. */ @@ -57,113 +121,143 @@ 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; +/** The Update Resource model definition. */ +export interface ResourceUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** The List license operation response. */ +export interface LicensesListResult { + /** The list of licenses. */ + value: License[]; + /** The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license profile. */ + nextLink?: 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; +} + +/** 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 +276,45 @@ 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; +} + +/** License Profile Instance View in Machine Properties. */ +export interface LicenseProfileMachineInstanceView { + /** Properties for the Machine ESU profile. */ + esuProfile?: LicenseProfileMachineInstanceViewEsuProperties; +} + +/** License profile storage model for ESU properties. */ +export interface LicenseProfileStorageModelEsuProperties { + /** + * The guid id of the license. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly assignedLicenseImmutableId?: string; + /** + * The list of ESU keys. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esuKeys?: EsuKey[]; +} + +/** ESU key */ +export interface EsuKey { + /** SKU number. */ + sku?: string; + /** The current status of the license profile key. */ + licenseStatus?: string; } /** Describes the Machine Extension Instance View. */ @@ -217,63 +343,35 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -/** Identity for the resource. */ -export interface Identity { - /** - * The principal ID of resource identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The identity type. */ - type?: "SystemAssigned"; +/** Describes the network information on this machine. */ +export interface NetworkProfile { + /** The list of network interfaces. */ + networkInterfaces?: NetworkInterface[]; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; +/** Describes a network interface. */ +export interface NetworkInterface { + /** The list of IP addresses in this interface. */ + ipAddresses?: IpAddress[]; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; +/** Describes properties of the IP address. */ +export interface IpAddress { + /** Represents the IP Address. */ + address?: string; + /** Represents the Ip Address Version. */ + ipAddressVersion?: string; /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * The subnet to which this IP address belongs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly subnet?: Subnet; } -/** The List hybrid machine operation response. */ -export interface MachineListResult { - /** The list of hybrid machines. */ - value: Machine[]; - /** The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid machines. */ - nextLink?: string; +/** Describes the subnet. */ +export interface Subnet { + /** Represents address prefix. */ + addressPrefix?: string; } /** Describes the properties of a Machine Extension. */ @@ -286,12 +384,14 @@ export interface MachineExtensionProperties { 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?: Record; + settings?: { [propertyName: string]: any }; /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; + 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. @@ -301,61 +401,293 @@ export interface MachineExtensionProperties { 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 */ - tags?: { [propertyName: string]: string }; +/** Identity for the resource. */ +export interface Identity { + /** + * The principal ID of resource identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; } -/** Describes the Machine Extensions List Result. */ -export interface MachineExtensionsListResult { - /** The list of extensions */ - value?: MachineExtension[]; - /** The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. */ +/** The List hybrid machine license profile operation response. */ +export interface LicenseProfilesListResult { + /** The list of license profiles. */ + value: LicenseProfile[]; + /** The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license profile. */ nextLink?: string; } -/** Describes the Machine Extension Upgrade Properties */ -export interface MachineExtensionUpgrade { - /** Describes the Extension Target Properties. */ - extensionTargets?: { [propertyName: string]: ExtensionTargetProperties }; -} - -/** Describes the Machine Extension Target Version Properties */ -export interface ExtensionTargetProperties { - /** Properties for the specified Extension to Upgrade. */ - targetVersion?: string; -} - -/** The List Compute Operation operation response. */ -export interface OperationListResult { +/** Describes the properties of an AssessPatches result. */ +export interface MachineAssessPatchesResult { /** - * The list of compute operations + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: OperationValue[]; -} - -/** Describes the properties of a Compute Operation value. */ -export interface OperationValue { + readonly status?: PatchOperationStatus; + /** + * The activity ID of the operation that produced this result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly assessmentActivityId?: string; + /** + * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rebootPending?: boolean; + /** Summarization of patches available for installation on the machine by classification. */ + availablePatchCountByClassification?: AvailablePatchCountByClassification; + /** + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startDateTime?: Date; + /** + * The UTC timestamp when the operation finished. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedDateTime?: Date; + /** + * Indicates if operation was triggered by user or by platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startedBy?: PatchOperationStartedBy; + /** + * Specifies the patch service used for the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchServiceUsed?: PatchServiceUsed; + /** + * The operating system type of the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osType?: OsType; + /** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorDetails?: ErrorDetail; +} + +/** Summarization of patches available for installation on the machine by classification. */ +export interface AvailablePatchCountByClassification { + /** + * Number of security patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly security?: number; + /** + * Number of critical patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly critical?: number; + /** + * Number of definition patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly definition?: number; + /** + * Number of update Rollup patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updateRollup?: number; + /** + * Number of feature pack patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly featurePack?: number; + /** + * Number of service pack patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly servicePack?: number; + /** + * Number of tools patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tools?: number; + /** + * Number of updates category patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updates?: number; + /** + * Number of other patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly other?: number; +} + +/** Input for InstallPatches as directly received by the API */ +export interface MachineInstallPatchesParameters { + /** Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) */ + maximumDuration: string; + /** Defines when it is acceptable to reboot a VM during a software update operation. */ + rebootSetting: VMGuestPatchRebootSetting; + /** Input for InstallPatches on a Windows VM, as directly received by the API */ + windowsParameters?: WindowsParameters; + /** Input for InstallPatches on a Linux VM, as directly received by the API */ + linuxParameters?: LinuxParameters; +} + +/** Input for InstallPatches on a Windows VM, as directly received by the API */ +export interface WindowsParameters { + /** The update classifications to select when installing patches for Windows. */ + classificationsToInclude?: VMGuestPatchClassificationWindows[]; + /** Kbs to include in the patch operation */ + kbNumbersToInclude?: string[]; + /** Kbs to exclude in the patch operation */ + kbNumbersToExclude?: string[]; + /** Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. */ + excludeKbsRequiringReboot?: boolean; + /** This is used to install patches that were published on or before this given max published date. */ + maxPatchPublishDate?: Date; +} + +/** Input for InstallPatches on a Linux VM, as directly received by the API */ +export interface LinuxParameters { + /** The update classifications to select when installing patches for Linux. */ + classificationsToInclude?: VMGuestPatchClassificationLinux[]; + /** packages to include in the patch operation. Format: packageName_packageVersion */ + packageNameMasksToInclude?: string[]; + /** packages to exclude in the patch operation. Format: packageName_packageVersion */ + packageNameMasksToExclude?: string[]; +} + +/** The result summary of an installation operation. */ +export interface MachineInstallPatchesResult { + /** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: PatchOperationStatus; + /** + * The activity ID of the operation that produced this result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly installationActivityId?: string; + /** + * The reboot state of the VM following completion of the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rebootStatus?: VMGuestPatchRebootStatus; + /** + * Whether the operation ran out of time before it completed all its intended actions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maintenanceWindowExceeded?: boolean; + /** + * The number of patches that were not installed due to the user blocking their installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly excludedPatchCount?: number; + /** + * The number of patches that were detected as available for install, but did not meet the operation's criteria. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly notSelectedPatchCount?: number; + /** + * The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly pendingPatchCount?: number; + /** + * The number of patches successfully installed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly installedPatchCount?: number; + /** + * The number of patches that could not be installed due to some issue. See errors for details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly failedPatchCount?: number; + /** + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startDateTime?: Date; + /** + * The UTC timestamp when the operation finished. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedDateTime?: Date; + /** + * Indicates if operation was triggered by user or by platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startedBy?: PatchOperationStartedBy; + /** + * Specifies the patch service used for the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchServiceUsed?: PatchServiceUsed; + /** + * The operating system type of the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osType?: OsType; + /** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorDetails?: ErrorDetail; +} + +/** The List hybrid machine operation response. */ +export interface MachineListResult { + /** The list of hybrid machines. */ + value: Machine[]; + /** The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid machines. */ + nextLink?: string; +} + +/** Describes the Machine Extensions List Result. */ +export interface MachineExtensionsListResult { + /** The list of extensions */ + value?: MachineExtension[]; + /** The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. */ + nextLink?: string; +} + +/** Describes the Machine Extension Upgrade Properties. */ +export interface MachineExtensionUpgrade { + /** Describes the Extension Target Properties. */ + extensionTargets?: { [propertyName: string]: ExtensionTargetProperties }; +} + +/** Describes the Machine Extension Target Version Properties */ +export interface ExtensionTargetProperties { + /** Properties for the specified Extension to Upgrade. */ + 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 { + /** + * The list of compute operations + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: OperationValue[]; +} + +/** Describes the properties of a Compute Operation value. */ +export interface OperationValue { /** * The origin of the compute operation. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -368,6 +700,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 +731,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 +853,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 +995,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. */ @@ -615,18 +1006,86 @@ export interface TrackedResource extends Resource { /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} +/** Describes a License Update. */ +export interface LicenseUpdate extends ResourceUpdate { + /** The type of the license resource. */ + licenseType?: LicenseType; + /** Describes the state of the license. */ + state?: LicenseState; + /** Describes the license target server. */ + target?: LicenseTarget; + /** Describes the edition of the license. The values are either Standard or Datacenter. */ + edition?: LicenseEdition; + /** Describes the license core type (pCore or vCore). */ + type?: LicenseCoreType; + /** Describes the number of processors. */ + processors?: number; +} + +/** Describes a License Profile Update. */ +export interface LicenseProfileUpdate extends ResourceUpdate { + /** The resource id of the license. */ + assignedLicense?: string; +} + /** 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 Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. */ + kind?: ArcKindEnum; + /** 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; +} + +/** Describes the properties of a License Profile ARM model. */ +export interface LicenseProfileArmEsuPropertiesWithoutAssignedLicense + extends LicenseProfileStorageModelEsuProperties { + /** + * The type of the Esu servers. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverType?: EsuServerType; + /** + * Indicates the eligibility state of Esu. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esuEligibility?: EsuEligibility; + /** + * Indicates whether there is an ESU Key currently active for the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esuKeyState?: EsuKeyState; } /** An Azure Arc PrivateLinkScope definition. */ @@ -641,66 +1100,653 @@ export interface HybridComputePrivateLinkScope readonly systemData?: SystemData; } -/** Describes a hybrid machine. */ -export interface Machine extends TrackedResource { - /** Hybrid Compute Machine properties */ - properties?: MachineProperties; - /** Identity for the resource. */ - identity?: Identity; +/** Describes a license in a hybrid machine. */ +export interface License extends TrackedResource { /** - * The system meta data relating to this resource. + * 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 systemData?: SystemData; + readonly provisioningState?: ProvisioningState; + /** Describes the tenant id. */ + tenantId?: string; + /** The type of the license resource. */ + licenseType?: LicenseType; + /** Describes the properties of a License. */ + licenseDetails?: LicenseDetails; } /** Describes a Machine Extension. */ export interface MachineExtension extends TrackedResource { /** Describes Machine Extension Properties. */ properties?: MachineExtensionProperties; +} + +/** Describes a hybrid machine. */ +export interface Machine extends TrackedResource { /** - * The system meta data relating to this resource. + * The list of extensions affiliated to the machine * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; -} + readonly resources?: MachineExtension[]; + /** Identity for the resource. */ + identity?: Identity; + /** Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. */ + kind?: ArcKindEnum; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; + /** + * 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 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; + /** Specifies the ESU related properties for a machine. */ + licenseProfile?: LicenseProfileMachineInstanceView; + /** + * 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 license profile in a hybrid machine. */ +export interface LicenseProfile extends TrackedResource { + /** + * 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?: ProvisioningState; + /** + * The guid id of the license. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly assignedLicenseImmutableId?: string; + /** + * The list of ESU keys. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esuKeys?: EsuKey[]; + /** + * The type of the Esu servers. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverType?: EsuServerType; + /** + * Indicates the eligibility state of Esu. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esuEligibility?: EsuEligibility; + /** + * Indicates whether there is an ESU Key currently active for the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esuKeyState?: EsuKeyState; + /** The resource id of the license. */ + assignedLicense?: string; +} + +/** Describes a Extension Metadata */ +export interface ExtensionValue extends ProxyResource { + /** + * The version of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + 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; } -/** Known values of {@link InstanceViewTypes} that the service accepts. */ -export enum KnownInstanceViewTypes { - /** InstanceView */ - InstanceView = "instanceView" +/** Properties for the Machine ESU profile. */ +export interface LicenseProfileMachineInstanceViewEsuProperties + extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { + /** The assigned license resource. */ + assignedLicense?: License; + /** Describes the license assignment state (Assigned or NotAssigned). */ + licenseAssignmentState?: LicenseAssignmentState; +} + +/** Describes the properties of a License Profile ARM model. */ +export interface LicenseProfileArmEsuProperties + extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { + /** The resource id of the license. */ + assignedLicense?: string; +} + +/** Defines headers for Machines_assessPatches operation. */ +export interface MachinesAssessPatchesHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for Machines_installPatches operation. */ +export interface MachinesInstallPatchesHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for LicenseProfiles_createOrUpdate operation. */ +export interface LicenseProfilesCreateOrUpdateHeaders { + /** 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 LicenseProfiles_update operation. */ +export interface LicenseProfilesUpdateHeaders { + /** 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 LicenseProfiles_delete operation. */ +export interface LicenseProfilesDeleteHeaders { + /** 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_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 ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Accepted */ + Accepted = "Accepted", + /** Canceled */ + Canceled = "Canceled", + /** Deleted */ + Deleted = "Deleted" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Succeeded** \ + * **Failed** \ + * **Accepted** \ + * **Canceled** \ + * **Deleted** + */ +export type ProvisioningState = string; + +/** Known values of {@link LicenseType} that the service accepts. */ +export enum KnownLicenseType { + /** ESU */ + ESU = "ESU" +} + +/** + * Defines values for LicenseType. \ + * {@link KnownLicenseType} can be used interchangeably with LicenseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ESU** + */ +export type LicenseType = string; + +/** Known values of {@link LicenseState} that the service accepts. */ +export enum KnownLicenseState { + /** Activated */ + Activated = "Activated", + /** Deactivated */ + Deactivated = "Deactivated" +} + +/** + * Defines values for LicenseState. \ + * {@link KnownLicenseState} can be used interchangeably with LicenseState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Activated** \ + * **Deactivated** + */ +export type LicenseState = string; + +/** Known values of {@link LicenseTarget} that the service accepts. */ +export enum KnownLicenseTarget { + /** WindowsServer2012 */ + WindowsServer2012 = "Windows Server 2012", + /** WindowsServer2012R2 */ + WindowsServer2012R2 = "Windows Server 2012 R2" +} + +/** + * Defines values for LicenseTarget. \ + * {@link KnownLicenseTarget} can be used interchangeably with LicenseTarget, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Windows Server 2012** \ + * **Windows Server 2012 R2** + */ +export type LicenseTarget = string; + +/** Known values of {@link LicenseEdition} that the service accepts. */ +export enum KnownLicenseEdition { + /** Standard */ + Standard = "Standard", + /** Datacenter */ + Datacenter = "Datacenter" +} + +/** + * Defines values for LicenseEdition. \ + * {@link KnownLicenseEdition} can be used interchangeably with LicenseEdition, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard** \ + * **Datacenter** + */ +export type LicenseEdition = string; + +/** Known values of {@link LicenseCoreType} that the service accepts. */ +export enum KnownLicenseCoreType { + /** PCore */ + PCore = "pCore", + /** VCore */ + VCore = "vCore" +} + +/** + * Defines values for LicenseCoreType. \ + * {@link KnownLicenseCoreType} can be used interchangeably with LicenseCoreType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **pCore** \ + * **vCore** + */ +export type LicenseCoreType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link InstanceViewTypes} that the service accepts. */ +export enum KnownInstanceViewTypes { + /** InstanceView */ + InstanceView = "instanceView" +} + +/** + * Defines values for InstanceViewTypes. \ + * {@link KnownInstanceViewTypes} can be used interchangeably with InstanceViewTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **instanceView** + */ +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 LicenseAssignmentState} that the service accepts. */ +export enum KnownLicenseAssignmentState { + /** Assigned */ + Assigned = "Assigned", + /** NotAssigned */ + NotAssigned = "NotAssigned" +} + +/** + * Defines values for LicenseAssignmentState. \ + * {@link KnownLicenseAssignmentState} can be used interchangeably with LicenseAssignmentState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Assigned** \ + * **NotAssigned** + */ +export type LicenseAssignmentState = string; + +/** Known values of {@link EsuServerType} that the service accepts. */ +export enum KnownEsuServerType { + /** Standard */ + Standard = "Standard", + /** Datacenter */ + Datacenter = "Datacenter" +} + +/** + * Defines values for EsuServerType. \ + * {@link KnownEsuServerType} can be used interchangeably with EsuServerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard** \ + * **Datacenter** + */ +export type EsuServerType = string; + +/** Known values of {@link EsuEligibility} that the service accepts. */ +export enum KnownEsuEligibility { + /** Eligible */ + Eligible = "Eligible", + /** Ineligible */ + Ineligible = "Ineligible", + /** Unknown */ + Unknown = "Unknown" } /** - * Defines values for InstanceViewTypes. \ - * {@link KnownInstanceViewTypes} can be used interchangeably with InstanceViewTypes, + * Defines values for EsuEligibility. \ + * {@link KnownEsuEligibility} can be used interchangeably with EsuEligibility, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **instanceView** + * **Eligible** \ + * **Ineligible** \ + * **Unknown** */ -export type InstanceViewTypes = string; +export type EsuEligibility = string; + +/** Known values of {@link EsuKeyState} that the service accepts. */ +export enum KnownEsuKeyState { + /** Inactive */ + Inactive = "Inactive", + /** Active */ + Active = "Active" +} + +/** + * Defines values for EsuKeyState. \ + * {@link KnownEsuKeyState} can be used interchangeably with EsuKeyState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inactive** \ + * **Active** + */ +export type EsuKeyState = string; /** Known values of {@link StatusTypes} that the service accepts. */ export enum KnownStatusTypes { @@ -744,29 +1790,239 @@ export enum KnownStatusLevelTypes { */ export type StatusLevelTypes = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { +/** Known values of {@link ArcKindEnum} that the service accepts. */ +export enum KnownArcKindEnum { + /** AVS */ + AVS = "AVS", + /** HCI */ + HCI = "HCI", + /** Scvmm */ + Scvmm = "SCVMM", + /** VMware */ + VMware = "VMware", + /** EPS */ + EPS = "EPS", + /** GCP */ + GCP = "GCP", + /** AWS */ + AWS = "AWS" +} + +/** + * Defines values for ArcKindEnum. \ + * {@link KnownArcKindEnum} can be used interchangeably with ArcKindEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AVS** \ + * **HCI** \ + * **SCVMM** \ + * **VMware** \ + * **EPS** \ + * **GCP** \ + * **AWS** + */ +export type ArcKindEnum = string; + +/** Known values of {@link PatchOperationStatus} that the service accepts. */ +export enum KnownPatchOperationStatus { + /** Unknown */ + Unknown = "Unknown", + /** InProgress */ + InProgress = "InProgress", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** CompletedWithWarnings */ + CompletedWithWarnings = "CompletedWithWarnings" +} + +/** + * Defines values for PatchOperationStatus. \ + * {@link KnownPatchOperationStatus} can be used interchangeably with PatchOperationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **InProgress** \ + * **Failed** \ + * **Succeeded** \ + * **CompletedWithWarnings** + */ +export type PatchOperationStatus = string; + +/** Known values of {@link PatchOperationStartedBy} that the service accepts. */ +export enum KnownPatchOperationStartedBy { /** User */ User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" + /** Platform */ + Platform = "Platform" } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for PatchOperationStartedBy. \ + * {@link KnownPatchOperationStartedBy} can be used interchangeably with PatchOperationStartedBy, * this enum contains the known values that the service supports. * ### Known values supported by the service * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **Platform** */ -export type CreatedByType = string; +export type PatchOperationStartedBy = string; + +/** Known values of {@link PatchServiceUsed} that the service accepts. */ +export enum KnownPatchServiceUsed { + /** Unknown */ + Unknown = "Unknown", + /** WU */ + WU = "WU", + /** WUWsus */ + WUWsus = "WU_WSUS", + /** YUM */ + YUM = "YUM", + /** APT */ + APT = "APT", + /** Zypper */ + Zypper = "Zypper" +} + +/** + * Defines values for PatchServiceUsed. \ + * {@link KnownPatchServiceUsed} can be used interchangeably with PatchServiceUsed, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **WU** \ + * **WU_WSUS** \ + * **YUM** \ + * **APT** \ + * **Zypper** + */ +export type PatchServiceUsed = string; + +/** Known values of {@link OsType} that the service accepts. */ +export enum KnownOsType { + /** Windows */ + Windows = "Windows", + /** Linux */ + Linux = "Linux" +} + +/** + * Defines values for OsType. \ + * {@link KnownOsType} can be used interchangeably with OsType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Windows** \ + * **Linux** + */ +export type OsType = string; + +/** Known values of {@link VMGuestPatchRebootSetting} that the service accepts. */ +export enum KnownVMGuestPatchRebootSetting { + /** IfRequired */ + IfRequired = "IfRequired", + /** Never */ + Never = "Never", + /** Always */ + Always = "Always" +} + +/** + * Defines values for VMGuestPatchRebootSetting. \ + * {@link KnownVMGuestPatchRebootSetting} can be used interchangeably with VMGuestPatchRebootSetting, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IfRequired** \ + * **Never** \ + * **Always** + */ +export type VMGuestPatchRebootSetting = string; + +/** Known values of {@link VMGuestPatchClassificationWindows} that the service accepts. */ +export enum KnownVMGuestPatchClassificationWindows { + /** Critical */ + Critical = "Critical", + /** Security */ + Security = "Security", + /** UpdateRollUp */ + UpdateRollUp = "UpdateRollUp", + /** FeaturePack */ + FeaturePack = "FeaturePack", + /** ServicePack */ + ServicePack = "ServicePack", + /** Definition */ + Definition = "Definition", + /** Tools */ + Tools = "Tools", + /** Updates */ + Updates = "Updates" +} + +/** + * Defines values for VMGuestPatchClassificationWindows. \ + * {@link KnownVMGuestPatchClassificationWindows} can be used interchangeably with VMGuestPatchClassificationWindows, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Security** \ + * **UpdateRollUp** \ + * **FeaturePack** \ + * **ServicePack** \ + * **Definition** \ + * **Tools** \ + * **Updates** + */ +export type VMGuestPatchClassificationWindows = string; + +/** Known values of {@link VMGuestPatchClassificationLinux} that the service accepts. */ +export enum KnownVMGuestPatchClassificationLinux { + /** Critical */ + Critical = "Critical", + /** Security */ + Security = "Security", + /** Other */ + Other = "Other" +} + +/** + * Defines values for VMGuestPatchClassificationLinux. \ + * {@link KnownVMGuestPatchClassificationLinux} can be used interchangeably with VMGuestPatchClassificationLinux, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Security** \ + * **Other** + */ +export type VMGuestPatchClassificationLinux = string; + +/** Known values of {@link VMGuestPatchRebootStatus} that the service accepts. */ +export enum KnownVMGuestPatchRebootStatus { + /** Unknown */ + Unknown = "Unknown", + /** NotNeeded */ + NotNeeded = "NotNeeded", + /** Required */ + Required = "Required", + /** Started */ + Started = "Started", + /** Failed */ + Failed = "Failed", + /** Completed */ + Completed = "Completed" +} + +/** + * Defines values for VMGuestPatchRebootStatus. \ + * {@link KnownVMGuestPatchRebootStatus} can be used interchangeably with VMGuestPatchRebootStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **NotNeeded** \ + * **Required** \ + * **Started** \ + * **Failed** \ + * **Completed** + */ +export type VMGuestPatchRebootStatus = string; /** Known values of {@link PublicNetworkAccessType} that the service accepts. */ export enum KnownPublicNetworkAccessType { @@ -786,6 +2042,86 @@ export enum KnownPublicNetworkAccessType { */ export type PublicNetworkAccessType = string; +/** Optional parameters. */ +export interface LicensesValidateLicenseOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the validateLicense operation. */ +export type LicensesValidateLicenseResponse = License; + +/** Optional parameters. */ +export interface LicensesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type LicensesCreateOrUpdateResponse = License; + +/** Optional parameters. */ +export interface LicensesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type LicensesUpdateResponse = License; + +/** Optional parameters. */ +export interface LicensesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LicensesGetResponse = License; + +/** Optional parameters. */ +export interface LicensesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface LicensesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type LicensesListByResourceGroupResponse = LicensesListResult; + +/** Optional parameters. */ +export interface LicensesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type LicensesListBySubscriptionResponse = LicensesListResult; + +/** Optional parameters. */ +export interface LicensesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type LicensesListByResourceGroupNextResponse = LicensesListResult; + +/** Optional parameters. */ +export interface LicensesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type LicensesListBySubscriptionNextResponse = LicensesListResult; + /** Optional parameters. */ export interface MachinesDeleteOptionalParams extends coreClient.OperationOptions {} @@ -799,9 +2135,36 @@ export interface MachinesGetOptionalParams extends coreClient.OperationOptions { /** Contains response data for the get operation. */ export type MachinesGetResponse = Machine; +/** Optional parameters. */ +export interface MachinesAssessPatchesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the assessPatches operation. */ +export type MachinesAssessPatchesResponse = MachineAssessPatchesResult; + +/** Optional parameters. */ +export interface MachinesInstallPatchesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the installPatches operation. */ +export type MachinesInstallPatchesResponse = MachineInstallPatchesResult; + /** Optional parameters. */ export interface MachinesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Expands referenced resources. */ + expand?: string; +} /** Contains response data for the listByResourceGroup operation. */ export type MachinesListByResourceGroupResponse = MachineListResult; @@ -827,6 +2190,63 @@ export interface MachinesListBySubscriptionNextOptionalParams /** Contains response data for the listBySubscriptionNext operation. */ export type MachinesListBySubscriptionNextResponse = MachineListResult; +/** Optional parameters. */ +export interface LicenseProfilesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type LicenseProfilesCreateOrUpdateResponse = LicenseProfile; + +/** Optional parameters. */ +export interface LicenseProfilesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type LicenseProfilesUpdateResponse = LicenseProfile; + +/** Optional parameters. */ +export interface LicenseProfilesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LicenseProfilesGetResponse = LicenseProfile; + +/** Optional parameters. */ +export interface LicenseProfilesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type LicenseProfilesDeleteResponse = LicenseProfilesDeleteHeaders; + +/** Optional parameters. */ +export interface LicenseProfilesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type LicenseProfilesListResponse = LicenseProfilesListResult; + +/** Optional parameters. */ +export interface LicenseProfilesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type LicenseProfilesListNextResponse = LicenseProfilesListResult; + /** Optional parameters. */ export interface MachineExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { @@ -879,10 +2299,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 +2313,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 +2334,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..88c5b716bb33 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -8,6 +8,141 @@ import * as coreClient from "@azure/core-client"; +export const LicenseDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseDetails", + modelProperties: { + state: { + serializedName: "state", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + edition: { + serializedName: "edition", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + processors: { + serializedName: "processors", + type: { + name: "Number" + } + }, + assignedLicenses: { + serializedName: "assignedLicenses", + readOnly: true, + type: { + name: "Number" + } + }, + immutableId: { + serializedName: "immutableId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -104,218 +239,304 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const MachineProperties: coreClient.CompositeMapper = { +export const ResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineProperties", + className: "ResourceUpdate", modelProperties: { - locationData: { - serializedName: "locationData", - type: { - name: "Composite", - className: "LocationData" - } - }, - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "OSProfile" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String" - } - }, - lastStatusChange: { - serializedName: "lastStatusChange", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - errorDetails: { - serializedName: "errorDetails", - readOnly: true, + } + } + } +}; + +export const LicensesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicensesListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ErrorDetail" + className: "License" } } } }, - agentVersion: { - serializedName: "agentVersion", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - vmId: { - serializedName: "vmId", + } + } + } +}; + +export const LocationData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocationData", + modelProperties: { + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, type: { name: "String" } }, - displayName: { - serializedName: "displayName", - readOnly: true, + city: { + serializedName: "city", type: { name: "String" } }, - machineFqdn: { - serializedName: "machineFqdn", - readOnly: true, + district: { + serializedName: "district", type: { name: "String" } }, - clientPublicKey: { - serializedName: "clientPublicKey", + countryOrRegion: { + serializedName: "countryOrRegion", type: { name: "String" } - }, - osName: { - serializedName: "osName", + } + } + } +}; + +export const AgentConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentConfiguration", + modelProperties: { + proxyUrl: { + serializedName: "proxyUrl", readOnly: true, type: { name: "String" } }, - osVersion: { - serializedName: "osVersion", + incomingConnectionsPorts: { + serializedName: "incomingConnectionsPorts", readOnly: true, type: { - name: "String" - } - }, - osType: { - serializedName: "osType", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - vmUuid: { - serializedName: "vmUuid", + extensionsAllowList: { + serializedName: "extensionsAllowList", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - extensions: { - serializedName: "extensions", + extensionsBlockList: { + serializedName: "extensionsBlockList", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtensionInstanceView" + className: "ConfigurationExtension" } } } }, - osSku: { - serializedName: "osSku", + proxyBypass: { + serializedName: "proxyBypass", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - domainName: { - serializedName: "domainName", + extensionsEnabled: { + serializedName: "extensionsEnabled", readOnly: true, type: { name: "String" } }, - adFqdn: { - serializedName: "adFqdn", + guestConfigurationEnabled: { + serializedName: "guestConfigurationEnabled", readOnly: true, type: { name: "String" } }, - dnsFqdn: { - serializedName: "dnsFqdn", + configMode: { + serializedName: "configMode", readOnly: true, type: { name: "String" } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", - type: { - name: "String" + } + } + } +}; + +export const ConfigurationExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationExtension", + modelProperties: { + publisher: { + serializedName: "publisher", + readOnly: true, + type: { + name: "String" } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } + } + } + } +}; + +export const ServiceStatuses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatuses", + modelProperties: { + extensionService: { + serializedName: "extensionService", + type: { + name: "Composite", + className: "ServiceStatus" + } }, - mssqlDiscovered: { - serializedName: "mssqlDiscovered", + guestConfigurationService: { + serializedName: "guestConfigurationService", + type: { + name: "Composite", + className: "ServiceStatus" + } + } + } + } +}; + +export const ServiceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatus", + modelProperties: { + status: { + serializedName: "status", type: { name: "String" } }, - detectedProperties: { - serializedName: "detectedProperties", + startupType: { + serializedName: "startupType", + type: { + name: "String" + } + } + } + } +}; + +export const CloudMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudMetadata", + modelProperties: { + provider: { + serializedName: "provider", readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } } } } }; -export const LocationData: coreClient.CompositeMapper = { +export const AgentUpgrade: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationData", + className: "AgentUpgrade", modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, + desiredVersion: { + serializedName: "desiredVersion", type: { name: "String" } }, - city: { - serializedName: "city", + correlationId: { + serializedName: "correlationId", type: { name: "String" } }, - district: { - serializedName: "district", + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + lastAttemptDesiredVersion: { + serializedName: "lastAttemptDesiredVersion", + readOnly: true, type: { name: "String" } }, - countryOrRegion: { - serializedName: "countryOrRegion", + lastAttemptTimestamp: { + serializedName: "lastAttemptTimestamp", + readOnly: true, + type: { + name: "String" + } + }, + lastAttemptStatus: { + serializedName: "lastAttemptStatus", + readOnly: true, + type: { + name: "String" + } + }, + lastAttemptMessage: { + serializedName: "lastAttemptMessage", + readOnly: true, type: { name: "String" } @@ -364,6 +585,12 @@ export const OSProfileWindowsConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -379,6 +606,78 @@ export const OSProfileLinuxConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } + } + } + } +}; + +export const LicenseProfileMachineInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfileMachineInstanceView", + modelProperties: { + esuProfile: { + serializedName: "esuProfile", + type: { + name: "Composite", + className: "LicenseProfileMachineInstanceViewEsuProperties" + } + } + } + } +}; + +export const LicenseProfileStorageModelEsuProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfileStorageModelEsuProperties", + modelProperties: { + assignedLicenseImmutableId: { + serializedName: "assignedLicenseImmutableId", + readOnly: true, + type: { + name: "String" + } + }, + esuKeys: { + serializedName: "esuKeys", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EsuKey" + } + } + } + } + } + } +}; + +export const EsuKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EsuKey", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + licenseStatus: { + serializedName: "licenseStatus", + type: { + name: "String" + } } } } @@ -457,132 +756,83 @@ 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, - type: { - name: "String" - } - }, - type: { - defaultValue: "SystemAssigned", - isConstant: true, - serializedName: "type", + networkInterfaces: { + serializedName: "networkInterfaces", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterface" + } + } } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const NetworkInterface: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "NetworkInterface", modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + ipAddresses: { + serializedName: "ipAddresses", type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddress" + } + } } } } } }; -export const Resource: coreClient.CompositeMapper = { +export const IpAddress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "IpAddress", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + address: { + serializedName: "address", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + ipAddressVersion: { + serializedName: "ipAddressVersion", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + subnet: { + serializedName: "subnet", type: { - name: "String" + name: "Composite", + className: "Subnet" } } } } }; -export const MachineListResult: coreClient.CompositeMapper = { +export const Subnet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineListResult", + className: "Subnet", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Machine" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + addressPrefix: { + serializedName: "addressPrefix", type: { name: "String" } @@ -620,6 +870,12 @@ export const MachineExtensionProperties: coreClient.CompositeMapper = { name: "String" } }, + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, autoUpgradeMinorVersion: { serializedName: "autoUpgradeMinorVersion", type: { @@ -658,88 +914,51 @@ export const MachineExtensionProperties: coreClient.CompositeMapper = { } }; -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", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const ResourceUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } } } } }; -export const MachineExtensionsListResult: coreClient.CompositeMapper = { +export const LicenseProfilesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionsListResult", + className: "LicenseProfilesListResult", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtension" + className: "LicenseProfile" } } } @@ -754,392 +973,451 @@ export const MachineExtensionsListResult: coreClient.CompositeMapper = { } }; -export const MachineExtensionUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtensionUpgrade", - modelProperties: { - extensionTargets: { - serializedName: "extensionTargets", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ExtensionTargetProperties" } - } - } - } - } - } -}; - -export const ExtensionTargetProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtensionTargetProperties", - modelProperties: { - targetVersion: { - serializedName: "targetVersion", - type: { - name: "String" - } - } - } - } -}; - -export const OperationListResult: coreClient.CompositeMapper = { +export const MachineAssessPatchesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "MachineAssessPatchesResult", modelProperties: { - value: { - serializedName: "value", + status: { + serializedName: "status", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationValue" - } - } + name: "String" } - } - } - } -}; - -export const OperationValue: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationValue", - modelProperties: { - origin: { - serializedName: "origin", + }, + assessmentActivityId: { + serializedName: "assessmentActivityId", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + rebootPending: { + serializedName: "rebootPending", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - display: { - serializedName: "display", + availablePatchCountByClassification: { + serializedName: "availablePatchCountByClassification", type: { name: "Composite", - className: "OperationValueDisplay" + className: "AvailablePatchCountByClassification" } - } - } - } -}; - -export const OperationValueDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationValueDisplay", - modelProperties: { - operation: { - serializedName: "operation", + }, + startDateTime: { + serializedName: "startDateTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - resource: { - serializedName: "resource", + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - description: { - serializedName: "description", + startedBy: { + serializedName: "startedBy", readOnly: true, type: { name: "String" } }, - provider: { - serializedName: "provider", + patchServiceUsed: { + serializedName: "patchServiceUsed", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + osType: { + serializedName: "osType", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScope" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + errorDetails: { + serializedName: "errorDetails", type: { - name: "String" + name: "Composite", + className: "ErrorDetail" } } } } }; -export const HybridComputePrivateLinkScopeProperties: coreClient.CompositeMapper = { +export const AvailablePatchCountByClassification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridComputePrivateLinkScopeProperties", + className: "AvailablePatchCountByClassification", modelProperties: { - publicNetworkAccess: { - defaultValue: "Disabled", - serializedName: "publicNetworkAccess", + security: { + serializedName: "security", + readOnly: true, type: { - name: "String" + name: "Number" } }, - provisioningState: { - serializedName: "provisioningState", + critical: { + serializedName: "critical", readOnly: true, type: { - name: "String" + name: "Number" } }, - privateLinkScopeId: { - serializedName: "privateLinkScopeId", + definition: { + serializedName: "definition", readOnly: true, type: { - name: "String" + name: "Number" } }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", + updateRollup: { + serializedName: "updateRollup", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnectionDataModel" - } - } + name: "Number" } - } - } - } -}; - -export const PrivateEndpointConnectionDataModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionDataModel", - modelProperties: { - id: { - serializedName: "id", + }, + featurePack: { + serializedName: "featurePack", readOnly: true, type: { - name: "String" + name: "Number" } }, - name: { - serializedName: "name", + servicePack: { + serializedName: "servicePack", readOnly: true, type: { - name: "String" + name: "Number" } }, - type: { - serializedName: "type", + tools: { + serializedName: "tools", readOnly: true, type: { - name: "String" + name: "Number" } }, - properties: { - serializedName: "properties", + updates: { + serializedName: "updates", + readOnly: true, type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" + name: "Number" + } + }, + other: { + serializedName: "other", + readOnly: true, + type: { + name: "Number" } } } } }; -export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { +export const MachineInstallPatchesParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionProperties", + className: "MachineInstallPatchesParameters", modelProperties: { - privateEndpoint: { - serializedName: "privateEndpoint", + maximumDuration: { + serializedName: "maximumDuration", + required: true, type: { - name: "Composite", - className: "PrivateEndpointProperty" + name: "String" } }, - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", + rebootSetting: { + serializedName: "rebootSetting", + required: true, + type: { + name: "String" + } + }, + windowsParameters: { + serializedName: "windowsParameters", type: { name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty" + className: "WindowsParameters" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + linuxParameters: { + serializedName: "linuxParameters", type: { - name: "String" + name: "Composite", + className: "LinuxParameters" } } } } }; -export const PrivateEndpointProperty: coreClient.CompositeMapper = { +export const WindowsParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointProperty", + className: "WindowsParameters", modelProperties: { - id: { - serializedName: "id", + classificationsToInclude: { + serializedName: "classificationsToInclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + kbNumbersToInclude: { + serializedName: "kbNumbersToInclude", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + kbNumbersToExclude: { + serializedName: "kbNumbersToExclude", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + excludeKbsRequiringReboot: { + serializedName: "excludeKbsRequiringReboot", + type: { + name: "Boolean" + } + }, + maxPatchPublishDate: { + serializedName: "maxPatchPublishDate", + type: { + name: "DateTime" } } } } }; -export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { +export const LinuxParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", + className: "LinuxParameters", modelProperties: { - status: { - serializedName: "status", - required: true, + classificationsToInclude: { + serializedName: "classificationsToInclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - description: { - serializedName: "description", - required: true, + packageNameMasksToInclude: { + serializedName: "packageNameMasksToInclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - actionsRequired: { - serializedName: "actionsRequired", - readOnly: true, + packageNameMasksToExclude: { + serializedName: "packageNameMasksToExclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const PrivateLinkScopesResource: coreClient.CompositeMapper = { +export const MachineInstallPatchesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkScopesResource", + className: "MachineInstallPatchesResult", modelProperties: { - id: { - serializedName: "id", + status: { + serializedName: "status", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + installationActivityId: { + serializedName: "installationActivityId", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + rebootStatus: { + serializedName: "rebootStatus", readOnly: true, type: { name: "String" } }, - location: { - serializedName: "location", - required: true, + maintenanceWindowExceeded: { + serializedName: "maintenanceWindowExceeded", + readOnly: true, + type: { + name: "Boolean" + } + }, + excludedPatchCount: { + serializedName: "excludedPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + notSelectedPatchCount: { + serializedName: "notSelectedPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + pendingPatchCount: { + serializedName: "pendingPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + installedPatchCount: { + serializedName: "installedPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + failedPatchCount: { + serializedName: "failedPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + startDateTime: { + serializedName: "startDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + startedBy: { + serializedName: "startedBy", + readOnly: true, type: { name: "String" } }, - tags: { - serializedName: "tags", + patchServiceUsed: { + serializedName: "patchServiceUsed", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + osType: { + serializedName: "osType", + readOnly: true, + type: { + name: "String" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ErrorDetail" } } } } }; -export const TagsResource: coreClient.CompositeMapper = { +export const MachineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsResource", + className: "MachineListResult", modelProperties: { - tags: { - serializedName: "tags", + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Machine" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const MachineExtensionsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "MachineExtensionsListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "MachineExtension" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -1148,38 +1426,53 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { } }; -export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { +export const MachineExtensionUpgrade: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceProperties", + className: "MachineExtensionUpgrade", modelProperties: { - groupId: { - serializedName: "groupId", - readOnly: true, + extensionTargets: { + serializedName: "extensionTargets", type: { - name: "String" + name: "Dictionary", + value: { + type: { name: "Composite", className: "ExtensionTargetProperties" } + } } - }, - requiredMembers: { - serializedName: "requiredMembers", - readOnly: true, + } + } + } +}; + +export const ExtensionTargetProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionTargetProperties", + modelProperties: { + targetVersion: { + serializedName: "targetVersion", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - }, - requiredZoneNames: { - serializedName: "requiredZoneNames", + } + } + } +}; + +export const ExtensionValueListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionValueListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ExtensionValue" } } } @@ -1188,10 +1481,10 @@ export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { } }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", @@ -1201,14 +1494,1310 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" + className: "OperationValue" } } } + } + } + } +}; + +export const OperationValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationValue", + modelProperties: { + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } }, - nextLink: { - serializedName: "nextLink", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationValueDisplay" + } + }, + isDataAction: { + serializedName: "isDataAction", readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const OperationValueDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationValueDisplay", + modelProperties: { + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + }, + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const HybridIdentityMetadataList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadataList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + 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" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AgentVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentVersion", + modelProperties: { + agentVersion: { + serializedName: "agentVersion", + type: { + name: "String" + } + }, + downloadLink: { + serializedName: "downloadLink", + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + } +}; + +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "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: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + groupIds: { + serializedName: "groupIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointProperty", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + required: true, + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkScopesResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const TagsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + serializedName: "groupId", + readOnly: true, + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "requiredMembers", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopeValidationDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkScopeValidationDetails", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + publicNetworkAccess: { + defaultValue: "Disabled", + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, + connectionDetails: { + serializedName: "connectionDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectionDetail" + } + } + } + } + } + } +}; + +export const ConnectionDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionDetail", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + privateIpAddress: { + serializedName: "privateIpAddress", + readOnly: true, + type: { + name: "String" + } + }, + linkIdentifier: { + serializedName: "linkIdentifier", + readOnly: true, + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + readOnly: true, + type: { + name: "String" + } + }, + memberName: { + serializedName: "memberName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const LicenseUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.licenseDetails.state", + type: { + name: "String" + } + }, + target: { + serializedName: "properties.licenseDetails.target", + type: { + name: "String" + } + }, + edition: { + serializedName: "properties.licenseDetails.edition", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.licenseDetails.type", + type: { + name: "String" + } + }, + processors: { + serializedName: "properties.licenseDetails.processors", + type: { + name: "Number" + } + } + } + } +}; + +export const LicenseProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfileUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + assignedLicense: { + serializedName: "properties.esuProfile.assignedLicense", + type: { + name: "String" + } + } + } + } +}; + +export const MachineExtensionUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", + type: { + 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" } } + } + } + } + } +}; + +export const MachineUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + 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: "AgentUpgrade" + } + }, + parentClusterResourceId: { + serializedName: "properties.parentClusterResourceId", + type: { + name: "String" + } + }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const LicenseProfileArmEsuPropertiesWithoutAssignedLicense: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfileArmEsuPropertiesWithoutAssignedLicense", + modelProperties: { + ...LicenseProfileStorageModelEsuProperties.type.modelProperties, + serverType: { + serializedName: "serverType", + readOnly: true, + type: { + name: "String" + } + }, + esuEligibility: { + serializedName: "esuEligibility", + readOnly: true, + type: { + name: "String" + } + }, + esuKeyState: { + serializedName: "esuKeyState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridComputePrivateLinkScope", + modelProperties: { + ...PrivateLinkScopesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "HybridComputePrivateLinkScopeProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const License: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "License", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + licenseDetails: { + serializedName: "properties.licenseDetails", + type: { + name: "Composite", + className: "LicenseDetails" + } + } + } + } +}; + +export const MachineExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtension", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MachineExtensionProperties" + } + } + } + } +}; + +export const Machine: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Machine", + modelProperties: { + ...TrackedResource.type.modelProperties, + resources: { + serializedName: "resources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + locationData: { + serializedName: "properties.locationData", + type: { + name: "Composite", + 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" + } + }, + licenseProfile: { + serializedName: "properties.licenseProfile", + type: { + name: "Composite", + className: "LicenseProfileMachineInstanceView" + } + }, + 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 LicenseProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfile", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + assignedLicenseImmutableId: { + serializedName: "properties.esuProfile.assignedLicenseImmutableId", + readOnly: true, + type: { + name: "String" + } + }, + esuKeys: { + serializedName: "properties.esuProfile.esuKeys", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EsuKey" + } + } + } + }, + serverType: { + serializedName: "properties.esuProfile.serverType", + readOnly: true, + type: { + name: "String" + } + }, + esuEligibility: { + serializedName: "properties.esuProfile.esuEligibility", + readOnly: true, + type: { + name: "String" + } + }, + esuKeyState: { + serializedName: "properties.esuProfile.esuKeyState", + readOnly: true, + type: { + name: "String" + } + }, + assignedLicense: { + serializedName: "properties.esuProfile.assignedLicense", type: { name: "String" } @@ -1217,112 +2806,133 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { } }; -export const PrivateLinkScopeValidationDetails: coreClient.CompositeMapper = { +export const ExtensionValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkScopeValidationDetails", + className: "ExtensionValue", modelProperties: { - id: { - serializedName: "id", + ...ProxyResource.type.modelProperties, + version: { + serializedName: "properties.version", readOnly: true, type: { name: "String" } }, - publicNetworkAccess: { - defaultValue: "Disabled", - serializedName: "publicNetworkAccess", + extensionType: { + serializedName: "properties.extensionType", + readOnly: true, type: { name: "String" } }, - connectionDetails: { - serializedName: "connectionDetails", + publisher: { + serializedName: "properties.publisher", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectionDetail" - } - } + name: "String" } } } } }; -export const ConnectionDetail: coreClient.CompositeMapper = { +export const HybridIdentityMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectionDetail", + className: "HybridIdentityMetadata", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - privateIpAddress: { - serializedName: "privateIpAddress", - readOnly: true, + ...ProxyResource.type.modelProperties, + vmId: { + serializedName: "properties.vmId", type: { name: "String" } }, - linkIdentifier: { - serializedName: "linkIdentifier", - readOnly: true, + publicKey: { + serializedName: "properties.publicKey", type: { name: "String" } }, - groupId: { - serializedName: "groupId", - readOnly: true, + identity: { + serializedName: "properties.identity", type: { - name: "String" + name: "Composite", + className: "Identity" } - }, - memberName: { - serializedName: "memberName", - readOnly: true, + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "PrivateLinkResourceProperties" } } } } }; -export const MachineUpdateProperties: coreClient.CompositeMapper = { +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineUpdateProperties", + className: "PrivateEndpointConnection", modelProperties: { - locationData: { - serializedName: "locationData", + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "LocationData" + className: "PrivateEndpointConnectionProperties" } - }, - osProfile: { - serializedName: "osProfile", + } + } + } +}; + +export const LicenseProfileMachineInstanceViewEsuProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfileMachineInstanceViewEsuProperties", + modelProperties: { + ...LicenseProfileArmEsuPropertiesWithoutAssignedLicense.type + .modelProperties, + assignedLicense: { + serializedName: "assignedLicense", type: { name: "Composite", - className: "OSProfile" + className: "License" } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + licenseAssignmentState: { + serializedName: "licenseAssignmentState", type: { name: "String" } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + } + } + } +}; + +export const LicenseProfileArmEsuProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LicenseProfileArmEsuProperties", + modelProperties: { + ...LicenseProfileArmEsuPropertiesWithoutAssignedLicense.type + .modelProperties, + assignedLicense: { + serializedName: "assignedLicense", type: { name: "String" } @@ -1331,22 +2941,28 @@ export const MachineUpdateProperties: coreClient.CompositeMapper = { } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const MachinesAssessPatchesHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "MachinesAssessPatchesHeaders", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + location: { + serializedName: "location", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } - }, + } + } + } +}; + +export const MachinesInstallPatchesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachinesInstallPatchesHeaders", + modelProperties: { location: { serializedName: "location", - required: true, type: { name: "String" } @@ -1355,178 +2971,216 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const LicenseProfilesCreateOrUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "LicenseProfilesCreateOrUpdateHeaders", modelProperties: { - ...Resource.type.modelProperties + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } } } }; -export const MachineExtensionUpdate: coreClient.CompositeMapper = { +export const LicenseProfilesUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdate", + className: "LicenseProfilesUpdateHeaders", modelProperties: { - ...ResourceUpdate.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "MachineExtensionUpdateProperties" + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } } }; -export const MachineUpdate: coreClient.CompositeMapper = { +export const LicenseProfilesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineUpdate", + className: "LicenseProfilesDeleteHeaders", modelProperties: { - ...ResourceUpdate.type.modelProperties, - identity: { - serializedName: "identity", + location: { + serializedName: "location", type: { - name: "Composite", - className: "Identity" + name: "String" } }, - properties: { - serializedName: "properties", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "MachineUpdateProperties" + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } } }; -export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { +export const MachineExtensionsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridComputePrivateLinkScope", + className: "MachineExtensionsUpdateHeaders", modelProperties: { - ...PrivateLinkScopesResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeProperties" + 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 Machine: coreClient.CompositeMapper = { +export const MachineExtensionsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Machine", + className: "MachineExtensionsDeleteHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "MachineProperties" + name: "String" } }, - identity: { - serializedName: "identity", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "Identity" + name: "Number" } }, - systemData: { - serializedName: "systemData", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Composite", - className: "SystemData" + name: "String" } } } } }; -export const MachineExtension: coreClient.CompositeMapper = { +export const HybridComputeManagementClientUpgradeExtensionsHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtension", + className: "HybridComputeManagementClientUpgradeExtensionsHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "MachineExtensionProperties" + 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 PrivateLinkResource: coreClient.CompositeMapper = { +export const PrivateLinkScopesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResource", + className: "PrivateLinkScopesDeleteHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "PrivateLinkResourceProperties" + 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 PrivateEndpointConnection: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnection", + className: "PrivateEndpointConnectionsDeleteHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" + name: "String" } }, - systemData: { - serializedName: "systemData", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "SystemData" + 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..568e2170ed31 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -12,6 +12,11 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + License as LicenseMapper, + LicenseUpdate as LicenseUpdateMapper, + MachineInstallPatchesParameters as MachineInstallPatchesParametersMapper, + LicenseProfile as LicenseProfileMapper, + LicenseProfileUpdate as LicenseProfileUpdateMapper, MachineExtension as MachineExtensionMapper, MachineExtensionUpdate as MachineExtensionUpdateMapper, MachineExtensionUpgrade as MachineExtensionUpgradeMapper, @@ -20,6 +25,23 @@ import { PrivateEndpointConnection as PrivateEndpointConnectionMapper } from "../models/mappers"; +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: LicenseMapper +}; + export const accept: OperationParameter = { parameterPath: "accept", mapper: { @@ -47,7 +69,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-10-preview", + defaultValue: "2023-06-20-preview", isConstant: true, serializedName: "api-version", type: { @@ -85,9 +107,45 @@ export const resourceGroupName: OperationURLParameter = { } }; +export const licenseName: OperationURLParameter = { + parameterPath: "licenseName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+") + }, + serializedName: "licenseName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: LicenseUpdateMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + export const machineName: OperationURLParameter = { parameterPath: "machineName", mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, serializedName: "machineName", required: true, type: { @@ -106,30 +164,79 @@ export const expand: OperationQueryParameter = { } }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const resourceGroupName1: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - serializedName: "nextLink", + serializedName: "resourceGroupName", required: true, type: { name: "String" } - }, - skipEncoding: true + } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const name: OperationURLParameter = { + parameterPath: "name", mapper: { - defaultValue: "application/json", + serializedName: "name", + required: true, + type: { + name: "String" + } + } +}; + +export const installPatchesInput: OperationParameter = { + parameterPath: "installPatchesInput", + mapper: MachineInstallPatchesParametersMapper +}; + +export const expand1: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: LicenseProfileMapper +}; + +export const machineName1: OperationURLParameter = { + parameterPath: "machineName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+") + }, + serializedName: "machineName", + required: true, + type: { + name: "String" + } + } +}; + +export const licenseProfileName: OperationURLParameter = { + parameterPath: "licenseProfileName", + mapper: { + defaultValue: "default", isConstant: true, - serializedName: "Content-Type", + serializedName: "licenseProfileName", type: { name: "String" } } }; +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: LicenseProfileUpdateMapper +}; + export const extensionParameters: OperationParameter = { parameterPath: "extensionParameters", mapper: MachineExtensionMapper @@ -151,19 +258,78 @@ export const extensionParameters1: OperationParameter = { mapper: MachineExtensionUpdateMapper }; -export const expand1: OperationQueryParameter = { - parameterPath: ["options", "expand"], +export const extensionUpgradeParameters: OperationParameter = { + parameterPath: "extensionUpgradeParameters", + mapper: MachineExtensionUpgradeMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", mapper: { - serializedName: "$expand", + serializedName: "location", + required: true, type: { name: "String" } } }; -export const extensionUpgradeParameters: OperationParameter = { - parameterPath: "extensionUpgradeParameters", - mapper: MachineExtensionUpgradeMapper +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 = { @@ -177,7 +343,7 @@ export const scopeName: OperationURLParameter = { } }; -export const parameters: OperationParameter = { +export const parameters4: OperationParameter = { parameterPath: "parameters", mapper: HybridComputePrivateLinkScopeMapper }; @@ -187,7 +353,7 @@ export const privateLinkScopeTags: OperationParameter = { mapper: TagsResourceMapper }; -export const location: OperationURLParameter = { +export const location1: OperationURLParameter = { parameterPath: "location", mapper: { constraints: { @@ -212,7 +378,7 @@ export const privateLinkScopeId: OperationURLParameter = { } }; -export const machineName1: OperationURLParameter = { +export const machineName2: OperationURLParameter = { parameterPath: "machineName", mapper: { constraints: { @@ -248,7 +414,7 @@ export const privateEndpointConnectionName: OperationURLParameter = { } }; -export const parameters1: OperationParameter = { +export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper }; 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..fc1959ff0584 --- /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.nextLink, + Parameters.machineName + ], + 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..ce41458f52c2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -6,9 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./licenses"; export * from "./machines"; +export * from "./licenseProfiles"; 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/licenseProfiles.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/licenseProfiles.ts new file mode 100644 index 000000000000..62d32cacae01 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/licenseProfiles.ts @@ -0,0 +1,629 @@ +/* + * 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 { LicenseProfiles } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + LicenseProfile, + LicenseProfilesListNextOptionalParams, + LicenseProfilesListOptionalParams, + LicenseProfilesListResponse, + LicenseProfilesCreateOrUpdateOptionalParams, + LicenseProfilesCreateOrUpdateResponse, + LicenseProfileUpdate, + LicenseProfilesUpdateOptionalParams, + LicenseProfilesUpdateResponse, + LicenseProfilesGetOptionalParams, + LicenseProfilesGetResponse, + LicenseProfilesDeleteOptionalParams, + LicenseProfilesDeleteResponse, + LicenseProfilesListNextResponse +} from "../models"; + +/// +/** Class containing LicenseProfiles operations. */ +export class LicenseProfilesImpl implements LicenseProfiles { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class LicenseProfiles class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * The operation to get all license profiles of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(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.listPagingPage( + resourceGroupName, + machineName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LicenseProfilesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, machineName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + machineName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + machineName, + options + )) { + yield* page; + } + } + + /** + * The operation to create or update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Create license profile operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfile, + options?: LicenseProfilesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicenseProfilesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + LicenseProfilesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Create license profile operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfile, + options?: LicenseProfilesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + machineName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Update license profile operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfileUpdate, + options?: LicenseProfilesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicenseProfilesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + LicenseProfilesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Update license profile operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfileUpdate, + options?: LicenseProfilesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + machineName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves information about the view of a license profile. + * @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?: LicenseProfilesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + getOperationSpec + ); + } + + /** + * The operation to delete a license profile. + * @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. + */ + async beginDelete( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicenseProfilesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + LicenseProfilesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a license profile. + * @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. + */ + async beginDeleteAndWait( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + machineName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to get all license profiles of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + machineName: string, + nextLink: string, + options?: LicenseProfilesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LicenseProfile + }, + 201: { + bodyMapper: Mappers.LicenseProfile + }, + 202: { + bodyMapper: Mappers.LicenseProfile + }, + 204: { + bodyMapper: Mappers.LicenseProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.licenseProfileName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LicenseProfile + }, + 201: { + bodyMapper: Mappers.LicenseProfile + }, + 202: { + bodyMapper: Mappers.LicenseProfile + }, + 204: { + bodyMapper: Mappers.LicenseProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.licenseProfileName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicenseProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.licenseProfileName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.LicenseProfilesDeleteHeaders + }, + 201: { + headersMapper: Mappers.LicenseProfilesDeleteHeaders + }, + 202: { + headersMapper: Mappers.LicenseProfilesDeleteHeaders + }, + 204: { + headersMapper: Mappers.LicenseProfilesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.licenseProfileName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicenseProfilesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicenseProfilesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.machineName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/licenses.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/licenses.ts new file mode 100644 index 000000000000..b2c893f4c980 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/licenses.ts @@ -0,0 +1,829 @@ +/* + * 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 { Licenses } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + License, + LicensesListByResourceGroupNextOptionalParams, + LicensesListByResourceGroupOptionalParams, + LicensesListByResourceGroupResponse, + LicensesListBySubscriptionNextOptionalParams, + LicensesListBySubscriptionOptionalParams, + LicensesListBySubscriptionResponse, + LicensesValidateLicenseOptionalParams, + LicensesValidateLicenseResponse, + LicensesCreateOrUpdateOptionalParams, + LicensesCreateOrUpdateResponse, + LicenseUpdate, + LicensesUpdateOptionalParams, + LicensesUpdateResponse, + LicensesGetOptionalParams, + LicensesGetResponse, + LicensesDeleteOptionalParams, + LicensesListByResourceGroupNextResponse, + LicensesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing Licenses operations. */ +export class LicensesImpl implements Licenses { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class Licenses class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * The operation to get all licenses of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: LicensesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, 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.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: LicensesListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LicensesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: LicensesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * The operation to get all licenses of a non-Azure machine + * @param options The options parameters. + */ + public listBySubscription( + options?: LicensesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: LicensesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LicensesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: LicensesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * The operation to validate a license. + * @param parameters Parameters supplied to the license validation operation. + * @param options The options parameters. + */ + async beginValidateLicense( + parameters: License, + options?: LicensesValidateLicenseOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicensesValidateLicenseResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { parameters, options }, + spec: validateLicenseOperationSpec + }); + const poller = await createHttpPoller< + LicensesValidateLicenseResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to validate a license. + * @param parameters Parameters supplied to the license validation operation. + * @param options The options parameters. + */ + async beginValidateLicenseAndWait( + parameters: License, + options?: LicensesValidateLicenseOptionalParams + ): Promise { + const poller = await this.beginValidateLicense(parameters, options); + return poller.pollUntilDone(); + } + + /** + * The operation to create or update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Create license operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + licenseName: string, + parameters: License, + options?: LicensesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicensesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, licenseName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + LicensesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Create license operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + licenseName: string, + parameters: License, + options?: LicensesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + licenseName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Update license operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + licenseName: string, + parameters: LicenseUpdate, + options?: LicensesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicensesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, licenseName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + LicensesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Update license operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + licenseName: string, + parameters: LicenseUpdate, + options?: LicensesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + licenseName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves information about the view of a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + licenseName: string, + options?: LicensesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, licenseName, options }, + getOperationSpec + ); + } + + /** + * The operation to delete a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + licenseName: string, + options?: LicensesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, licenseName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + licenseName: string, + options?: LicensesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + licenseName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to get all licenses of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: LicensesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * The operation to get all licenses of a non-Azure machine + * @param options The options parameters. + */ + private _listBySubscription( + options?: LicensesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: LicensesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: LicensesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const validateLicenseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.License + }, + 201: { + bodyMapper: Mappers.License + }, + 202: { + bodyMapper: Mappers.License + }, + 204: { + bodyMapper: Mappers.License + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.License + }, + 201: { + bodyMapper: Mappers.License + }, + 202: { + bodyMapper: Mappers.License + }, + 204: { + bodyMapper: Mappers.License + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.licenseName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.License + }, + 201: { + bodyMapper: Mappers.License + }, + 202: { + bodyMapper: Mappers.License + }, + 204: { + bodyMapper: Mappers.License + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.licenseName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.License + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.licenseName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.licenseName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicensesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicensesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicensesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LicensesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index eebebbcb00e7..ad668d8becee 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(); @@ -501,7 +511,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.machineName, Parameters.extensionName ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; @@ -535,7 +545,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.machineName, Parameters.extensionName ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; @@ -619,13 +629,12 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.machineName, - Parameters.nextLink + Parameters.nextLink, + Parameters.machineName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 59d68ce49514..236742ebf7df 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts @@ -13,6 +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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Machine, MachinesListByResourceGroupNextOptionalParams, @@ -24,6 +30,11 @@ import { MachinesDeleteOptionalParams, MachinesGetOptionalParams, MachinesGetResponse, + MachinesAssessPatchesOptionalParams, + MachinesAssessPatchesResponse, + MachineInstallPatchesParameters, + MachinesInstallPatchesOptionalParams, + MachinesInstallPatchesResponse, MachinesListByResourceGroupNextResponse, MachinesListBySubscriptionNextResponse } from "../models"; @@ -167,7 +178,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. @@ -200,6 +211,193 @@ export class MachinesImpl implements Machines { ); } + /** + * The operation to assess patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param options The options parameters. + */ + async beginAssessPatches( + resourceGroupName: string, + name: string, + options?: MachinesAssessPatchesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachinesAssessPatchesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, name, options }, + spec: assessPatchesOperationSpec + }); + const poller = await createHttpPoller< + MachinesAssessPatchesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to assess patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param options The options parameters. + */ + async beginAssessPatchesAndWait( + resourceGroupName: string, + name: string, + options?: MachinesAssessPatchesOptionalParams + ): Promise { + const poller = await this.beginAssessPatches( + resourceGroupName, + name, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to install patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. + */ + async beginInstallPatches( + resourceGroupName: string, + name: string, + installPatchesInput: MachineInstallPatchesParameters, + options?: MachinesInstallPatchesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachinesInstallPatchesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, name, installPatchesInput, options }, + spec: installPatchesOperationSpec + }); + const poller = await createHttpPoller< + MachinesInstallPatchesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to install patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. + */ + async beginInstallPatchesAndWait( + resourceGroupName: string, + name: string, + installPatchesInput: MachineInstallPatchesParameters, + options?: MachinesInstallPatchesOptionalParams + ): Promise { + const poller = await this.beginInstallPatches( + resourceGroupName, + name, + installPatchesInput, + options + ); + return poller.pollUntilDone(); + } + /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the * response to get the next page of hybrid machines. @@ -308,6 +506,70 @@ const getOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const assessPatchesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.MachineAssessPatchesResult + }, + 201: { + bodyMapper: Mappers.MachineAssessPatchesResult + }, + 202: { + bodyMapper: Mappers.MachineAssessPatchesResult + }, + 204: { + bodyMapper: Mappers.MachineAssessPatchesResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName1, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const installPatchesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.MachineInstallPatchesResult + }, + 201: { + bodyMapper: Mappers.MachineInstallPatchesResult + }, + 202: { + bodyMapper: Mappers.MachineInstallPatchesResult + }, + 204: { + bodyMapper: Mappers.MachineInstallPatchesResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.installPatchesInput, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName1, + Parameters.name + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines", @@ -320,7 +582,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -357,7 +619,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -378,7 +639,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..39604b811a97 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(); @@ -418,7 +430,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -427,7 +439,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.scopeName, Parameters.privateEndpointConnectionName ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; @@ -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..10989e284d40 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(); @@ -507,7 +511,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -515,7 +519,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.scopeName ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; @@ -539,7 +543,7 @@ const updateTagsOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.scopeName ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; @@ -559,7 +563,7 @@ const getValidationDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location, + Parameters.location1, Parameters.privateLinkScopeId ], headerParameters: [Parameters.accept], @@ -582,7 +586,7 @@ const getValidationDetailsForMachineOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.machineName1 + Parameters.machineName2 ], headerParameters: [Parameters.accept], serializer @@ -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..ce41458f52c2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -6,9 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./licenses"; export * from "./machines"; +export * from "./licenseProfiles"; 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/licenseProfiles.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/licenseProfiles.ts new file mode 100644 index 000000000000..0466ad5e0f85 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/licenseProfiles.ts @@ -0,0 +1,139 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + LicenseProfile, + LicenseProfilesListOptionalParams, + LicenseProfilesCreateOrUpdateOptionalParams, + LicenseProfilesCreateOrUpdateResponse, + LicenseProfileUpdate, + LicenseProfilesUpdateOptionalParams, + LicenseProfilesUpdateResponse, + LicenseProfilesGetOptionalParams, + LicenseProfilesGetResponse, + LicenseProfilesDeleteOptionalParams, + LicenseProfilesDeleteResponse +} from "../models"; + +/// +/** Interface representing a LicenseProfiles. */ +export interface LicenseProfiles { + /** + * The operation to get all license profiles of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Create license profile operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfile, + options?: LicenseProfilesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicenseProfilesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Create license profile operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfile, + options?: LicenseProfilesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Update license profile operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfileUpdate, + options?: LicenseProfilesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicenseProfilesUpdateResponse + > + >; + /** + * The operation to update a license profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param parameters Parameters supplied to the Update license profile operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + machineName: string, + parameters: LicenseProfileUpdate, + options?: LicenseProfilesUpdateOptionalParams + ): Promise; + /** + * Retrieves information about the view of a license profile. + * @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?: LicenseProfilesGetOptionalParams + ): Promise; + /** + * The operation to delete a license profile. + * @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. + */ + beginDelete( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicenseProfilesDeleteResponse + > + >; + /** + * The operation to delete a license profile. + * @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. + */ + beginDeleteAndWait( + resourceGroupName: string, + machineName: string, + options?: LicenseProfilesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/licenses.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/licenses.ts new file mode 100644 index 000000000000..625fa5a36eba --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/licenses.ts @@ -0,0 +1,164 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + License, + LicensesListByResourceGroupOptionalParams, + LicensesListBySubscriptionOptionalParams, + LicensesValidateLicenseOptionalParams, + LicensesValidateLicenseResponse, + LicensesCreateOrUpdateOptionalParams, + LicensesCreateOrUpdateResponse, + LicenseUpdate, + LicensesUpdateOptionalParams, + LicensesUpdateResponse, + LicensesGetOptionalParams, + LicensesGetResponse, + LicensesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Licenses. */ +export interface Licenses { + /** + * The operation to get all licenses of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: LicensesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to get all licenses of a non-Azure machine + * @param options The options parameters. + */ + listBySubscription( + options?: LicensesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to validate a license. + * @param parameters Parameters supplied to the license validation operation. + * @param options The options parameters. + */ + beginValidateLicense( + parameters: License, + options?: LicensesValidateLicenseOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicensesValidateLicenseResponse + > + >; + /** + * The operation to validate a license. + * @param parameters Parameters supplied to the license validation operation. + * @param options The options parameters. + */ + beginValidateLicenseAndWait( + parameters: License, + options?: LicensesValidateLicenseOptionalParams + ): Promise; + /** + * The operation to create or update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Create license operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + licenseName: string, + parameters: License, + options?: LicensesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicensesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Create license operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + licenseName: string, + parameters: License, + options?: LicensesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Update license operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + licenseName: string, + parameters: LicenseUpdate, + options?: LicensesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LicensesUpdateResponse + > + >; + /** + * The operation to update a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param parameters Parameters supplied to the Update license operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + licenseName: string, + parameters: LicenseUpdate, + options?: LicensesUpdateOptionalParams + ): Promise; + /** + * Retrieves information about the view of a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + licenseName: string, + options?: LicensesGetOptionalParams + ): Promise; + /** + * The operation to delete a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + licenseName: string, + options?: LicensesDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a license. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + licenseName: string, + options?: LicensesDeleteOptionalParams + ): Promise; +} 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..8f8d165dc0b8 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts @@ -7,13 +7,19 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Machine, MachinesListByResourceGroupOptionalParams, MachinesListBySubscriptionOptionalParams, MachinesDeleteOptionalParams, MachinesGetOptionalParams, - MachinesGetResponse + MachinesGetResponse, + MachinesAssessPatchesOptionalParams, + MachinesAssessPatchesResponse, + MachineInstallPatchesParameters, + MachinesInstallPatchesOptionalParams, + MachinesInstallPatchesResponse } from "../models"; /// @@ -38,7 +44,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. @@ -59,4 +65,62 @@ export interface Machines { machineName: string, options?: MachinesGetOptionalParams ): Promise; + /** + * The operation to assess patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param options The options parameters. + */ + beginAssessPatches( + resourceGroupName: string, + name: string, + options?: MachinesAssessPatchesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachinesAssessPatchesResponse + > + >; + /** + * The operation to assess patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param options The options parameters. + */ + beginAssessPatchesAndWait( + resourceGroupName: string, + name: string, + options?: MachinesAssessPatchesOptionalParams + ): Promise; + /** + * The operation to install patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. + */ + beginInstallPatches( + resourceGroupName: string, + name: string, + installPatchesInput: MachineInstallPatchesParameters, + options?: MachinesInstallPatchesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachinesInstallPatchesResponse + > + >; + /** + * The operation to install patches on a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. + * @param name The name of the hybrid machine. + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. + */ + beginInstallPatchesAndWait( + resourceGroupName: string, + name: string, + installPatchesInput: MachineInstallPatchesParameters, + options?: MachinesInstallPatchesOptionalParams + ): Promise; } 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"