From 3cbf0e99a0e85195c9c24764f1e5202b77043e55 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 10 May 2023 19:53:38 +0000 Subject: [PATCH] CodeGen from PR 23732 in Azure/azure-rest-api-specs Merge c9a4b57465e896b6c8cd13c53e5ddfe4441868e4 into 756495dd7e0e2f5181039def47a8c85ff0787b66 --- common/config/rush/pnpm-lock.yaml | 21 +- .../arm-hybridcompute/CHANGELOG.md | 134 +- sdk/hybridcompute/arm-hybridcompute/LICENSE | 2 +- .../arm-hybridcompute/_meta.json | 10 +- .../arm-hybridcompute/package.json | 23 +- .../review/arm-hybridcompute.api.md | 769 ++++- .../src/hybridComputeManagementClient.ts | 64 +- .../arm-hybridcompute/src/lroImpl.ts | 54 +- .../arm-hybridcompute/src/models/index.ts | 1447 +++++++-- .../arm-hybridcompute/src/models/mappers.ts | 2750 +++++++++++++---- .../src/models/parameters.ts | 158 +- .../src/operations/agentVersionOperations.ts | 101 + .../src/operations/extensionMetadata.ts | 194 ++ .../hybridIdentityMetadataOperations.ts | 247 ++ .../arm-hybridcompute/src/operations/index.ts | 5 + .../src/operations/machineExtensions.ts | 73 +- .../src/operations/machineRunCommands.ts | 606 ++++ .../src/operations/machines.ts | 266 +- .../operations/networkProfileOperations.ts | 72 + .../operations/privateEndpointConnections.ts | 55 +- .../src/operations/privateLinkResources.ts | 1 - .../src/operations/privateLinkScopes.ts | 32 +- .../agentVersionOperations.ts | 39 + .../operationsInterfaces/extensionMetadata.ts | 48 + .../hybridIdentityMetadataOperations.ts | 44 + .../src/operationsInterfaces/index.ts | 5 + .../operationsInterfaces/machineExtensions.ts | 12 +- .../machineRunCommands.ts | 131 + .../src/operationsInterfaces/machines.ts | 68 +- .../networkProfileOperations.ts | 27 + .../privateEndpointConnections.ts | 8 +- .../operationsInterfaces/privateLinkScopes.ts | 4 +- .../arm-hybridcompute/src/pagingHelper.ts | 8 +- .../arm-hybridcompute/tsconfig.json | 10 +- 34 files changed, 6429 insertions(+), 1059 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/networkProfileOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/agentVersionOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/hybridIdentityMetadataOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/networkProfileOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 587b911bcea6..e5e4d196b31e 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -339,7 +339,6 @@ specifiers: '@rush-temp/web-pubsub-client': file:./projects/web-pubsub-client.tgz '@rush-temp/web-pubsub-client-protobuf': file:./projects/web-pubsub-client-protobuf.tgz '@rush-temp/web-pubsub-express': file:./projects/web-pubsub-express.tgz - '@types/trusted-types': 2.0.2 dependencies: '@rush-temp/abort-controller': file:projects/abort-controller.tgz @@ -680,7 +679,6 @@ dependencies: '@rush-temp/web-pubsub-client': file:projects/web-pubsub-client.tgz '@rush-temp/web-pubsub-client-protobuf': file:projects/web-pubsub-client-protobuf.tgz '@rush-temp/web-pubsub-express': file:projects/web-pubsub-express.tgz - '@types/trusted-types': 2.0.2 packages: @@ -3813,7 +3811,7 @@ packages: dependencies: semver: 7.5.0 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230508 + typescript: 5.1.0-dev.20230510 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8381,8 +8379,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230508: - resolution: {integrity: sha512-87gFJLsUB0IWN6/MUhh0QHS+qnLR5gTGwZr5vU5dYEVPv+VTNv/g2oXLWr5LCEP+hyj+a4LXx8QjCD7x6v+5wg==} + /typescript/5.1.0-dev.20230510: + resolution: {integrity: sha512-jtCZp40/FBD7Tlj916Dv7bbr+NJK1ZYXoODwxKNBSuZTGeuijogC3k78zp84rij3uxY+F+HFl30cIpMm5i/iAQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -12013,7 +12011,7 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-Fps4gZR7xrBRDouDuwIncIbYOzeRI/kRXoyYR5U0IJazEYPRy/FQuFTTbtJjK9WRSGOry/jPKWfSkV3zMZfc9A==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-ImsyfWC+jX+5bcHIFCVZjdr6Tnic0I1KazT1QJJAX2TNq81l94hanMXLUktDCZAZNQeoKDi6IIE3Nwnna3dm/Q==, tarball: file:projects/arm-hybridcompute.tgz} name: '@rush-temp/arm-hybridcompute' version: 0.0.0 dependencies: @@ -12027,13 +12025,14 @@ packages: '@types/node': 14.18.43 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_mn2f3gd3jpedkkr23obcmzv5eq tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -15316,7 +15315,7 @@ packages: dev: false file:projects/communication-call-automation.tgz: - resolution: {integrity: sha512-FPNjYkMGdUZniAZmeCYI256enk10lzjVvo8SEwA1GrMVSrHIsTt89nSF2QpJBbWVPYP+hqF5dmC866NE/Nqymw==, tarball: file:projects/communication-call-automation.tgz} + resolution: {integrity: sha512-VD8/xJ8qDjSBZ3htdyTZqINjSvcFCsYNKGH3BqlXWRatiTFz4pVLg0UrV/obOxHrb7cuXUeofu/lee3nVv0UUw==, tarball: file:projects/communication-call-automation.tgz} name: '@rush-temp/communication-call-automation' version: 0.0.0 dependencies: @@ -17767,7 +17766,7 @@ packages: dev: false file:projects/monitor-ingestion.tgz: - resolution: {integrity: sha512-cWwEWvsr9xH/Ajng6lc+JH0W0lw4RJai73j3tDgNvXem8y15gKKvQzYZz0p4AttBdNinBvs0kj7Csu6hwlp91g==, tarball: file:projects/monitor-ingestion.tgz} + resolution: {integrity: sha512-yV+EJqMoAKH6mWoIlnSZxgc4Q26azQNJ6xsPRYLGYvsaBIrI7zUHMTb4z77Ec8wV3Hx6LDLswf9Q0cZR6ZK7Jw==, tarball: file:projects/monitor-ingestion.tgz} name: '@rush-temp/monitor-ingestion' version: 0.0.0 dependencies: @@ -18351,7 +18350,7 @@ packages: dev: false file:projects/perf-monitor-query.tgz: - resolution: {integrity: sha512-+9L4HZ3JxF4XWOkZSRo1Htqc0JRvsFsRWfnWuvrUzrnKGsDIhKIu2pFVbUPiCTA/q6xCE+1mpjXOqvhoHvJpOA==, tarball: file:projects/perf-monitor-query.tgz} + resolution: {integrity: sha512-oGpEpmnic6Slrw4xMepkPffibSXj8IhQvMQgFvtAopm7H22vPE9vcJb3jfHeo8qvP1Alke02GREamt4LEGAw1w==, tarball: file:projects/perf-monitor-query.tgz} name: '@rush-temp/perf-monitor-query' version: 0.0.0 dependencies: diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index 16c6165c364f..ccf7f563468c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,37 +1,141 @@ # 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-05-10) **Features** + - Added operation group AgentVersionOperations + - Added operation group ExtensionMetadata + - Added operation group HybridIdentityMetadataOperations + - Added operation group MachineRunCommands + - 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 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 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 MachineRunCommand + - Added Interface MachineRunCommandInstanceView + - Added Interface MachineRunCommandInstanceViewStatus + - Added Interface MachineRunCommandsCreateOrUpdateHeaders + - Added Interface MachineRunCommandsCreateOrUpdateOptionalParams + - Added Interface MachineRunCommandScriptSource + - Added Interface MachineRunCommandsDeleteHeaders + - Added Interface MachineRunCommandsDeleteOptionalParams + - Added Interface MachineRunCommandsGetOptionalParams + - Added Interface MachineRunCommandsListNextOptionalParams + - Added Interface MachineRunCommandsListOptionalParams + - Added Interface MachineRunCommandsListResult + - Added Interface MachineRunCommandsUpdateHeaders + - Added Interface MachineRunCommandsUpdateOptionalParams + - Added Interface MachineRunCommandUpdate + - 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 RunCommandInputParameter + - Added Interface RunCommandManagedIdentity + - 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 AssessmentModeTypes + - Added Type Alias ExtensionMetadataGetResponse + - Added Type Alias ExtensionMetadataListResponse + - Added Type Alias HybridIdentityMetadataGetResponse + - Added Type Alias HybridIdentityMetadataListByMachinesNextResponse + - Added Type Alias HybridIdentityMetadataListByMachinesResponse + - Added Type Alias LastAttemptStatusEnum + - Added Type Alias MachineRunCommandsCreateOrUpdateResponse + - Added Type Alias MachineRunCommandsGetResponse + - Added Type Alias MachineRunCommandsListNextResponse + - Added Type Alias MachineRunCommandsListResponse + - Added Type Alias MachineRunCommandsUpdateResponse + - 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 PrivateCloudKind + - 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 OperationValue has a new optional parameter isDataAction - Interface OSProfile has a new optional parameter linuxConfiguration - Interface OSProfile has a new optional parameter windowsConfiguration + - Interface PrivateEndpointConnectionProperties has a new optional parameter groupIds + - Interface Resource has a new optional parameter systemData + - Added Enum KnownAgentConfigurationMode + - Added Enum KnownAssessmentModeTypes + - Added Enum KnownLastAttemptStatusEnum + - Added Enum KnownOsType + - Added Enum KnownPatchModeTypes + - Added Enum KnownPatchOperationStartedBy + - Added Enum KnownPatchOperationStatus + - Added Enum KnownPatchServiceUsed + - Added Enum KnownPrivateCloudKind + - 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 ## 3.0.0 (2022-01-18) diff --git a/sdk/hybridcompute/arm-hybridcompute/LICENSE b/sdk/hybridcompute/arm-hybridcompute/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/LICENSE +++ b/sdk/hybridcompute/arm-hybridcompute/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json index 66ea1bf1fe32..aefbf7dc62f1 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": "4ce8651936a5c457ff2035ed9ab305883b9545ed", + "readme": "specification/hybridcompute/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 167dde9aa5ac..4878e3eb12a5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HybridComputeManagementClient.", - "version": "3.1.0-beta.3", + "version": "4.0.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute" +} \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md index 0705649247f5..d61e2c83c684 100644 --- a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -6,9 +6,95 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface AgentConfiguration { + readonly configMode?: AgentConfigurationMode; + readonly extensionsAllowList?: ConfigurationExtension[]; + readonly extensionsBlockList?: ConfigurationExtension[]; + readonly extensionsEnabled?: string; + readonly guestConfigurationEnabled?: string; + readonly incomingConnectionsPorts?: string[]; + readonly proxyBypass?: string[]; + readonly proxyUrl?: string; +} + +// @public +export type AgentConfigurationMode = string; + +// @public +export interface AgentUpgrade { + correlationId?: string; + desiredVersion?: string; + enableAutomaticUpgrade?: boolean; + readonly lastAttemptDesiredVersion?: string; + readonly lastAttemptMessage?: string; + readonly lastAttemptStatus?: LastAttemptStatusEnum; + readonly lastAttemptTimestamp?: string; +} + +// @public +export interface AgentVersion { + agentVersion?: string; + downloadLink?: string; + osType?: string; +} + +// @public +export interface AgentVersionGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AgentVersionGetResponse = AgentVersion; + +// @public +export interface AgentVersionListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AgentVersionListResponse = AgentVersionsList; + +// @public +export interface AgentVersionOperations { + get(osType: string, version: string, options?: AgentVersionGetOptionalParams): Promise; + list(osType: string, options?: AgentVersionListOptionalParams): Promise; +} + +// @public +export interface AgentVersionsList { + nextLink?: string; + value?: AgentVersion[]; +} + +// @public +export type AssessmentModeTypes = string; + +// @public +export interface 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 +123,62 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + +// @public +export interface ExtensionMetadata { + get(location: string, publisher: string, extensionType: string, version: string, options?: ExtensionMetadataGetOptionalParams): Promise; + list(location: string, publisher: string, extensionType: string, options?: ExtensionMetadataListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExtensionMetadataGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionMetadataGetResponse = ExtensionValue; + +// @public +export interface ExtensionMetadataListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionMetadataListResponse = ExtensionValueListResult; + // @public export interface ExtensionTargetProperties { targetVersion?: string; } +// @public +export interface ExtensionValue extends ProxyResource { + readonly extensionType?: string; + readonly publisher?: string; + readonly version?: string; +} + +// @public +export interface ExtensionValueListResult { + readonly value?: ExtensionValue[]; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -54,16 +186,28 @@ export function getContinuationToken(page: unknown): string | undefined; export class HybridComputeManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridComputeManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, machineName: string, options?: HybridComputeManagementClientOptionalParams); + // (undocumented) + agentVersionOperations: AgentVersionOperations; // (undocumented) apiVersion: string; - beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise, void>>; + beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise, void>>; beginUpgradeExtensionsAndWait(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise; // (undocumented) + extensionMetadata: ExtensionMetadata; + // (undocumented) + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + // (undocumented) machineExtensions: MachineExtensions; // (undocumented) + machineName: string; + // (undocumented) + machineRunCommands: MachineRunCommands; + // (undocumented) machines: Machines; // (undocumented) + networkProfileOperations: NetworkProfileOperations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -82,6 +226,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 +253,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 +303,25 @@ export interface Identity { // @public export type InstanceViewTypes = string; +// @public +export interface IpAddress { + address?: string; + ipAddressVersion?: string; + readonly subnet?: Subnet; +} + +// @public +export enum KnownAgentConfigurationMode { + Full = "full", + Monitor = "monitor" +} + +// @public +export enum KnownAssessmentModeTypes { + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -125,6 +335,59 @@ export enum KnownInstanceViewTypes { InstanceView = "instanceView" } +// @public +export enum KnownLastAttemptStatusEnum { + Failed = "Failed", + Success = "Success" +} + +// @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 KnownPrivateCloudKind { + AVS = "AVS", + HCI = "HCI", + Scvmm = "SCVMM", + VMware = "VMware" +} + // @public export enum KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -145,6 +408,52 @@ 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 LinuxParameters { + classificationsToInclude?: VMGuestPatchClassificationLinux[]; + packageNameMasksToExclude?: string[]; + packageNameMasksToInclude?: string[]; +} + // @public export interface LocationData { city?: string; @@ -155,15 +464,72 @@ export interface LocationData { // @public export interface Machine extends TrackedResource { + readonly adFqdn?: string; + readonly agentConfiguration?: AgentConfiguration; + agentUpgrade?: AgentUpgrade; + readonly agentVersion?: string; + clientPublicKey?: string; + cloudMetadata?: CloudMetadata; + readonly detectedProperties?: { + [propertyName: string]: string; + }; + readonly displayName?: string; + readonly dnsFqdn?: string; + readonly domainName?: string; + readonly errorDetails?: ErrorDetail[]; + extensions?: MachineExtensionInstanceView[]; identity?: Identity; - properties?: MachineProperties; - readonly systemData?: SystemData; + kind?: PrivateCloudKind; + readonly lastStatusChange?: Date; + locationData?: LocationData; + readonly machineFqdn?: string; + mssqlDiscovered?: string; + readonly networkProfile?: NetworkProfile; + readonly osName?: string; + osProfile?: OSProfile; + readonly osSku?: string; + osType?: string; + readonly osVersion?: string; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; + readonly provisioningState?: string; + readonly resources?: MachineExtension[]; + serviceStatuses?: ServiceStatuses; + readonly status?: StatusTypes; + vmId?: string; + readonly vmUuid?: string; +} + +// @public +export interface 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; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + forceUpdateTag?: string; + instanceView?: MachineExtensionInstanceView; + protectedSettings?: { + [propertyName: string]: any; + }; + readonly provisioningState?: string; + publisher?: string; + settings?: { + [propertyName: string]: any; + }; + typeHandlerVersion?: string; + typePropertiesType?: string; } // @public @@ -183,26 +549,13 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -// @public -export interface MachineExtensionProperties { - autoUpgradeMinorVersion?: boolean; - forceUpdateTag?: string; - instanceView?: MachineExtensionInstanceView; - protectedSettings?: Record; - readonly provisioningState?: string; - publisher?: string; - settings?: Record; - type?: string; - typeHandlerVersion?: string; -} - // @public export interface MachineExtensions { - beginCreateOrUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise; get(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsGetOptionalParams): Promise; list(resourceGroupName: string, machineName: string, options?: MachineExtensionsListOptionalParams): PagedAsyncIterableIterator; @@ -217,6 +570,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 +592,6 @@ export type MachineExtensionsGetResponse = MachineExtension; // @public export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -252,6 +611,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 +629,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; } @@ -284,6 +650,33 @@ export interface MachineExtensionUpgrade { }; } +// @public +export interface MachineInstallPatchesParameters { + linuxParameters?: LinuxParameters; + maximumDuration: string; + rebootSetting: VMGuestPatchRebootSetting; + windowsParameters?: WindowsParameters; +} + +// @public +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; @@ -291,43 +684,160 @@ export interface MachineListResult { } // @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; +export interface MachineRunCommand extends TrackedResource { + asyncExecution?: boolean; + errorBlobManagedIdentity?: RunCommandManagedIdentity; + errorBlobUri?: string; + readonly instanceView?: MachineRunCommandInstanceView; + outputBlobManagedIdentity?: RunCommandManagedIdentity; + outputBlobUri?: string; + parameters?: RunCommandInputParameter[]; + protectedParameters?: RunCommandInputParameter[]; readonly provisioningState?: string; - readonly status?: StatusTypes; - vmId?: string; - readonly vmUuid?: string; + runAsPassword?: string; + runAsUser?: string; + source?: MachineRunCommandScriptSource; + timeoutInSeconds?: number; +} + +// @public +export interface MachineRunCommandInstanceView { + name?: string; + status?: MachineRunCommandInstanceViewStatus; +} + +// @public +export interface MachineRunCommandInstanceViewStatus { + code?: string; + displayStatus?: string; + level?: StatusLevelTypes; + message?: string; + time?: Date; +} + +// @public +export interface MachineRunCommands { + beginCreateOrUpdate(resourceGroupName: string, runCommandName: string, runCommandProperties: MachineRunCommand, options?: MachineRunCommandsCreateOrUpdateOptionalParams): Promise, MachineRunCommandsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, runCommandName: string, runCommandProperties: MachineRunCommand, options?: MachineRunCommandsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, runCommandName: string, options?: MachineRunCommandsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, runCommandName: string, options?: MachineRunCommandsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, runCommandName: string, runCommandProperties: MachineRunCommandUpdate, options?: MachineRunCommandsUpdateOptionalParams): Promise, MachineRunCommandsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, runCommandName: string, runCommandProperties: MachineRunCommandUpdate, options?: MachineRunCommandsUpdateOptionalParams): Promise; + get(resourceGroupName: string, runCommandName: string, options?: MachineRunCommandsGetOptionalParams): Promise; + list(resourceGroupName: string, options?: MachineRunCommandsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MachineRunCommandsCreateOrUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface MachineRunCommandsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachineRunCommandsCreateOrUpdateResponse = MachineRunCommand; + +// @public +export interface MachineRunCommandScriptSource { + commandId?: string; + script?: string; + scriptUri?: string; + scriptUriManagedIdentity?: RunCommandManagedIdentity; +} + +// @public +export interface MachineRunCommandsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface MachineRunCommandsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MachineRunCommandsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachineRunCommandsGetResponse = MachineRunCommand; + +// @public +export interface MachineRunCommandsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachineRunCommandsListNextResponse = MachineRunCommandsListResult; + +// @public +export interface MachineRunCommandsListOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type MachineRunCommandsListResponse = MachineRunCommandsListResult; + +// @public +export interface MachineRunCommandsListResult { + nextLink?: string; + value?: MachineRunCommand[]; +} + +// @public +export interface MachineRunCommandsUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface MachineRunCommandsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachineRunCommandsUpdateResponse = MachineRunCommand; + +// @public +export interface MachineRunCommandUpdate extends ResourceUpdate { } // @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 +850,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 { } @@ -370,18 +894,38 @@ export type MachinesListBySubscriptionResponse = MachineListResult; // @public export interface MachineUpdate extends ResourceUpdate { + agentUpgrade?: AgentUpgrade; + cloudMetadata?: CloudMetadata; identity?: Identity; - properties?: MachineUpdateProperties; -} - -// @public -export interface MachineUpdateProperties { + kind?: PrivateCloudKind; locationData?: LocationData; osProfile?: OSProfile; parentClusterResourceId?: string; privateLinkScopeResourceId?: string; } +// @public +export interface NetworkInterface { + ipAddresses?: IpAddress[]; +} + +// @public +export interface NetworkProfile { + networkInterfaces?: NetworkInterface[]; +} + +// @public +export interface NetworkProfileGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkProfileGetResponse = NetworkProfile; + +// @public +export interface NetworkProfileOperations { + get(resourceGroupName: string, machineName: string, options?: NetworkProfileGetOptionalParams): Promise; +} + // @public export interface OperationListResult { readonly value?: OperationValue[]; @@ -402,6 +946,7 @@ export type OperationsListResponse = OperationListResult; // @public export interface OperationValue { display?: OperationValueDisplay; + readonly isDataAction?: boolean; readonly name?: string; readonly origin?: string; } @@ -423,18 +968,37 @@ 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 type PrivateCloudKind = string; + // @public export interface PrivateEndpointConnection extends ProxyResource { properties?: PrivateEndpointConnectionProperties; - readonly systemData?: SystemData; } // @public @@ -453,6 +1017,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: string; @@ -460,9 +1025,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 +1042,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 +1084,6 @@ export interface PrivateEndpointProperty { // @public export interface PrivateLinkResource extends ProxyResource { properties?: PrivateLinkResourceProperties; - readonly systemData?: SystemData; } // @public @@ -557,7 +1128,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 +1146,13 @@ export interface PrivateLinkScopesCreateOrUpdateOptionalParams extends coreClien // @public export type PrivateLinkScopesCreateOrUpdateResponse = HybridComputePrivateLinkScope; +// @public +export interface PrivateLinkScopesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface PrivateLinkScopesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -673,6 +1251,7 @@ export type PublicNetworkAccessType = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -683,12 +1262,41 @@ export interface ResourceUpdate { }; } +// @public +export interface RunCommandInputParameter { + name: string; + value: string; +} + +// @public +export interface RunCommandManagedIdentity { + clientId?: string; + objectId?: string; +} + +// @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 +1328,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/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index e4aba1055e13..05dfa7c4c7cd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -14,12 +14,21 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "./lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "./lroImpl"; import { MachinesImpl, MachineExtensionsImpl, + ExtensionMetadataImpl, OperationsImpl, + NetworkProfileOperationsImpl, + HybridIdentityMetadataOperationsImpl, + AgentVersionOperationsImpl, + MachineRunCommandsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl @@ -27,7 +36,12 @@ import { import { Machines, MachineExtensions, + ExtensionMetadata, Operations, + NetworkProfileOperations, + HybridIdentityMetadataOperations, + AgentVersionOperations, + MachineRunCommands, PrivateLinkScopes, PrivateLinkResources, PrivateEndpointConnections @@ -44,16 +58,19 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { $host: string; apiVersion: string; subscriptionId: string; + machineName: string; /** * Initializes a new instance of the HybridComputeManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId The ID of the target subscription. + * @param machineName The name of the machine containing the run command. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, + machineName: string, options?: HybridComputeManagementClientOptionalParams ) { if (credentials === undefined) { @@ -62,6 +79,9 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { if (subscriptionId === undefined) { throw new Error("'subscriptionId' cannot be null"); } + if (machineName === undefined) { + throw new Error("'machineName' cannot be null"); + } // Initializing default values for options if (!options) { @@ -72,7 +92,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}` @@ -122,13 +142,21 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { } // Parameter assignments this.subscriptionId = subscriptionId; + this.machineName = machineName; // 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-04-25-preview"; this.machines = new MachinesImpl(this); this.machineExtensions = new MachineExtensionsImpl(this); + this.extensionMetadata = new ExtensionMetadataImpl(this); this.operations = new OperationsImpl(this); + this.networkProfileOperations = new NetworkProfileOperationsImpl(this); + this.hybridIdentityMetadataOperations = new HybridIdentityMetadataOperationsImpl( + this + ); + this.agentVersionOperations = new AgentVersionOperationsImpl(this); + this.machineRunCommands = new MachineRunCommandsImpl(this); this.privateLinkScopes = new PrivateLinkScopesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -175,14 +203,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 +243,18 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, machineName, extensionUpgradeParameters, options }, - upgradeExtensionsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + machineName, + extensionUpgradeParameters, + options + }, + spec: upgradeExtensionsOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -252,7 +285,12 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { machines: Machines; machineExtensions: MachineExtensions; + extensionMetadata: ExtensionMetadata; operations: Operations; + networkProfileOperations: NetworkProfileOperations; + hybridIdentityMetadataOperations: HybridIdentityMetadataOperations; + agentVersionOperations: AgentVersionOperations; + machineRunCommands: MachineRunCommands; privateLinkScopes: PrivateLinkScopes; privateLinkResources: PrivateLinkResources; privateEndpointConnections: PrivateEndpointConnections; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts b/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index c8fc24124f04..177ab3067b6a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -57,113 +57,129 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** Describes the properties of a hybrid machine. */ -export interface MachineProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; +/** Metadata pertaining to the geographic location of the resource. */ +export interface LocationData { + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located */ + countryOrRegion?: string; +} + +/** Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. */ +export interface AgentConfiguration { /** - * The provisioning state, which only appears in the response. + * Specifies the URL of the proxy to be used. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly proxyUrl?: string; /** - * The status of the hybrid machine agent. + * Specifies the list of ports that the agent will be able to listen on. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: StatusTypes; + readonly incomingConnectionsPorts?: string[]; /** - * The time of the last status change. + * Array of extensions that are allowed to be installed or updated. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastStatusChange?: Date; + readonly extensionsAllowList?: ConfigurationExtension[]; /** - * Details about the error state. + * Array of extensions that are blocked (cannot be installed or updated) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: ErrorDetail[]; + readonly extensionsBlockList?: ConfigurationExtension[]; /** - * The hybrid machine agent full version. + * List of service names which should not use the specified proxy server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly agentVersion?: string; - /** Specifies the hybrid machine unique ID. */ - vmId?: string; + readonly proxyBypass?: string[]; /** - * Specifies the hybrid machine display name. + * Specifies whether the extension service is enabled or disabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayName?: string; + readonly extensionsEnabled?: string; /** - * Specifies the hybrid machine FQDN. + * Specified whether the guest configuration service is enabled or disabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly machineFqdn?: string; - /** Public Key that the client provides to be used during initial resource onboarding */ - clientPublicKey?: string; + readonly guestConfigurationEnabled?: string; /** - * The Operating System running on the hybrid machine. + * Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists and guest configuration, maintained by Microsoft. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly configMode?: AgentConfigurationMode; +} + +/** Describes properties that can identify extensions. */ +export interface ConfigurationExtension { /** - * The version of Operating System running on the hybrid machine. + * Publisher of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osVersion?: string; - /** The type of Operating System (windows/linux). */ - osType?: string; + readonly publisher?: string; /** - * Specifies the Arc Machine's unique SMBIOS ID + * Type of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmUuid?: string; - /** Machine Extensions information */ - extensions?: MachineExtensionInstanceView[]; + readonly type?: string; +} + +/** Reports the state and behavior of dependent services. */ +export interface ServiceStatuses { + /** The state of the extension service on the Arc-enabled machine. */ + extensionService?: ServiceStatus; + /** The state of the guest configuration service on the Arc-enabled machine. */ + guestConfigurationService?: ServiceStatus; +} + +/** Describes the status and behavior of a service. */ +export interface ServiceStatus { + /** The current status of the service. */ + status?: string; + /** The behavior of the service when the Arc-enabled machine starts up. */ + startupType?: string; +} + +/** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ +export interface CloudMetadata { /** - * Specifies the Operating System product SKU. + * Specifies the cloud provider (Azure/AWS/GCP...). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osSku?: string; + readonly provider?: string; +} + +/** The info w.r.t Agent Upgrade. */ +export interface AgentUpgrade { + /** Specifies the version info w.r.t AgentUpgrade for the machine. */ + desiredVersion?: string; + /** The correlation ID passed in from RSM per upgrade. */ + correlationId?: string; + /** Specifies if RSM should try to upgrade this machine */ + enableAutomaticUpgrade?: boolean; /** - * Specifies the Windows domain name. + * Specifies the version of the last attempt * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly domainName?: string; + readonly lastAttemptDesiredVersion?: string; /** - * Specifies the AD fully qualified display name. + * Timestamp of last upgrade attempt * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly adFqdn?: string; + readonly lastAttemptTimestamp?: string; /** - * Specifies the DNS fully qualified display name. + * Specifies the status of Agent Upgrade. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsFqdn?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** Specifies whether any MS SQL instance is discovered on the machine. */ - mssqlDiscovered?: string; + readonly lastAttemptStatus?: LastAttemptStatusEnum; /** - * Detected properties from the machine. + * Failure message of last upgrade attempt if any. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly detectedProperties?: { [propertyName: string]: string }; -} - -/** Metadata pertaining to the geographic location of the resource. */ -export interface LocationData { - /** A canonical name for the geographic or physical location. */ - name: string; - /** The city or locality where the resource is located. */ - city?: string; - /** The district, state, or province where the resource is located. */ - district?: string; - /** The country or region where the resource is located */ - countryOrRegion?: string; + readonly lastAttemptMessage?: string; } /** Specifies the operating system settings for the hybrid machine. */ @@ -182,13 +198,17 @@ export interface OSProfile { /** Specifies the windows configuration for update management. */ export interface OSProfileWindowsConfiguration { /** Specifies the assessment mode. */ - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + /** Specifies the patch mode. */ + patchMode?: PatchModeTypes; } /** Specifies the linux configuration for update management. */ export interface OSProfileLinuxConfiguration { /** Specifies the assessment mode. */ - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + /** Specifies the patch mode. */ + patchMode?: PatchModeTypes; } /** Describes the Machine Extension Instance View. */ @@ -217,20 +237,59 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -/** Identity for the resource. */ -export interface Identity { +/** Describes the network information on this machine. */ +export interface NetworkProfile { + /** The list of network interfaces. */ + networkInterfaces?: NetworkInterface[]; +} + +/** Describes a network interface. */ +export interface NetworkInterface { + /** The list of IP addresses in this interface. */ + ipAddresses?: IpAddress[]; +} + +/** Describes properties of the IP address. */ +export interface IpAddress { + /** Represents the IP Address. */ + address?: string; + /** Represents the Ip Address Version. */ + ipAddressVersion?: string; /** - * The principal ID of resource identity. + * The subnet to which this IP address belongs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly subnet?: Subnet; +} + +/** Describes the subnet. */ +export interface Subnet { + /** Represents address prefix. */ + addressPrefix?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The tenant ID of resource. + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** The identity type. */ - type?: "SystemAssigned"; + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; } /** Metadata pertaining to creation and last modification of the resource. */ @@ -249,74 +308,243 @@ export interface SystemData { lastModifiedAt?: Date; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { +/** Identity for the resource. */ +export interface Identity { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * The principal ID of resource identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly principalId?: string; /** - * The name of the resource + * The tenant ID of resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; +} + +/** Describes the properties of an AssessPatches result. */ +export interface MachineAssessPatchesResult { /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * 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 type?: string; -} - -/** 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; + 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; } -/** Describes the properties of a Machine Extension. */ -export interface MachineExtensionProperties { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; +/** Summarization of patches available for installation on the machine by classification. */ +export interface AvailablePatchCountByClassification { /** - * The provisioning state, which only appears in the response. + * Number of security patches available for installation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; - /** The machine extension instance view. */ - instanceView?: MachineExtensionInstanceView; + 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; } -/** 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; +/** 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; } /** The Update Resource model definition. */ @@ -333,7 +561,7 @@ export interface MachineExtensionsListResult { nextLink?: string; } -/** Describes the Machine Extension Upgrade Properties */ +/** Describes the Machine Extension Upgrade Properties. */ export interface MachineExtensionUpgrade { /** Describes the Extension Target Properties. */ extensionTargets?: { [propertyName: string]: ExtensionTargetProperties }; @@ -345,6 +573,15 @@ export interface ExtensionTargetProperties { targetVersion?: string; } +/** The List Extension Metadata response. */ +export interface ExtensionValueListResult { + /** + * The list of extension metadata + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ExtensionValue[]; +} + /** The List Compute Operation operation response. */ export interface OperationListResult { /** @@ -368,6 +605,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 +636,125 @@ 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 script sources for run command. */ +export interface MachineRunCommandScriptSource { + /** Specifies the script content to be executed on the machine. */ + script?: string; + /** Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. */ + scriptUri?: string; + /** Specifies the commandId of predefined built-in script. */ + commandId?: string; + /** User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. */ + scriptUriManagedIdentity?: RunCommandManagedIdentity; +} + +/** Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. */ +export interface RunCommandManagedIdentity { + /** Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. */ + clientId?: string; + /** Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. */ + objectId?: string; +} + +/** Describes the properties of a run command parameter. */ +export interface RunCommandInputParameter { + /** The run command parameter name. */ + name: string; + /** The run command parameter value. */ + value: string; +} + +/** Describes the Machine Extension Instance View. */ +export interface MachineRunCommandInstanceView { + /** The run command name. */ + name?: string; + /** Instance view status. */ + status?: MachineRunCommandInstanceViewStatus; +} + +/** Instance view status. */ +export interface MachineRunCommandInstanceViewStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: StatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; +} + +/** Describes the Run Commands List Result. */ +export interface MachineRunCommandsListResult { + /** The list of run commands */ + value?: MachineRunCommand[]; + /** The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. */ + nextLink?: string; +} + /** Describes the list of Azure Arc PrivateLinkScope resources. */ export interface HybridComputePrivateLinkScopeListResult { /** List of Azure Arc PrivateLinkScope definitions. */ @@ -455,6 +816,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 +958,6 @@ export interface ConnectionDetail { readonly memberName?: string; } -/** Describes the ARM updatable properties of a hybrid machine. */ -export interface MachineUpdateProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; -} - /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export interface TrackedResource extends Resource { /** Resource tags. */ @@ -617,74 +971,378 @@ export interface ProxyResource extends Resource {} /** Describes a Machine Extension Update. */ export interface MachineExtensionUpdate extends ResourceUpdate { - /** Describes Machine Extension Update Properties. */ - properties?: MachineExtensionUpdateProperties; + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; } +/** Describes a Machine Extension Update. */ +export interface MachineRunCommandUpdate extends ResourceUpdate {} + /** Describes a hybrid machine Update. */ export interface MachineUpdate extends ResourceUpdate { /** Identity for the resource. */ identity?: Identity; - /** Hybrid Compute Machine properties */ - properties?: MachineUpdateProperties; + /** Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. */ + kind?: PrivateCloudKind; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; + /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ + cloudMetadata?: CloudMetadata; + /** The info of the machine w.r.t Agent Upgrade */ + agentUpgrade?: AgentUpgrade; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; +} + +/** An Azure Arc PrivateLinkScope definition. */ +export interface HybridComputePrivateLinkScope + extends PrivateLinkScopesResource { + /** Properties that define a Azure Arc PrivateLinkScope resource. */ + properties?: HybridComputePrivateLinkScopeProperties; + /** + * 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; +} + +/** Describes a Machine Extension. */ +export interface MachineExtension extends TrackedResource { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The machine extension instance view. */ + instanceView?: MachineExtensionInstanceView; +} + +/** Describes a hybrid machine. */ +export interface Machine extends TrackedResource { + /** + * The list of extensions affiliated to the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resources?: MachineExtension[]; + /** Identity for the resource. */ + identity?: Identity; + /** Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. */ + kind?: PrivateCloudKind; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; + /** + * 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; + /** + * 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; } -/** An Azure Arc PrivateLinkScope definition. */ -export interface HybridComputePrivateLinkScope - extends PrivateLinkScopesResource { - /** Properties that define a Azure Arc PrivateLinkScope resource. */ - properties?: HybridComputePrivateLinkScopeProperties; +/** Describes a Run Command */ +export interface MachineRunCommand extends TrackedResource { + /** The source of the run command script. */ + source?: MachineRunCommandScriptSource; + /** The parameters used by the script. */ + parameters?: RunCommandInputParameter[]; + /** The parameters used by the script. */ + protectedParameters?: RunCommandInputParameter[]; + /** Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. */ + asyncExecution?: boolean; + /** Specifies the user account on the machine when executing the run command. */ + runAsUser?: string; + /** Specifies the user account password on the machine when executing the run command. */ + runAsPassword?: string; + /** The timeout in seconds to execute the run command. */ + timeoutInSeconds?: number; + /** Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. */ + outputBlobUri?: string; + /** Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. */ + errorBlobUri?: string; + /** User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + outputBlobManagedIdentity?: RunCommandManagedIdentity; + /** User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + errorBlobManagedIdentity?: RunCommandManagedIdentity; /** - * 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?: string; + /** + * The machine run command instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceView?: MachineRunCommandInstanceView; } -/** Describes a hybrid machine. */ -export interface Machine extends TrackedResource { - /** Hybrid Compute Machine properties */ - properties?: MachineProperties; - /** Identity for the resource. */ - identity?: Identity; +/** Describes a Extension Metadata */ +export interface ExtensionValue extends ProxyResource { /** - * The system meta data relating to this resource. + * The version of the Extension being received. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly version?: string; + /** + * The type of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly extensionType?: string; + /** + * The publisher of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publisher?: string; } -/** Describes a Machine Extension. */ -export interface MachineExtension extends TrackedResource { - /** Describes Machine Extension Properties. */ - properties?: MachineExtensionProperties; +/** Defines the HybridIdentityMetadata. */ +export interface HybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + vmId?: string; + /** The Public Key. */ + publicKey?: string; /** - * The system meta data relating to this resource. + * Identity for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly identity?: Identity; } /** A private link resource */ export interface PrivateLinkResource extends ProxyResource { /** Resource properties. */ properties?: PrivateLinkResourceProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; } /** A private endpoint connection */ export interface PrivateEndpointConnection extends ProxyResource { /** Resource properties. */ properties?: PrivateEndpointConnectionProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; +} + +/** Defines headers for 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 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 MachineRunCommands_createOrUpdate operation. */ +export interface MachineRunCommandsCreateOrUpdateHeaders { + /** 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 MachineRunCommands_update operation. */ +export interface MachineRunCommandsUpdateHeaders { + /** 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 MachineRunCommands_delete operation. */ +export interface MachineRunCommandsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for PrivateLinkScopes_delete operation. */ +export interface PrivateLinkScopesDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for PrivateEndpointConnections_delete operation. */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; } /** Known values of {@link InstanceViewTypes} that the service accepts. */ @@ -702,6 +1360,84 @@ export enum KnownInstanceViewTypes { */ export type InstanceViewTypes = string; +/** Known values of {@link AgentConfigurationMode} that the service accepts. */ +export enum KnownAgentConfigurationMode { + /** Full */ + Full = "full", + /** Monitor */ + Monitor = "monitor" +} + +/** + * Defines values for AgentConfigurationMode. \ + * {@link KnownAgentConfigurationMode} can be used interchangeably with AgentConfigurationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **full** \ + * **monitor** + */ +export type AgentConfigurationMode = string; + +/** Known values of {@link LastAttemptStatusEnum} that the service accepts. */ +export enum KnownLastAttemptStatusEnum { + /** Success */ + Success = "Success", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for LastAttemptStatusEnum. \ + * {@link KnownLastAttemptStatusEnum} can be used interchangeably with LastAttemptStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Success** \ + * **Failed** + */ +export type LastAttemptStatusEnum = string; + +/** Known values of {@link AssessmentModeTypes} that the service accepts. */ +export enum KnownAssessmentModeTypes { + /** ImageDefault */ + ImageDefault = "ImageDefault", + /** AutomaticByPlatform */ + AutomaticByPlatform = "AutomaticByPlatform" +} + +/** + * Defines values for AssessmentModeTypes. \ + * {@link KnownAssessmentModeTypes} can be used interchangeably with AssessmentModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** + */ +export type AssessmentModeTypes = string; + +/** Known values of {@link PatchModeTypes} that the service accepts. */ +export enum KnownPatchModeTypes { + /** ImageDefault */ + ImageDefault = "ImageDefault", + /** AutomaticByPlatform */ + AutomaticByPlatform = "AutomaticByPlatform", + /** AutomaticByOS */ + AutomaticByOS = "AutomaticByOS", + /** Manual */ + Manual = "Manual" +} + +/** + * Defines values for PatchModeTypes. \ + * {@link KnownPatchModeTypes} can be used interchangeably with PatchModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** \ + * **AutomaticByOS** \ + * **Manual** + */ +export type PatchModeTypes = string; + /** Known values of {@link StatusTypes} that the service accepts. */ export enum KnownStatusTypes { /** Connected */ @@ -768,6 +1504,231 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link PrivateCloudKind} that the service accepts. */ +export enum KnownPrivateCloudKind { + /** AVS */ + AVS = "AVS", + /** HCI */ + HCI = "HCI", + /** Scvmm */ + Scvmm = "SCVMM", + /** VMware */ + VMware = "VMware" +} + +/** + * Defines values for PrivateCloudKind. \ + * {@link KnownPrivateCloudKind} can be used interchangeably with PrivateCloudKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AVS** \ + * **HCI** \ + * **SCVMM** \ + * **VMware** + */ +export type PrivateCloudKind = string; + +/** Known values of {@link 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", + /** Platform */ + Platform = "Platform" +} + +/** + * 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** \ + * **Platform** + */ +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 { /** Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and private endpoints. */ @@ -799,6 +1760,30 @@ 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 {} @@ -879,10 +1864,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 +1878,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 +1899,105 @@ 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 MachineRunCommandsCreateOrUpdateOptionalParams + 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 MachineRunCommandsCreateOrUpdateResponse = MachineRunCommand; + +/** Optional parameters. */ +export interface MachineRunCommandsUpdateOptionalParams + 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 MachineRunCommandsUpdateResponse = MachineRunCommand; + +/** Optional parameters. */ +export interface MachineRunCommandsDeleteOptionalParams + 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 MachineRunCommandsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MachineRunCommandsGetResponse = MachineRunCommand; + +/** Optional parameters. */ +export interface MachineRunCommandsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} + +/** Contains response data for the list operation. */ +export type MachineRunCommandsListResponse = MachineRunCommandsListResult; + +/** Optional parameters. */ +export interface MachineRunCommandsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MachineRunCommandsListNextResponse = MachineRunCommandsListResult; + /** 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..9896a55d489c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -104,218 +104,260 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const MachineProperties: coreClient.CompositeMapper = { +export const LocationData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineProperties", + className: "LocationData", modelProperties: { - locationData: { - serializedName: "locationData", + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, type: { - name: "Composite", - className: "LocationData" + name: "String" } }, - osProfile: { - serializedName: "osProfile", + city: { + serializedName: "city", type: { - name: "Composite", - className: "OSProfile" + name: "String" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + district: { + serializedName: "district", type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + countryOrRegion: { + serializedName: "countryOrRegion", type: { name: "String" } - }, - lastStatusChange: { - serializedName: "lastStatusChange", + } + } + } +}; + +export const AgentConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentConfiguration", + modelProperties: { + proxyUrl: { + serializedName: "proxyUrl", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + incomingConnectionsPorts: { + serializedName: "incomingConnectionsPorts", readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ErrorDetail" + name: "String" } } } }, - agentVersion: { - serializedName: "agentVersion", + extensionsAllowList: { + serializedName: "extensionsAllowList", readOnly: true, type: { - name: "String" - } - }, - vmId: { - serializedName: "vmId", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - displayName: { - serializedName: "displayName", + extensionsBlockList: { + serializedName: "extensionsBlockList", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - machineFqdn: { - serializedName: "machineFqdn", + proxyBypass: { + serializedName: "proxyBypass", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - clientPublicKey: { - serializedName: "clientPublicKey", + extensionsEnabled: { + serializedName: "extensionsEnabled", + readOnly: true, type: { name: "String" } }, - osName: { - serializedName: "osName", + guestConfigurationEnabled: { + serializedName: "guestConfigurationEnabled", readOnly: true, type: { name: "String" } }, - osVersion: { - serializedName: "osVersion", + configMode: { + serializedName: "configMode", readOnly: true, type: { name: "String" } - }, - osType: { - serializedName: "osType", + } + } + } +}; + +export const ConfigurationExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationExtension", + modelProperties: { + publisher: { + serializedName: "publisher", + readOnly: true, type: { name: "String" } }, - vmUuid: { - serializedName: "vmUuid", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } - }, - extensions: { - serializedName: "extensions", + } + } + } +}; + +export const ServiceStatuses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatuses", + modelProperties: { + extensionService: { + serializedName: "extensionService", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MachineExtensionInstanceView" - } - } + name: "Composite", + className: "ServiceStatus" } }, - osSku: { - serializedName: "osSku", - readOnly: true, + guestConfigurationService: { + serializedName: "guestConfigurationService", type: { - name: "String" + name: "Composite", + className: "ServiceStatus" } - }, - domainName: { - serializedName: "domainName", - readOnly: true, + } + } + } +}; + +export const ServiceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatus", + modelProperties: { + status: { + serializedName: "status", type: { name: "String" } }, - adFqdn: { - serializedName: "adFqdn", - readOnly: true, + startupType: { + serializedName: "startupType", type: { name: "String" } - }, - dnsFqdn: { - serializedName: "dnsFqdn", + } + } + } +}; + +export const CloudMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudMetadata", + modelProperties: { + provider: { + serializedName: "provider", readOnly: true, type: { name: "String" } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + } + } + } +}; + +export const AgentUpgrade: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentUpgrade", + modelProperties: { + desiredVersion: { + serializedName: "desiredVersion", type: { name: "String" } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + correlationId: { + serializedName: "correlationId", type: { name: "String" } }, - mssqlDiscovered: { - serializedName: "mssqlDiscovered", + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", type: { - name: "String" + name: "Boolean" } }, - detectedProperties: { - serializedName: "detectedProperties", + lastAttemptDesiredVersion: { + serializedName: "lastAttemptDesiredVersion", readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const LocationData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocationData", - modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, type: { name: "String" } }, - city: { - serializedName: "city", + lastAttemptTimestamp: { + serializedName: "lastAttemptTimestamp", + readOnly: true, type: { name: "String" } }, - district: { - serializedName: "district", + lastAttemptStatus: { + serializedName: "lastAttemptStatus", + readOnly: true, type: { name: "String" } }, - countryOrRegion: { - serializedName: "countryOrRegion", + lastAttemptMessage: { + serializedName: "lastAttemptMessage", + readOnly: true, type: { name: "String" } @@ -364,6 +406,12 @@ export const OSProfileWindowsConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -379,6 +427,12 @@ export const OSProfileLinuxConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -457,76 +511,85 @@ export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { } }; -export const Identity: coreClient.CompositeMapper = { +export const NetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Identity", + className: "NetworkProfile", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + networkInterfaces: { + serializedName: "networkInterfaces", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterface" + } + } } - }, - type: { - defaultValue: "SystemAssigned", - isConstant: true, - serializedName: "type", + } + } + } +}; + +export const NetworkInterface: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterface", + modelProperties: { + ipAddresses: { + serializedName: "ipAddresses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddress" + } + } } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const IpAddress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "IpAddress", modelProperties: { - createdBy: { - serializedName: "createdBy", + address: { + serializedName: "address", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + ipAddressVersion: { + serializedName: "ipAddressVersion", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + subnet: { + serializedName: "subnet", type: { - name: "String" + name: "Composite", + className: "Subnet" } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + } + } + } +}; + +export const Subnet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Subnet", + modelProperties: { + addressPrefix: { + serializedName: "addressPrefix", type: { - name: "DateTime" + name: "String" } } } @@ -558,454 +621,512 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const MachineListResult: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineListResult", + className: "SystemData", modelProperties: { - value: { - serializedName: "value", - required: true, + createdBy: { + serializedName: "createdBy", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Machine" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + 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 MachineExtensionProperties: coreClient.CompositeMapper = { +export const Identity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionProperties", + 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" } + } + } + } +}; + +export const MachineAssessPatchesResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineAssessPatchesResult", + modelProperties: { + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + assessmentActivityId: { + serializedName: "assessmentActivityId", + readOnly: true, type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", + rebootPending: { + serializedName: "rebootPending", + readOnly: true, type: { name: "Boolean" } }, - settings: { - serializedName: "settings", + availablePatchCountByClassification: { + serializedName: "availablePatchCountByClassification", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Composite", + className: "AvailablePatchCountByClassification" } }, - protectedSettings: { - serializedName: "protectedSettings", + startDateTime: { + serializedName: "startDateTime", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "DateTime" } }, - provisioningState: { - serializedName: "provisioningState", + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + startedBy: { + serializedName: "startedBy", readOnly: true, type: { name: "String" } }, - instanceView: { - serializedName: "instanceView", + patchServiceUsed: { + serializedName: "patchServiceUsed", + readOnly: true, + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", + readOnly: true, + type: { + name: "String" + } + }, + errorDetails: { + serializedName: "errorDetails", type: { name: "Composite", - className: "MachineExtensionInstanceView" + className: "ErrorDetail" } } } } }; -export const MachineExtensionUpdateProperties: coreClient.CompositeMapper = { +export const AvailablePatchCountByClassification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdateProperties", + className: "AvailablePatchCountByClassification", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", + security: { + serializedName: "security", + readOnly: true, type: { - name: "String" + name: "Number" } }, - publisher: { - serializedName: "publisher", + critical: { + serializedName: "critical", + readOnly: true, type: { - name: "String" + name: "Number" } }, - type: { - serializedName: "type", + definition: { + serializedName: "definition", + readOnly: true, type: { - name: "String" + name: "Number" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + updateRollup: { + serializedName: "updateRollup", + readOnly: true, type: { - name: "String" + name: "Number" } }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", + featurePack: { + serializedName: "featurePack", + readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - settings: { - serializedName: "settings", + servicePack: { + serializedName: "servicePack", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } }, - protectedSettings: { - serializedName: "protectedSettings", + tools: { + serializedName: "tools", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" + } + }, + updates: { + serializedName: "updates", + readOnly: true, + type: { + name: "Number" + } + }, + other: { + serializedName: "other", + readOnly: true, + type: { + name: "Number" } } } } }; -export const ResourceUpdate: coreClient.CompositeMapper = { +export const MachineInstallPatchesParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceUpdate", + className: "MachineInstallPatchesParameters", modelProperties: { - tags: { - serializedName: "tags", + maximumDuration: { + serializedName: "maximumDuration", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + rebootSetting: { + serializedName: "rebootSetting", + required: true, + type: { + name: "String" + } + }, + windowsParameters: { + serializedName: "windowsParameters", + type: { + name: "Composite", + className: "WindowsParameters" + } + }, + linuxParameters: { + serializedName: "linuxParameters", + type: { + name: "Composite", + className: "LinuxParameters" } } } } }; -export const MachineExtensionsListResult: coreClient.CompositeMapper = { +export const WindowsParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionsListResult", + className: "WindowsParameters", modelProperties: { - value: { - serializedName: "value", + classificationsToInclude: { + serializedName: "classificationsToInclude", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "MachineExtension" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", + kbNumbersToInclude: { + serializedName: "kbNumbersToInclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const MachineExtensionUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtensionUpgrade", - modelProperties: { - extensionTargets: { - serializedName: "extensionTargets", + }, + kbNumbersToExclude: { + serializedName: "kbNumbersToExclude", type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ExtensionTargetProperties" } + name: "Sequence", + element: { + type: { + name: "String" + } } } - } - } - } -}; - -export const ExtensionTargetProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtensionTargetProperties", - modelProperties: { - targetVersion: { - serializedName: "targetVersion", + }, + excludeKbsRequiringReboot: { + serializedName: "excludeKbsRequiringReboot", type: { - name: "String" + name: "Boolean" + } + }, + maxPatchPublishDate: { + serializedName: "maxPatchPublishDate", + type: { + name: "DateTime" } } } } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const LinuxParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "LinuxParameters", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + classificationsToInclude: { + serializedName: "classificationsToInclude", 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", - readOnly: true, - type: { - name: "String" - } }, - name: { - serializedName: "name", - readOnly: true, + packageNameMasksToInclude: { + serializedName: "packageNameMasksToInclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - display: { - serializedName: "display", + packageNameMasksToExclude: { + serializedName: "packageNameMasksToExclude", type: { - name: "Composite", - className: "OperationValueDisplay" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const OperationValueDisplay: coreClient.CompositeMapper = { +export const MachineInstallPatchesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationValueDisplay", + className: "MachineInstallPatchesResult", modelProperties: { - operation: { - serializedName: "operation", + status: { + serializedName: "status", readOnly: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + installationActivityId: { + serializedName: "installationActivityId", readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", + rebootStatus: { + serializedName: "rebootStatus", readOnly: true, type: { name: "String" } }, - provider: { - serializedName: "provider", + maintenanceWindowExceeded: { + serializedName: "maintenanceWindowExceeded", readOnly: true, type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + excludedPatchCount: { + serializedName: "excludedPatchCount", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScope" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + notSelectedPatchCount: { + serializedName: "notSelectedPatchCount", + readOnly: true, type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const HybridComputePrivateLinkScopeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeProperties", - modelProperties: { - publicNetworkAccess: { - defaultValue: "Disabled", - serializedName: "publicNetworkAccess", + }, + pendingPatchCount: { + serializedName: "pendingPatchCount", + readOnly: true, type: { - name: "String" + name: "Number" } }, - provisioningState: { - serializedName: "provisioningState", + installedPatchCount: { + serializedName: "installedPatchCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - privateLinkScopeId: { - serializedName: "privateLinkScopeId", + failedPatchCount: { + serializedName: "failedPatchCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", + startDateTime: { + serializedName: "startDateTime", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnectionDataModel" - } - } + name: "DateTime" } - } - } - } -}; - -export const PrivateEndpointConnectionDataModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionDataModel", - modelProperties: { - id: { - serializedName: "id", + }, + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + startedBy: { + serializedName: "startedBy", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + patchServiceUsed: { + serializedName: "patchServiceUsed", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + osType: { + serializedName: "osType", readOnly: true, type: { name: "String" } }, - properties: { - serializedName: "properties", + errorDetails: { + serializedName: "errorDetails", type: { name: "Composite", - className: "PrivateEndpointConnectionProperties" + className: "ErrorDetail" } } } } }; -export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { +export const MachineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionProperties", + className: "MachineListResult", modelProperties: { - privateEndpoint: { - serializedName: "privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpointProperty" - } - }, - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Machine" + } + } } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -1014,43 +1135,41 @@ export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { } }; -export const PrivateEndpointProperty: coreClient.CompositeMapper = { +export const ResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointProperty", + className: "ResourceUpdate", modelProperties: { - id: { - serializedName: "id", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { +export const MachineExtensionsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", + className: "MachineExtensionsListResult", modelProperties: { - status: { - serializedName: "status", - required: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - required: true, + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } } }, - actionsRequired: { - serializedName: "actionsRequired", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -1059,70 +1178,43 @@ export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapp } }; -export const PrivateLinkScopesResource: coreClient.CompositeMapper = { +export const MachineExtensionUpgrade: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkScopesResource", + className: "MachineExtensionUpgrade", 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", + extensionTargets: { + serializedName: "extensionTargets", type: { name: "Dictionary", - value: { type: { name: "String" } } + value: { + type: { name: "Composite", className: "ExtensionTargetProperties" } + } } } } } }; -export const TagsResource: coreClient.CompositeMapper = { +export const ExtensionTargetProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsResource", + className: "ExtensionTargetProperties", modelProperties: { - tags: { - serializedName: "tags", + targetVersion: { + serializedName: "targetVersion", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } } } } }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const ExtensionValueListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "ExtensionValueListResult", modelProperties: { value: { serializedName: "value", @@ -1132,197 +1224,1580 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "ExtensionValue" + } + } + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + 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 PrivateLinkResourceProperties: coreClient.CompositeMapper = { +export const OperationValueDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceProperties", + className: "OperationValueDisplay", modelProperties: { - groupId: { - serializedName: "groupId", + operation: { + serializedName: "operation", readOnly: true, type: { name: "String" } }, - requiredMembers: { - serializedName: "requiredMembers", + 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: "String" + name: "Composite", + className: "HybridIdentityMetadata" } } } - }, - requiredZoneNames: { - serializedName: "requiredZoneNames", - readOnly: true, + } + } + } +}; + +export const AgentVersionsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentVersionsList", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "AgentVersion" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const AgentVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "AgentVersion", modelProperties: { - value: { - serializedName: "value", + 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: "PrivateEndpointConnection" + className: "ErrorDetailAutoGenerated" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" } } } + } + } + } +}; + +export const MachineRunCommandScriptSource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandScriptSource", + modelProperties: { + script: { + serializedName: "script", + type: { + name: "String" + } + }, + scriptUri: { + serializedName: "scriptUri", + type: { + name: "String" + } + }, + commandId: { + serializedName: "commandId", + type: { + name: "String" + } + }, + scriptUriManagedIdentity: { + serializedName: "scriptUriManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity" + } + } + } + } +}; + +export const RunCommandManagedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandManagedIdentity", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + objectId: { + serializedName: "objectId", + type: { + name: "String" + } + } + } + } +}; + +export const RunCommandInputParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandInputParameter", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const MachineRunCommandInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandInstanceView", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "MachineRunCommandInstanceViewStatus" + } + } + } + } +}; + +export const MachineRunCommandInstanceViewStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandInstanceViewStatus", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + level: { + serializedName: "level", + type: { + name: "String" + } + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + } + } + } +}; + +export const MachineRunCommandsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineRunCommand" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +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 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 MachineRunCommandUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties + } + } +}; + +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 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 MachineExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtension", + modelProperties: { + ...TrackedResource.type.modelProperties, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", + type: { + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", + type: { + name: "String" + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "MachineExtensionInstanceView" + } + } + } + } +}; + +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" + } + }, + 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 MachineRunCommand: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommand", + modelProperties: { + ...TrackedResource.type.modelProperties, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "MachineRunCommandScriptSource" + } + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + protectedParameters: { + serializedName: "properties.protectedParameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + asyncExecution: { + defaultValue: false, + serializedName: "properties.asyncExecution", + type: { + name: "Boolean" + } + }, + runAsUser: { + serializedName: "properties.runAsUser", + type: { + name: "String" + } + }, + runAsPassword: { + serializedName: "properties.runAsPassword", + type: { + name: "String" + } + }, + timeoutInSeconds: { + serializedName: "properties.timeoutInSeconds", + type: { + name: "Number" + } + }, + outputBlobUri: { + serializedName: "properties.outputBlobUri", + type: { + name: "String" + } + }, + errorBlobUri: { + serializedName: "properties.errorBlobUri", + type: { + name: "String" + } + }, + outputBlobManagedIdentity: { + serializedName: "properties.outputBlobManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity" + } }, - nextLink: { - serializedName: "nextLink", + errorBlobManagedIdentity: { + serializedName: "properties.errorBlobManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "MachineRunCommandInstanceView" + } } } } }; -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, - type: { - name: "String" - } - }, - linkIdentifier: { - serializedName: "linkIdentifier", - readOnly: true, + ...ProxyResource.type.modelProperties, + vmId: { + serializedName: "properties.vmId", type: { name: "String" } }, - groupId: { - serializedName: "groupId", - readOnly: true, + publicKey: { + serializedName: "properties.publicKey", type: { name: "String" } }, - memberName: { - serializedName: "memberName", - readOnly: true, + identity: { + serializedName: "properties.identity", type: { - name: "String" + name: "Composite", + className: "Identity" } } } } }; -export const MachineUpdateProperties: coreClient.CompositeMapper = { +export const PrivateLinkResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineUpdateProperties", + className: "PrivateLinkResource", modelProperties: { - locationData: { - serializedName: "locationData", + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "LocationData" + className: "PrivateLinkResourceProperties" } - }, - osProfile: { - serializedName: "osProfile", + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "OSProfile" - } - }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", - type: { - name: "String" + className: "PrivateEndpointConnectionProperties" } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + } + } + } +}; + +export const MachinesAssessPatchesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachinesAssessPatchesHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } @@ -1331,22 +2806,13 @@ export const MachineUpdateProperties: coreClient.CompositeMapper = { } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const MachinesInstallPatchesHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "MachinesInstallPatchesHeaders", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, location: { serializedName: "location", - required: true, type: { name: "String" } @@ -1355,178 +2821,216 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const MachineExtensionsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "MachineExtensionsUpdateHeaders", 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 MachineExtensionsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdate", + className: "MachineExtensionsDeleteHeaders", 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 HybridComputeManagementClientUpgradeExtensionsHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineUpdate", + className: "HybridComputeManagementClientUpgradeExtensionsHeaders", 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 MachineRunCommandsCreateOrUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridComputePrivateLinkScope", + className: "MachineRunCommandsCreateOrUpdateHeaders", 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 MachineRunCommandsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Machine", + className: "MachineRunCommandsUpdateHeaders", 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 MachineRunCommandsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtension", + className: "MachineRunCommandsDeleteHeaders", 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..c7d2df97da57 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -12,9 +12,12 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + MachineInstallPatchesParameters as MachineInstallPatchesParametersMapper, MachineExtension as MachineExtensionMapper, MachineExtensionUpdate as MachineExtensionUpdateMapper, MachineExtensionUpgrade as MachineExtensionUpgradeMapper, + MachineRunCommand as MachineRunCommandMapper, + MachineRunCommandUpdate as MachineRunCommandUpdateMapper, HybridComputePrivateLinkScope as HybridComputePrivateLinkScopeMapper, TagsResource as TagsResourceMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper @@ -47,7 +50,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-10-preview", + defaultValue: "2023-04-25-preview", isConstant: true, serializedName: "api-version", type: { @@ -88,6 +91,11 @@ export const resourceGroupName: OperationURLParameter = { export const machineName: OperationURLParameter = { parameterPath: "machineName", mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, serializedName: "machineName", required: true, type: { @@ -106,16 +114,26 @@ 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 name: OperationURLParameter = { + parameterPath: "name", + mapper: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } }; export const contentType: OperationParameter = { @@ -130,6 +148,23 @@ export const contentType: OperationParameter = { } }; +export const installPatchesInput: OperationParameter = { + parameterPath: "installPatchesInput", + mapper: MachineInstallPatchesParametersMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + export const extensionParameters: OperationParameter = { parameterPath: "extensionParameters", mapper: MachineExtensionMapper @@ -166,6 +201,113 @@ export const extensionUpgradeParameters: OperationParameter = { mapper: MachineExtensionUpgradeMapper }; +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const publisher: OperationURLParameter = { + parameterPath: "publisher", + mapper: { + serializedName: "publisher", + required: true, + type: { + name: "String" + } + } +}; + +export const extensionType: OperationURLParameter = { + parameterPath: "extensionType", + mapper: { + serializedName: "extensionType", + required: true, + type: { + name: "String" + } + } +}; + +export const version: OperationURLParameter = { + parameterPath: "version", + mapper: { + serializedName: "version", + required: true, + type: { + name: "String" + } + } +}; + +export const metadataName: OperationURLParameter = { + parameterPath: "metadataName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]") + }, + serializedName: "metadataName", + required: true, + type: { + name: "String" + } + } +}; + +export const osType: OperationURLParameter = { + parameterPath: "osType", + mapper: { + serializedName: "osType", + required: true, + type: { + name: "String" + } + } +}; + +export const runCommandProperties: OperationParameter = { + parameterPath: "runCommandProperties", + mapper: MachineRunCommandMapper +}; + +export const machineName1: OperationURLParameter = { + parameterPath: "machineName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]") + }, + serializedName: "machineName", + required: true, + type: { + name: "String" + } + } +}; + +export const runCommandName: OperationURLParameter = { + parameterPath: "runCommandName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]") + }, + serializedName: "runCommandName", + required: true, + type: { + name: "String" + } + } +}; + +export const runCommandProperties1: OperationParameter = { + parameterPath: "runCommandProperties", + mapper: MachineRunCommandUpdateMapper +}; + export const scopeName: OperationURLParameter = { parameterPath: "scopeName", mapper: { @@ -187,7 +329,7 @@ export const privateLinkScopeTags: OperationParameter = { mapper: TagsResourceMapper }; -export const location: OperationURLParameter = { +export const location1: OperationURLParameter = { parameterPath: "location", mapper: { constraints: { @@ -212,7 +354,7 @@ export const privateLinkScopeId: OperationURLParameter = { } }; -export const machineName1: OperationURLParameter = { +export const machineName2: OperationURLParameter = { parameterPath: "machineName", mapper: { constraints: { diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts new file mode 100644 index 000000000000..530e78500e4e --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/agentVersionOperations.ts @@ -0,0 +1,101 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { AgentVersionOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + AgentVersionListOptionalParams, + AgentVersionListResponse, + AgentVersionGetOptionalParams, + AgentVersionGetResponse +} from "../models"; + +/** Class containing AgentVersionOperations operations. */ +export class AgentVersionOperationsImpl implements AgentVersionOperations { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class AgentVersionOperations class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all Agent Versions along with the download link currently present. + * @param osType Defines the os type. + * @param options The options parameters. + */ + list( + osType: string, + options?: AgentVersionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { osType, options }, + listOperationSpec + ); + } + + /** + * Gets an Agent Version along with the download link currently present. + * @param osType Defines the os type + * @param version Defines the agent version. To get latest, use latest or else a specific agent + * version. + * @param options The options parameters. + */ + get( + osType: string, + version: string, + options?: AgentVersionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { osType, version, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AgentVersionsList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.osType], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AgentVersion + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.version, Parameters.osType], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts new file mode 100644 index 000000000000..637b6f7d6f40 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts @@ -0,0 +1,194 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ExtensionMetadata } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataListResponse, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse +} from "../models"; + +/// +/** Class containing ExtensionMetadata operations. */ +export class ExtensionMetadataImpl implements ExtensionMetadata { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class ExtensionMetadata class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + public list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + location, + publisher, + extensionType, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + location, + publisher, + extensionType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: ExtensionMetadataListResponse; + result = await this._list(location, publisher, extensionType, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + publisher, + extensionType, + options + )) { + yield* page; + } + } + + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, version, options }, + getOperationSpec + ); + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + private _list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValue + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisher, + Parameters.extensionType, + Parameters.version + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValueListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisher, + Parameters.extensionType + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts new file mode 100644 index 000000000000..03244cd37b88 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/hybridIdentityMetadataOperations.ts @@ -0,0 +1,247 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { HybridIdentityMetadataOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + HybridIdentityMetadata, + HybridIdentityMetadataListByMachinesNextOptionalParams, + HybridIdentityMetadataListByMachinesOptionalParams, + HybridIdentityMetadataListByMachinesResponse, + HybridIdentityMetadataGetOptionalParams, + HybridIdentityMetadataGetResponse, + HybridIdentityMetadataListByMachinesNextResponse +} from "../models"; + +/// +/** Class containing HybridIdentityMetadataOperations operations. */ +export class HybridIdentityMetadataOperationsImpl + implements HybridIdentityMetadataOperations { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class HybridIdentityMetadataOperations class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Returns the list of HybridIdentityMetadata of the given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + public listByMachines( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByMachinesPagingAll( + resourceGroupName, + machineName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByMachinesPagingPage( + resourceGroupName, + machineName, + options, + settings + ); + } + }; + } + + private async *listByMachinesPagingPage( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: HybridIdentityMetadataListByMachinesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMachines( + resourceGroupName, + machineName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByMachinesNext( + resourceGroupName, + machineName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByMachinesPagingAll( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByMachinesPagingPage( + resourceGroupName, + machineName, + options + )) { + yield* page; + } + } + + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param metadataName Name of the HybridIdentityMetadata. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + metadataName: string, + options?: HybridIdentityMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, metadataName, options }, + getOperationSpec + ); + } + + /** + * Returns the list of HybridIdentityMetadata of the given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + private _listByMachines( + resourceGroupName: string, + machineName: string, + options?: HybridIdentityMetadataListByMachinesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + listByMachinesOperationSpec + ); + } + + /** + * ListByMachinesNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param nextLink The nextLink from the previous successful call to the ListByMachines method. + * @param options The options parameters. + */ + private _listByMachinesNext( + resourceGroupName: string, + machineName: string, + nextLink: string, + options?: HybridIdentityMetadataListByMachinesNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, nextLink, options }, + listByMachinesNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata/{metadataName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadata + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName, + Parameters.metadataName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByMachinesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByMachinesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index f8024e8bc5a1..48754dd54f0c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -8,7 +8,12 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; +export * from "./networkProfileOperations"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./agentVersionOperations"; +export * from "./machineRunCommands"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index eebebbcb00e7..ee82b13295cd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MachineExtension, MachineExtensionsListNextOptionalParams, @@ -135,8 +139,8 @@ export class MachineExtensionsImpl implements MachineExtensions { extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsCreateOrUpdateResponse > > { @@ -146,7 +150,7 @@ export class MachineExtensionsImpl implements MachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -179,19 +183,22 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MachineExtensionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -238,8 +245,8 @@ export class MachineExtensionsImpl implements MachineExtensions { extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsUpdateResponse > > { @@ -249,7 +256,7 @@ export class MachineExtensionsImpl implements MachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -282,19 +289,22 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + MachineExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -338,14 +348,14 @@ export class MachineExtensionsImpl implements MachineExtensions { machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -378,13 +388,13 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, machineName, extensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -619,7 +629,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts new file mode 100644 index 000000000000..fe453ee58344 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts @@ -0,0 +1,606 @@ +/* + * 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 { MachineRunCommands } 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 { + MachineRunCommand, + MachineRunCommandsListNextOptionalParams, + MachineRunCommandsListOptionalParams, + MachineRunCommandsListResponse, + MachineRunCommandsCreateOrUpdateOptionalParams, + MachineRunCommandsCreateOrUpdateResponse, + MachineRunCommandUpdate, + MachineRunCommandsUpdateOptionalParams, + MachineRunCommandsUpdateResponse, + MachineRunCommandsDeleteOptionalParams, + MachineRunCommandsGetOptionalParams, + MachineRunCommandsGetResponse, + MachineRunCommandsListNextResponse +} from "../models"; + +/// +/** Class containing MachineRunCommands operations. */ +export class MachineRunCommandsImpl implements MachineRunCommands { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class MachineRunCommands class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * The operation to get all the run commands of a non-Azure machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: MachineRunCommandsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(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.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: MachineRunCommandsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: MachineRunCommandsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: MachineRunCommandsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsCreateOrUpdateResponse + > + > { + 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, + runCommandName, + runCommandProperties, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MachineRunCommandsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + runCommandName, + runCommandProperties, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommandUpdate, + options?: MachineRunCommandsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsUpdateResponse + > + > { + 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, + runCommandName, + runCommandProperties, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + MachineRunCommandsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommandUpdate, + options?: MachineRunCommandsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + runCommandName, + runCommandProperties, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams + ): 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, runCommandName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + runCommandName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to get a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + runCommandName: string, + options?: MachineRunCommandsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, runCommandName, options }, + getOperationSpec + ); + } + + /** + * The operation to get all the run commands of a non-Azure machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: MachineRunCommandsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: MachineRunCommandsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, 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}/runCommands/{runCommandName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommand + }, + 201: { + bodyMapper: Mappers.MachineRunCommand + }, + 202: { + bodyMapper: Mappers.MachineRunCommand + }, + 204: { + bodyMapper: Mappers.MachineRunCommand + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.runCommandProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommand + }, + 201: { + bodyMapper: Mappers.MachineRunCommand + }, + 202: { + bodyMapper: Mappers.MachineRunCommand + }, + 204: { + bodyMapper: Mappers.MachineRunCommand + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.runCommandProperties1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommand + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommandsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommandsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.machineName1 + ], + 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..36759efb5903 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.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines", @@ -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..f612107a6912 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams, @@ -160,8 +164,8 @@ export class PrivateEndpointConnectionsImpl parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > > { @@ -171,7 +175,7 @@ export class PrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -204,19 +208,22 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -260,14 +267,14 @@ export class PrivateEndpointConnectionsImpl scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,13 +307,18 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, scopeName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + scopeName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,7 +500,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts index c58e1dc77baa..762e9cb1b6d2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts @@ -234,7 +234,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts index 8c7b8cc9f9b1..096ad2bda612 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { HybridComputePrivateLinkScope, PrivateLinkScopesListNextOptionalParams, @@ -210,14 +214,14 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -250,13 +254,13 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, scopeName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, scopeName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -559,7 +563,7 @@ const getValidationDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location, + Parameters.location1, Parameters.privateLinkScopeId ], headerParameters: [Parameters.accept], @@ -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..48754dd54f0c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -8,7 +8,12 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; +export * from "./networkProfileOperations"; +export * from "./hybridIdentityMetadataOperations"; +export * from "./agentVersionOperations"; +export * from "./machineRunCommands"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts index 0aae932d1c04..426ece06c8da 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MachineExtension, MachineExtensionsListOptionalParams, @@ -50,8 +50,8 @@ export interface MachineExtensions { extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsCreateOrUpdateResponse > >; @@ -85,8 +85,8 @@ export interface MachineExtensions { extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsUpdateResponse > >; @@ -117,7 +117,7 @@ export interface MachineExtensions { machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts new file mode 100644 index 000000000000..b66a96498622 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts @@ -0,0 +1,131 @@ +/* + * 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 { + MachineRunCommand, + MachineRunCommandsListOptionalParams, + MachineRunCommandsCreateOrUpdateOptionalParams, + MachineRunCommandsCreateOrUpdateResponse, + MachineRunCommandUpdate, + MachineRunCommandsUpdateOptionalParams, + MachineRunCommandsUpdateResponse, + MachineRunCommandsDeleteOptionalParams, + MachineRunCommandsGetOptionalParams, + MachineRunCommandsGetResponse +} from "../models"; + +/// +/** Interface representing a MachineRunCommands. */ +export interface MachineRunCommands { + /** + * The operation to get all the run commands of a non-Azure machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: MachineRunCommandsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommandUpdate, + options?: MachineRunCommandsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsUpdateResponse + > + >; + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + runCommandName: string, + runCommandProperties: MachineRunCommandUpdate, + options?: MachineRunCommandsUpdateOptionalParams + ): Promise; + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams + ): Promise; + /** + * The operation to get a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + runCommandName: string, + options?: MachineRunCommandsGetOptionalParams + ): Promise; +} 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"