From dfddb18952be128be54b36d416c3fddf4bed1d76 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 28 Mar 2023 06:40:45 +0000 Subject: [PATCH] CodeGen from PR 23320 in Azure/azure-rest-api-specs Merge 9dc6c8c6dc1f87a4be8e88397c87d05f55d4f23d into 1e9b59f586be35d6f0a71d1fd4dad44a01a9061e --- common/config/rush/pnpm-lock.yaml | 39 +- .../arm-hybridcompute/CHANGELOG.md | 92 +- sdk/hybridcompute/arm-hybridcompute/LICENSE | 2 +- sdk/hybridcompute/arm-hybridcompute/README.md | 2 +- .../arm-hybridcompute/_meta.json | 10 +- .../arm-hybridcompute/package.json | 21 +- .../review/arm-hybridcompute.api.md | 538 +++- .../src/hybridComputeManagementClient.ts | 43 +- .../arm-hybridcompute/src/lroImpl.ts | 54 +- .../arm-hybridcompute/src/models/index.ts | 1263 ++++++++-- .../arm-hybridcompute/src/models/mappers.ts | 2196 ++++++++++++----- .../src/models/parameters.ts | 91 +- .../src/operations/extensionMetadata.ts | 194 ++ .../arm-hybridcompute/src/operations/index.ts | 2 + .../src/operations/machineExtensions.ts | 73 +- .../src/operations/machines.ts | 266 +- .../operations/networkProfileOperations.ts | 72 + .../operations/privateEndpointConnections.ts | 55 +- .../src/operations/privateLinkResources.ts | 1 - .../src/operations/privateLinkScopes.ts | 30 +- .../operationsInterfaces/extensionMetadata.ts | 48 + .../src/operationsInterfaces/index.ts | 2 + .../operationsInterfaces/machineExtensions.ts | 12 +- .../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 +- 29 files changed, 4119 insertions(+), 1112 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/networkProfileOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.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 84d91e0ecae0..643ba246a260 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -734,6 +734,7 @@ packages: /@azure/ai-form-recognizer/3.1.0-beta.3: resolution: {integrity: sha512-+4QtFKNyxAmdqpcYjuAtmWKm/MuOe9kZsbpS9jA9h0YHzngNj5gc67AA4egV9BXOq9x+1phjYTNC/rxiOUr1uQ==} engines: {node: '>=8.0.0'} + deprecated: Please migrate to a supported (non-beta) version of this package dependencies: '@azure/core-auth': 1.4.0 '@azure/core-http': 1.2.6 @@ -8677,37 +8678,6 @@ packages: hasBin: true dev: false - /ts-node/10.9.1_cda5npvz5vidcibznbsxxfupne: - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 14.18.41 - acorn: 8.8.2 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.0.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: false - /ts-node/10.9.1_ksn4eycaeggbrckn3ykh37hwf4: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -12487,7 +12457,7 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-o32+bFzGQICrI6zXMuyc4ceJcg5QjylK4Ck6jCiE82EPwY1XmXN/i9TAkfEYQMuSzYNL/Ps3MVun4szcKkaDFA==, 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: @@ -12501,7 +12471,8 @@ packages: '@types/node': 14.18.41 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 @@ -17018,7 +16989,7 @@ packages: rollup-plugin-sourcemaps: 0.6.3_qg36w4uagpty5et2swcu4ykn64 rollup-plugin-visualizer: 5.9.0_rollup@2.79.1 semver: 7.3.8 - ts-node: 10.9.1_cda5npvz5vidcibznbsxxfupne + ts-node: 10.9.1_rwcdhhaqkims6irrp2ypnntvry tslib: 2.5.0 typescript: 4.8.4 yaml: 1.10.2 diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index 16c6165c364f..a4cb23283b6c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,37 +1,99 @@ # 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 (2023-03-28) **Features** + - Added operation group ExtensionMetadata + - 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 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 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 MachinesAssessPatchesHeaders + - Added Interface MachinesAssessPatchesOptionalParams + - Added Interface MachinesInstallPatchesHeaders + - Added Interface MachinesInstallPatchesOptionalParams - Added Interface MachineUpdate + - Added Interface NetworkInterface + - Added Interface NetworkProfile + - Added Interface NetworkProfileGetOptionalParams - Added Interface OSProfileLinuxConfiguration - Added Interface OSProfileWindowsConfiguration - Added Interface PrivateEndpointConnection - Added Interface PrivateEndpointConnectionDataModel + - Added Interface PrivateEndpointConnectionsDeleteHeaders - Added Interface PrivateLinkResource + - Added Interface PrivateLinkScopesDeleteHeaders - Added Interface ProxyResource + - Added Interface ServiceStatus + - Added Interface ServiceStatuses + - Added Interface Subnet - Added Interface TrackedResource + - Added Interface WindowsParameters + - Added Type Alias AgentConfigurationMode + - Added Type Alias AssessmentModeTypes + - Added Type Alias ExtensionMetadataGetResponse + - Added Type Alias ExtensionMetadataListResponse + - Added Type Alias LastAttemptStatusEnum + - 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 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 KnownVMGuestPatchClassificationLinux + - Added Enum KnownVMGuestPatchClassificationWindows + - Added Enum KnownVMGuestPatchRebootSetting + - Added Enum KnownVMGuestPatchRebootStatus + - Added function getContinuationToken + +**Breaking Changes** + + - Interface MachineExtensionsListNextOptionalParams no longer has parameter expand ## 3.0.0 (2022-01-18) diff --git a/sdk/hybridcompute/arm-hybridcompute/LICENSE b/sdk/hybridcompute/arm-hybridcompute/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/LICENSE +++ b/sdk/hybridcompute/arm-hybridcompute/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/hybridcompute/arm-hybridcompute/README.md b/sdk/hybridcompute/arm-hybridcompute/README.md index 9ed36d6bf2c2..54a92e8185f5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/README.md @@ -6,7 +6,7 @@ The Hybrid Compute Management Client. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-hybridcompute) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json index 66ea1bf1fe32..960f8197dd58 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": "aba2fae66fa2df181d73f799b006dcf347012639", + "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 7e961557af20..28dcb1f0d2d0 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", "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": "~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..3f37795e4246 100644 --- a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -6,9 +6,61 @@ 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 lastAttemptMessage?: string; + readonly lastAttemptStatus?: LastAttemptStatusEnum; + readonly lastAttemptTimestamp?: string; +} + +// @public +export type AssessmentModeTypes = string; + +// @public +export interface AvailablePatchCountByClassification { + readonly critical?: number; + readonly definition?: number; + readonly featurePack?: number; + readonly other?: number; + readonly security?: number; + readonly servicePack?: number; + readonly tools?: number; + readonly updateRollup?: number; + readonly updates?: number; +} + +// @public +export interface CloudMetadata { + readonly provider?: string; +} + +// @public +export interface ConfigurationExtension { + readonly publisher?: string; + readonly type?: string; +} // @public (undocumented) export interface ConnectionDetail { @@ -37,16 +89,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; @@ -57,13 +155,17 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridComputeManagementClientOptionalParams); // (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) machineExtensions: MachineExtensions; // (undocumented) machines: Machines; // (undocumented) + networkProfileOperations: NetworkProfileOperations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -82,6 +184,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; @@ -112,6 +221,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 +253,51 @@ 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 KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -145,6 +318,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 +374,70 @@ 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; + readonly lastStatusChange?: Date; + locationData?: LocationData; + readonly machineFqdn?: string; + mssqlDiscovered?: string; + readonly osName?: string; + osProfile?: OSProfile; + readonly osSku?: string; + osType?: string; + readonly osVersion?: string; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; + readonly provisioningState?: string; + readonly 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 +457,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 +478,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 +500,6 @@ export type MachineExtensionsGetResponse = MachineExtension; // @public export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -252,6 +519,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 +537,16 @@ export type MachineExtensionsUpdateResponse = MachineExtension; // @public export interface MachineExtensionUpdate extends ResourceUpdate { - properties?: MachineExtensionUpdateProperties; -} - -// @public -export interface MachineExtensionUpdateProperties { autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; - protectedSettings?: Record; + protectedSettings?: { + [propertyName: string]: any; + }; publisher?: string; - settings?: Record; + settings?: { + [propertyName: string]: any; + }; type?: string; typeHandlerVersion?: string; } @@ -285,49 +559,64 @@ export interface MachineExtensionUpgrade { } // @public -export interface MachineListResult { - nextLink?: string; - value: Machine[]; +export interface MachineInstallPatchesParameters { + linuxParameters?: LinuxParameters; + maximumDuration: string; + rebootSetting: VMGuestPatchRebootSetting; + windowsParameters?: WindowsParameters; } // @public -export interface MachineProperties { - readonly adFqdn?: string; - readonly agentVersion?: string; - clientPublicKey?: string; - readonly detectedProperties?: { - [propertyName: string]: string; - }; - readonly displayName?: string; - readonly dnsFqdn?: string; - readonly domainName?: string; - readonly errorDetails?: ErrorDetail[]; - extensions?: MachineExtensionInstanceView[]; - readonly lastStatusChange?: Date; - locationData?: LocationData; - readonly machineFqdn?: string; - mssqlDiscovered?: string; - readonly osName?: string; - osProfile?: OSProfile; - readonly osSku?: string; - osType?: string; - readonly osVersion?: string; - parentClusterResourceId?: string; - privateLinkScopeResourceId?: string; - readonly provisioningState?: string; - readonly status?: StatusTypes; - vmId?: string; - readonly vmUuid?: string; +export interface MachineInstallPatchesResult { + readonly errorDetails?: ErrorDetail; + readonly excludedPatchCount?: number; + readonly failedPatchCount?: number; + readonly installationActivityId?: string; + readonly installedPatchCount?: number; + readonly lastModifiedDateTime?: Date; + readonly maintenanceWindowExceeded?: boolean; + readonly notSelectedPatchCount?: number; + readonly osType?: OsType; + readonly patchServiceUsed?: PatchServiceUsed; + readonly pendingPatchCount?: number; + readonly rebootStatus?: VMGuestPatchRebootStatus; + readonly startDateTime?: Date; + readonly startedBy?: PatchOperationStartedBy; + readonly status?: PatchOperationStatus; +} + +// @public +export interface MachineListResult { + nextLink?: string; + value: Machine[]; } // @public export interface Machines { + beginAssessPatches(resourceGroupName: string, name: string, options?: MachinesAssessPatchesOptionalParams): Promise, MachinesAssessPatchesResponse>>; + beginAssessPatchesAndWait(resourceGroupName: string, name: string, options?: MachinesAssessPatchesOptionalParams): Promise; + beginInstallPatches(resourceGroupName: string, name: string, installPatchesInput: MachineInstallPatchesParameters, options?: MachinesInstallPatchesOptionalParams): Promise, MachinesInstallPatchesResponse>>; + beginInstallPatchesAndWait(resourceGroupName: string, name: string, installPatchesInput: MachineInstallPatchesParameters, options?: MachinesInstallPatchesOptionalParams): Promise; delete(resourceGroupName: string, machineName: string, options?: MachinesDeleteOptionalParams): Promise; get(resourceGroupName: string, machineName: string, options?: MachinesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: MachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: MachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface MachinesAssessPatchesHeaders { + location?: string; +} + +// @public +export interface MachinesAssessPatchesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachinesAssessPatchesResponse = MachineAssessPatchesResult; + // @public export interface MachinesDeleteOptionalParams extends coreClient.OperationOptions { } @@ -340,6 +629,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 +673,37 @@ export type MachinesListBySubscriptionResponse = MachineListResult; // @public export interface MachineUpdate extends ResourceUpdate { + agentUpgrade?: AgentUpgrade; + cloudMetadata?: CloudMetadata; identity?: Identity; - properties?: MachineUpdateProperties; -} - -// @public -export interface MachineUpdateProperties { 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 +724,7 @@ export type OperationsListResponse = OperationListResult; // @public export interface OperationValue { display?: OperationValueDisplay; + readonly isDataAction?: boolean; readonly name?: string; readonly origin?: string; } @@ -423,18 +746,34 @@ export interface OSProfile { // @public export interface OSProfileLinuxConfiguration { - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + patchMode?: PatchModeTypes; } // @public export interface OSProfileWindowsConfiguration { - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + patchMode?: PatchModeTypes; } +// @public +export type OsType = string; + +// @public +export type PatchModeTypes = string; + +// @public +export type PatchOperationStartedBy = string; + +// @public +export type PatchOperationStatus = string; + +// @public +export type PatchServiceUsed = string; + // @public export interface PrivateEndpointConnection extends ProxyResource { properties?: PrivateEndpointConnectionProperties; - readonly systemData?: SystemData; } // @public @@ -453,6 +792,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: string; @@ -460,9 +800,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 +817,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 +859,6 @@ export interface PrivateEndpointProperty { // @public export interface PrivateLinkResource extends ProxyResource { properties?: PrivateLinkResourceProperties; - readonly systemData?: SystemData; } // @public @@ -557,7 +903,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 +921,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 +1026,7 @@ export type PublicNetworkAccessType = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -683,12 +1037,29 @@ export interface ResourceUpdate { }; } +// @public +export interface ServiceStatus { + startupType?: string; + status?: string; +} + +// @public +export interface ServiceStatuses { + extensionService?: ServiceStatus; + guestConfigurationService?: ServiceStatus; +} + // @public export type StatusLevelTypes = string; // @public export type StatusTypes = string; +// @public +export interface Subnet { + addressPrefix?: string; +} + // @public export interface SystemData { createdAt?: Date; @@ -720,6 +1091,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..dd6bf7fd766d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -14,12 +14,18 @@ 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, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl @@ -27,7 +33,9 @@ import { import { Machines, MachineExtensions, + ExtensionMetadata, Operations, + NetworkProfileOperations, PrivateLinkScopes, PrivateLinkResources, PrivateEndpointConnections @@ -72,7 +80,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`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -125,10 +133,12 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-10-preview"; + this.apiVersion = options.apiVersion || "2022-12-27"; 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.privateLinkScopes = new PrivateLinkScopesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -175,14 +185,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 +225,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 +267,9 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { machines: Machines; machineExtensions: MachineExtensions; + extensionMetadata: ExtensionMetadata; operations: Operations; + networkProfileOperations: NetworkProfileOperations; 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..7f50ae820a84 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -57,113 +57,124 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** Describes the properties of a hybrid machine. */ -export interface MachineProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; - /** - * The 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; +/** 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 status of the hybrid machine agent. + * 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 status?: StatusTypes; + readonly proxyUrl?: string; /** - * The time of the last status change. + * 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 lastStatusChange?: Date; + readonly incomingConnectionsPorts?: string[]; /** - * Details about the error state. + * 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 errorDetails?: ErrorDetail[]; + readonly extensionsAllowList?: ConfigurationExtension[]; /** - * The hybrid machine agent full version. + * 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 agentVersion?: string; - /** Specifies the hybrid machine unique ID. */ - vmId?: string; + readonly extensionsBlockList?: ConfigurationExtension[]; /** - * Specifies the hybrid machine display name. + * 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 displayName?: string; + readonly proxyBypass?: string[]; /** - * Specifies the hybrid machine FQDN. + * 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 machineFqdn?: string; - /** Public Key that the client provides to be used during initial resource onboarding */ - clientPublicKey?: string; + readonly extensionsEnabled?: string; /** - * The Operating System running on the hybrid machine. + * 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 osName?: string; + readonly guestConfigurationEnabled?: string; /** - * The version of 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 osVersion?: string; - /** The type of Operating System (windows/linux). */ - osType?: string; + readonly configMode?: AgentConfigurationMode; +} + +/** Describes properties that can identify extensions. */ +export interface ConfigurationExtension { /** - * Specifies the Arc Machine's unique SMBIOS ID + * Publisher 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 publisher?: string; /** - * Specifies the Operating System product SKU. + * Type of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osSku?: string; + 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 Windows domain name. + * Specifies the cloud provider (Azure/AWS/GCP...). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly domainName?: 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 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 +193,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 +232,28 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -/** Identity for the resource. */ -export interface Identity { +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The principal ID of resource identity. + * 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 principalId?: string; + readonly id?: string; /** - * The tenant ID of resource. + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** The identity type. */ - type?: "SystemAssigned"; + 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 +272,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; + 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; } -/** 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; +/** Summarization of patches available for installation on the machine by classification. */ +export interface AvailablePatchCountByClassification { + /** + * Number of security patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly security?: number; + /** + * Number of critical patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly critical?: number; + /** + * Number of definition patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly definition?: number; + /** + * Number of update Rollup patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updateRollup?: number; + /** + * Number of feature pack patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly featurePack?: number; + /** + * Number of service pack patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly servicePack?: number; + /** + * Number of tools patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tools?: number; + /** + * Number of updates category patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updates?: number; + /** + * Number of other patches available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly other?: number; } -/** 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; +/** 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 provisioning state, which only appears in the response. + * 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 provisioningState?: string; - /** The machine extension instance view. */ - instanceView?: MachineExtensionInstanceView; + 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; } -/** Describes the properties of a Machine Extension. */ -export interface MachineExtensionUpdateProperties { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; +/** The 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 +525,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 +537,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 +569,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 +600,72 @@ export interface OperationValueDisplay { readonly provider?: string; } +/** 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 subnet to which this IP address belongs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnet?: Subnet; +} + +/** Describes the subnet. */ +export interface Subnet { + /** Represents address prefix. */ + addressPrefix?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + /** Describes the list of Azure Arc PrivateLinkScope resources. */ export interface HybridComputePrivateLinkScopeListResult { /** List of Azure Arc PrivateLinkScope definitions. */ @@ -455,6 +727,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. */ @@ -532,159 +809,360 @@ export interface PrivateLinkResourceProperties { */ readonly requiredMembers?: string[]; /** - * Required DNS zone names of the the private link resource. + * Required DNS zone names of the the private link resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredZoneNames?: string[]; +} + +/** A list of private endpoint connections. */ +export interface PrivateEndpointConnectionListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: PrivateEndpointConnection[]; + /** + * Link to retrieve next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +export interface PrivateLinkScopeValidationDetails { + /** + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. */ + publicNetworkAccess?: PublicNetworkAccessType; + /** List of Private Endpoint Connection details. */ + connectionDetails?: ConnectionDetail[]; +} + +export interface ConnectionDetail { + /** + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The private endpoint connection private ip address + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIpAddress?: string; + /** + * The private endpoint connection link identifier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkIdentifier?: string; + /** + * The private endpoint connection group id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private endpoint connection member name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memberName?: 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. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** Describes a Machine Extension Update. */ +export interface MachineExtensionUpdate extends ResourceUpdate { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; +} + +/** Describes a hybrid machine Update. */ +export interface MachineUpdate extends ResourceUpdate { + /** Identity for the resource. */ + identity?: Identity; + /** 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; + /** 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 requiredZoneNames?: string[]; -} - -/** A list of private endpoint connections. */ -export interface PrivateEndpointConnectionListResult { + readonly displayName?: string; /** - * Array of results. + * Specifies the hybrid machine FQDN. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: PrivateEndpointConnection[]; + readonly machineFqdn?: string; + /** Public Key that the client provides to be used during initial resource onboarding */ + clientPublicKey?: string; /** - * Link to retrieve next page of results. + * The Operating System running on the hybrid machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -export interface PrivateLinkScopeValidationDetails { + readonly osName?: string; /** - * Azure resource Id + * 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 id?: string; - /** Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. */ - publicNetworkAccess?: PublicNetworkAccessType; - /** List of Private Endpoint Connection details. */ - connectionDetails?: ConnectionDetail[]; -} - -export interface ConnectionDetail { + readonly osVersion?: string; + /** The type of Operating System (windows/linux). */ + osType?: string; /** - * Azure resource Id + * Specifies the Arc Machine's unique SMBIOS ID * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly vmUuid?: string; + /** Machine Extensions information (deprecated field) */ + extensions?: MachineExtensionInstanceView[]; /** - * The private endpoint connection private ip address + * Specifies the Operating System product SKU. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateIpAddress?: string; + readonly osSku?: string; /** - * The private endpoint connection link identifier + * Specifies the Windows domain name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly linkIdentifier?: string; + readonly domainName?: string; /** - * The private endpoint connection group id + * Specifies the AD fully qualified display name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly groupId?: string; + readonly adFqdn?: string; /** - * The private endpoint connection member name + * Specifies the DNS fully qualified display name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - 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; + readonly dnsFqdn?: 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. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** Describes a Machine Extension Update. */ -export interface MachineExtensionUpdate extends ResourceUpdate { - /** Describes Machine Extension Update Properties. */ - properties?: MachineExtensionUpdateProperties; -} - -/** Describes a hybrid machine Update. */ -export interface MachineUpdate extends ResourceUpdate { - /** Identity for the resource. */ - identity?: Identity; - /** Hybrid Compute Machine properties */ - properties?: MachineUpdateProperties; -} - -/** An Azure Arc PrivateLinkScope definition. */ -export interface HybridComputePrivateLinkScope - extends PrivateLinkScopesResource { - /** Properties that define a Azure Arc PrivateLinkScope resource. */ - properties?: HybridComputePrivateLinkScopeProperties; + /** 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; /** - * The system meta data relating to this resource. + * Detected properties from the machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly detectedProperties?: { [propertyName: string]: string }; } -/** 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; -} - -/** Describes a Machine Extension. */ -export interface MachineExtension extends TrackedResource { - /** Describes Machine Extension Properties. */ - properties?: MachineExtensionProperties; + readonly version?: string; /** - * The system meta data relating to this resource. + * The type of the Extension being received. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + 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; } /** 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 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 +1180,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 +1324,207 @@ export enum KnownCreatedByType { */ export type CreatedByType = 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 +1556,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 +1660,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 +1674,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 +1695,13 @@ 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 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..aff76a8b3682 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -104,218 +104,253 @@ 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", - readOnly: true, - type: { - name: "String" - } - }, - vmId: { - serializedName: "vmId", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - machineFqdn: { - serializedName: "machineFqdn", - readOnly: true, - type: { - name: "String" - } - }, - clientPublicKey: { - serializedName: "clientPublicKey", - type: { - name: "String" - } - }, - osName: { - serializedName: "osName", + extensionsAllowList: { + serializedName: "extensionsAllowList", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - osVersion: { - serializedName: "osVersion", + extensionsBlockList: { + serializedName: "extensionsBlockList", readOnly: true, type: { - name: "String" - } - }, - osType: { - serializedName: "osType", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - vmUuid: { - serializedName: "vmUuid", + proxyBypass: { + serializedName: "proxyBypass", readOnly: true, - type: { - name: "String" - } - }, - extensions: { - serializedName: "extensions", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "MachineExtensionInstanceView" + name: "String" } } } }, - osSku: { - serializedName: "osSku", + extensionsEnabled: { + serializedName: "extensionsEnabled", readOnly: true, type: { name: "String" } }, - domainName: { - serializedName: "domainName", + guestConfigurationEnabled: { + serializedName: "guestConfigurationEnabled", readOnly: true, type: { name: "String" } }, - adFqdn: { - serializedName: "adFqdn", + configMode: { + serializedName: "configMode", readOnly: true, type: { name: "String" } - }, - dnsFqdn: { - serializedName: "dnsFqdn", + } + } + } +}; + +export const ConfigurationExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationExtension", + modelProperties: { + publisher: { + serializedName: "publisher", readOnly: true, type: { name: "String" } }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } + } + } + } +}; + +export const ServiceStatuses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatuses", + modelProperties: { + extensionService: { + serializedName: "extensionService", + type: { + name: "Composite", + className: "ServiceStatus" + } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + guestConfigurationService: { + serializedName: "guestConfigurationService", + type: { + name: "Composite", + className: "ServiceStatus" + } + } + } + } +}; + +export const ServiceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatus", + modelProperties: { + status: { + serializedName: "status", type: { name: "String" } }, - mssqlDiscovered: { - serializedName: "mssqlDiscovered", + startupType: { + serializedName: "startupType", type: { name: "String" } - }, - detectedProperties: { - serializedName: "detectedProperties", + } + } + } +}; + +export const CloudMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudMetadata", + modelProperties: { + provider: { + serializedName: "provider", readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } } } } }; -export const LocationData: coreClient.CompositeMapper = { +export const AgentUpgrade: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationData", + className: "AgentUpgrade", modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, + desiredVersion: { + serializedName: "desiredVersion", type: { name: "String" } }, - city: { - serializedName: "city", + correlationId: { + serializedName: "correlationId", type: { name: "String" } }, - district: { - serializedName: "district", + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + lastAttemptTimestamp: { + serializedName: "lastAttemptTimestamp", + readOnly: true, type: { name: "String" } }, - countryOrRegion: { - serializedName: "countryOrRegion", + lastAttemptStatus: { + serializedName: "lastAttemptStatus", + readOnly: true, + type: { + name: "String" + } + }, + lastAttemptMessage: { + serializedName: "lastAttemptMessage", + readOnly: true, type: { name: "String" } @@ -364,6 +399,12 @@ export const OSProfileWindowsConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -379,6 +420,12 @@ export const OSProfileLinuxConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -457,32 +504,38 @@ export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { } }; -export const Identity: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Identity", + className: "Resource", modelProperties: { - principalId: { - serializedName: "principalId", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - tenantId: { - serializedName: "tenantId", + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, type: { - defaultValue: "SystemAssigned", - isConstant: true, serializedName: "type", + readOnly: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -533,28 +586,29 @@ export const SystemData: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const Identity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "Identity", modelProperties: { - id: { - serializedName: "id", + principalId: { + serializedName: "principalId", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { name: "String" } }, type: { + defaultValue: "SystemAssigned", + isConstant: true, serializedName: "type", - readOnly: true, type: { name: "String" } @@ -563,244 +617,282 @@ export const Resource: coreClient.CompositeMapper = { } }; -export const MachineListResult: coreClient.CompositeMapper = { +export const MachineAssessPatchesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineListResult", + className: "MachineAssessPatchesResult", modelProperties: { - value: { - serializedName: "value", - required: true, + status: { + serializedName: "status", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Machine" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const MachineExtensionProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtensionProperties", - modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", + assessmentActivityId: { + serializedName: "assessmentActivityId", + readOnly: true, type: { name: "String" } }, - publisher: { - serializedName: "publisher", + rebootPending: { + serializedName: "rebootPending", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - type: { - serializedName: "type", + availablePatchCountByClassification: { + serializedName: "availablePatchCountByClassification", type: { - name: "String" + name: "Composite", + className: "AvailablePatchCountByClassification" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + startDateTime: { + serializedName: "startDateTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, - settings: { - serializedName: "settings", + startedBy: { + serializedName: "startedBy", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - protectedSettings: { - serializedName: "protectedSettings", + patchServiceUsed: { + serializedName: "patchServiceUsed", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - provisioningState: { - serializedName: "provisioningState", + osType: { + serializedName: "osType", readOnly: true, type: { name: "String" } }, - instanceView: { - serializedName: "instanceView", + 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" + } + } + } + }, + packageNameMasksToInclude: { + serializedName: "packageNameMasksToInclude", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + packageNameMasksToExclude: { + serializedName: "packageNameMasksToExclude", + type: { + name: "Sequence", + element: { + type: { + name: "String" } } } @@ -809,377 +901,491 @@ export const OperationListResult: coreClient.CompositeMapper = { } }; -export const OperationValue: coreClient.CompositeMapper = { +export const MachineInstallPatchesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationValue", + className: "MachineInstallPatchesResult", modelProperties: { - origin: { - serializedName: "origin", + status: { + serializedName: "status", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + installationActivityId: { + serializedName: "installationActivityId", readOnly: true, type: { name: "String" } }, - display: { - serializedName: "display", + rebootStatus: { + serializedName: "rebootStatus", + readOnly: true, type: { - name: "Composite", - className: "OperationValueDisplay" + name: "String" } - } - } - } -}; - -export const OperationValueDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationValueDisplay", - modelProperties: { - operation: { - serializedName: "operation", + }, + maintenanceWindowExceeded: { + serializedName: "maintenanceWindowExceeded", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - resource: { - serializedName: "resource", + excludedPatchCount: { + serializedName: "excludedPatchCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - description: { - serializedName: "description", + notSelectedPatchCount: { + serializedName: "notSelectedPatchCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - provider: { - serializedName: "provider", + pendingPatchCount: { + serializedName: "pendingPatchCount", readOnly: true, type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + installedPatchCount: { + serializedName: "installedPatchCount", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScope" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + failedPatchCount: { + serializedName: "failedPatchCount", + readOnly: true, type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const HybridComputePrivateLinkScopeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeProperties", - modelProperties: { - publicNetworkAccess: { - defaultValue: "Disabled", - serializedName: "publicNetworkAccess", + }, + startDateTime: { + serializedName: "startDateTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - provisioningState: { - serializedName: "provisioningState", + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + startedBy: { + serializedName: "startedBy", readOnly: true, type: { name: "String" } }, - privateLinkScopeId: { - serializedName: "privateLinkScopeId", + patchServiceUsed: { + serializedName: "patchServiceUsed", readOnly: true, type: { name: "String" } }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", + osType: { + serializedName: "osType", readOnly: true, + type: { + name: "String" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const MachineListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateEndpointConnectionDataModel" + className: "Machine" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const PrivateEndpointConnectionDataModel: coreClient.CompositeMapper = { +export const ResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionDataModel", + className: "ResourceUpdate", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - name: { - serializedName: "name", - readOnly: true, + } + } + } +}; + +export const MachineExtensionsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionsListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } } }, - type: { - serializedName: "type", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" - } } } } }; -export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { +export const MachineExtensionUpgrade: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionProperties", + className: "MachineExtensionUpgrade", modelProperties: { - privateEndpoint: { - serializedName: "privateEndpoint", + extensionTargets: { + serializedName: "extensionTargets", type: { - name: "Composite", - className: "PrivateEndpointProperty" + name: "Dictionary", + value: { + type: { name: "Composite", className: "ExtensionTargetProperties" } + } } - }, - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", + } + } + } +}; + +export const ExtensionTargetProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionTargetProperties", + modelProperties: { + targetVersion: { + serializedName: "targetVersion", type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty" + name: "String" } - }, - provisioningState: { - serializedName: "provisioningState", + } + } + } +}; + +export const ExtensionValueListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionValueListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExtensionValue" + } + } } } } } }; -export const PrivateEndpointProperty: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointProperty", + className: "OperationListResult", modelProperties: { - id: { - serializedName: "id", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationValue" + } + } } } } } }; -export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { +export const OperationValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", + className: "OperationValue", modelProperties: { - status: { - serializedName: "status", - required: true, + origin: { + serializedName: "origin", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", - required: true, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - actionsRequired: { - serializedName: "actionsRequired", + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationValueDisplay" + } + }, + isDataAction: { + serializedName: "isDataAction", readOnly: true, type: { - name: "String" + name: "Boolean" } } } } }; -export const PrivateLinkScopesResource: coreClient.CompositeMapper = { +export const OperationValueDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkScopesResource", + className: "OperationValueDisplay", modelProperties: { - id: { - serializedName: "id", + operation: { + serializedName: "operation", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + resource: { + serializedName: "resource", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + description: { + serializedName: "description", readOnly: true, type: { name: "String" } }, - location: { - serializedName: "location", - required: true, + provider: { + serializedName: "provider", + readOnly: true, type: { name: "String" } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } } } } }; -export const TagsResource: coreClient.CompositeMapper = { +export const NetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsResource", + className: "NetworkProfile", modelProperties: { - tags: { - serializedName: "tags", + networkInterfaces: { + serializedName: "networkInterfaces", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterface" + } + } } } } } }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const NetworkInterface: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "NetworkInterface", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + ipAddresses: { + serializedName: "ipAddresses", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "IpAddress" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { +export const IpAddress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceProperties", + className: "IpAddress", modelProperties: { - groupId: { - serializedName: "groupId", - readOnly: true, + address: { + serializedName: "address", type: { name: "String" } }, - requiredMembers: { - serializedName: "requiredMembers", + ipAddressVersion: { + serializedName: "ipAddressVersion", + type: { + name: "String" + } + }, + subnet: { + serializedName: "subnet", + type: { + name: "Composite", + className: "Subnet" + } + } + } + } +}; + +export const Subnet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Subnet", + modelProperties: { + addressPrefix: { + serializedName: "addressPrefix", + 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: "String" + name: "Composite", + className: "ErrorDetailAutoGenerated" } } } }, - requiredZoneNames: { - serializedName: "requiredZoneNames", + additionalInfo: { + serializedName: "additionalInfo", readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -1188,165 +1394,942 @@ export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { } }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + 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 MachineUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + 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" + } + }, + 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: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + clientPublicKey: { + serializedName: "properties.clientPublicKey", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PrivateLinkScopeValidationDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkScopeValidationDetails", - modelProperties: { - id: { - serializedName: "id", + }, + osVersion: { + serializedName: "properties.osVersion", readOnly: true, type: { name: "String" } }, - publicNetworkAccess: { - defaultValue: "Disabled", - serializedName: "publicNetworkAccess", + osType: { + serializedName: "properties.osType", type: { name: "String" } }, - connectionDetails: { - serializedName: "connectionDetails", + vmUuid: { + serializedName: "properties.vmUuid", + readOnly: true, + type: { + name: "String" + } + }, + extensions: { + serializedName: "properties.extensions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectionDetail" + className: "MachineExtensionInstanceView" } } } - } - } - } -}; - -export const ConnectionDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectionDetail", - modelProperties: { - id: { - serializedName: "id", + }, + osSku: { + serializedName: "properties.osSku", readOnly: true, type: { name: "String" } }, - privateIpAddress: { - serializedName: "privateIpAddress", + domainName: { + serializedName: "properties.domainName", readOnly: true, type: { name: "String" } }, - linkIdentifier: { - serializedName: "linkIdentifier", + adFqdn: { + serializedName: "properties.adFqdn", readOnly: true, type: { name: "String" } }, - groupId: { - serializedName: "groupId", + dnsFqdn: { + serializedName: "properties.dnsFqdn", readOnly: true, type: { name: "String" } }, - memberName: { - serializedName: "memberName", - readOnly: true, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", type: { name: "String" } - } - } - } -}; - -export const MachineUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineUpdateProperties", - modelProperties: { - locationData: { - serializedName: "locationData", - type: { - name: "Composite", - className: "LocationData" - } }, - osProfile: { - serializedName: "osProfile", + parentClusterResourceId: { + serializedName: "properties.parentClusterResourceId", type: { - name: "Composite", - className: "OSProfile" + name: "String" } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + mssqlDiscovered: { + serializedName: "properties.mssqlDiscovered", type: { name: "String" } }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + detectedProperties: { + serializedName: "properties.detectedProperties", + readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const ExtensionValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "ExtensionValue", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + ...ProxyResource.type.modelProperties, + version: { + serializedName: "properties.version", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - location: { - serializedName: "location", - required: true, + extensionType: { + serializedName: "properties.extensionType", + readOnly: true, + type: { + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + readOnly: true, type: { name: "String" } @@ -1355,178 +2338,199 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const PrivateLinkResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "PrivateLinkResource", modelProperties: { - ...Resource.type.modelProperties + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + } } } }; -export const MachineExtensionUpdate: coreClient.CompositeMapper = { +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdate", + className: "PrivateEndpointConnection", modelProperties: { - ...ResourceUpdate.type.modelProperties, + ...ProxyResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "MachineExtensionUpdateProperties" + className: "PrivateEndpointConnectionProperties" } } } } }; -export const MachineUpdate: coreClient.CompositeMapper = { +export const MachinesAssessPatchesHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineUpdate", + className: "MachinesAssessPatchesHeaders", modelProperties: { - ...ResourceUpdate.type.modelProperties, - identity: { - serializedName: "identity", + location: { + serializedName: "location", type: { - name: "Composite", - className: "Identity" + name: "String" } - }, - properties: { - serializedName: "properties", + } + } + } +}; + +export const MachinesInstallPatchesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachinesInstallPatchesHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "MachineUpdateProperties" + name: "String" } } } } }; -export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { +export const MachineExtensionsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HybridComputePrivateLinkScope", + className: "MachineExtensionsUpdateHeaders", modelProperties: { - ...PrivateLinkScopesResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "HybridComputePrivateLinkScopeProperties" + name: "String" } }, - systemData: { - serializedName: "systemData", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "SystemData" + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } } }; -export const Machine: coreClient.CompositeMapper = { +export const MachineExtensionsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Machine", + className: "MachineExtensionsDeleteHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "MachineProperties" + name: "String" } }, - identity: { - serializedName: "identity", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "Identity" + name: "Number" } }, - systemData: { - serializedName: "systemData", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Composite", - className: "SystemData" + name: "String" } } } } }; -export const MachineExtension: coreClient.CompositeMapper = { +export const HybridComputeManagementClientUpgradeExtensionsHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtension", + className: "HybridComputeManagementClientUpgradeExtensionsHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "MachineExtensionProperties" + name: "String" } }, - systemData: { - serializedName: "systemData", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "SystemData" + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } } }; -export const PrivateLinkResource: coreClient.CompositeMapper = { +export const PrivateLinkScopesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResource", + className: "PrivateLinkScopesDeleteHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "PrivateLinkResourceProperties" + name: "String" } }, - systemData: { - serializedName: "systemData", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "SystemData" + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } } }; -export const PrivateEndpointConnection: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnection", + className: "PrivateEndpointConnectionsDeleteHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" + name: "String" } }, - systemData: { - serializedName: "systemData", + retryAfter: { + serializedName: "retry-after", type: { - name: "Composite", - className: "SystemData" + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 3e589fbc8dbd..6275c5824a37 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -12,6 +12,7 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + MachineInstallPatchesParameters as MachineInstallPatchesParametersMapper, MachineExtension as MachineExtensionMapper, MachineExtensionUpdate as MachineExtensionUpdateMapper, MachineExtensionUpgrade as MachineExtensionUpgradeMapper, @@ -47,7 +48,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-10-preview", + defaultValue: "2022-12-27", isConstant: true, serializedName: "api-version", type: { @@ -88,6 +89,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 +112,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 +146,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 +199,50 @@ 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 scopeName: OperationURLParameter = { parameterPath: "scopeName", mapper: { @@ -187,7 +264,7 @@ export const privateLinkScopeTags: OperationParameter = { mapper: TagsResourceMapper }; -export const location: OperationURLParameter = { +export const location1: OperationURLParameter = { parameterPath: "location", mapper: { constraints: { diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/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/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index f8024e8bc5a1..8c941b37d5f7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -8,7 +8,9 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; +export * from "./networkProfileOperations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index eebebbcb00e7..ee82b13295cd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MachineExtension, MachineExtensionsListNextOptionalParams, @@ -135,8 +139,8 @@ export class MachineExtensionsImpl implements MachineExtensions { extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsCreateOrUpdateResponse > > { @@ -146,7 +150,7 @@ export class MachineExtensionsImpl implements MachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -179,19 +183,22 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, extensionParameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MachineExtensionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -238,8 +245,8 @@ export class MachineExtensionsImpl implements MachineExtensions { extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsUpdateResponse > > { @@ -249,7 +256,7 @@ export class MachineExtensionsImpl implements MachineExtensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -282,19 +289,22 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, extensionParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + MachineExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -338,14 +348,14 @@ export class MachineExtensionsImpl implements MachineExtensions { machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -378,13 +388,13 @@ export class MachineExtensionsImpl implements MachineExtensions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, machineName, extensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, extensionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -619,7 +629,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 59d68ce49514..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..9c5e8dcab573 --- /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.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts index 77a4bc75fb63..f612107a6912 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams, @@ -160,8 +164,8 @@ export class PrivateEndpointConnectionsImpl parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > > { @@ -171,7 +175,7 @@ export class PrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -204,19 +208,22 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -260,14 +267,14 @@ export class PrivateEndpointConnectionsImpl scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,13 +307,18 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, scopeName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + scopeName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,7 +500,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts index c58e1dc77baa..762e9cb1b6d2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts @@ -234,7 +234,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts index 8c7b8cc9f9b1..5df1ef02b642 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { HybridComputePrivateLinkScope, PrivateLinkScopesListNextOptionalParams, @@ -210,14 +214,14 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -250,13 +254,13 @@ export class PrivateLinkScopesImpl implements PrivateLinkScopes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, scopeName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, scopeName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -559,7 +563,7 @@ const getValidationDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location, + Parameters.location1, Parameters.privateLinkScopeId ], headerParameters: [Parameters.accept], @@ -598,7 +602,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -618,7 +621,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/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/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts index f8024e8bc5a1..8c941b37d5f7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -8,7 +8,9 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; +export * from "./networkProfileOperations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts index 0aae932d1c04..426ece06c8da 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MachineExtension, MachineExtensionsListOptionalParams, @@ -50,8 +50,8 @@ export interface MachineExtensions { extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsCreateOrUpdateResponse > >; @@ -85,8 +85,8 @@ export interface MachineExtensions { extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MachineExtensionsUpdateResponse > >; @@ -117,7 +117,7 @@ export interface MachineExtensions { machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * The operation to delete the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts index 1fb8be19778a..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"