From 6b75b18dd4b26bbd2a475939c9126e15c4c6a56f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 7 Oct 2023 09:21:11 +0000 Subject: [PATCH] CodeGen from PR 25859 in Azure/azure-rest-api-specs Merge 7689b17fa8d2aa773502471e6863fa8138486e08 into c280892951a9e45c059132c05aace25a9c752d48 --- common/config/rush/pnpm-lock.yaml | 19 +- .../arm-azurestackhci/CHANGELOG.md | 235 ++- sdk/azurestackhci/arm-azurestackhci/LICENSE | 2 +- .../arm-azurestackhci/_meta.json | 8 +- .../arm-azurestackhci/package.json | 35 +- .../review/arm-azurestackhci.api.md | 863 ++++++++- .../src/azureStackHCIClient.ts | 32 +- .../arm-azurestackhci/src/lroImpl.ts | 54 +- .../arm-azurestackhci/src/models/index.ts | 1462 +++++++++++++- .../arm-azurestackhci/src/models/mappers.ts | 1715 +++++++++++++++-- .../src/models/parameters.ts | 105 +- .../src/operations/arcSettings.ts | 211 +- .../src/operations/clusters.ts | 215 ++- .../src/operations/extensions.ts | 220 ++- .../arm-azurestackhci/src/operations/index.ts | 6 + .../src/operations/offers.ts | 431 +++++ .../src/operations/publishers.ts | 246 +++ .../arm-azurestackhci/src/operations/skus.ts | 296 +++ .../src/operations/updateRuns.ts | 453 +++++ .../operations/updateSummariesOperations.ts | 394 ++++ .../src/operations/updates.ts | 518 +++++ .../src/operationsInterfaces/arcSettings.ts | 52 +- .../src/operationsInterfaces/clusters.ts | 46 +- .../src/operationsInterfaces/extensions.ts | 55 +- .../src/operationsInterfaces/index.ts | 6 + .../src/operationsInterfaces/offers.ts | 60 + .../src/operationsInterfaces/publishers.ts | 44 + .../src/operationsInterfaces/skus.ts | 52 + .../src/operationsInterfaces/updateRuns.ts | 99 + .../updateSummariesOperations.ts | 81 + .../src/operationsInterfaces/updates.ts | 116 ++ .../arm-azurestackhci/src/pagingHelper.ts | 8 +- .../arm-azurestackhci/tsconfig.json | 10 +- 33 files changed, 7692 insertions(+), 457 deletions(-) create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operations/offers.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operations/publishers.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operations/skus.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operations/updateRuns.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operations/updateSummariesOperations.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operations/updates.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/offers.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/publishers.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/skus.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateRuns.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateSummariesOperations.ts create mode 100644 sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updates.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index bde321a58542..ca16abd73304 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3962,7 +3962,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug@3.2.7: @@ -4214,7 +4214,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231005 + typescript: 5.3.0-dev.20231007 dev: false /eastasianwidth@0.2.0: @@ -8963,8 +8963,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231005: - resolution: {integrity: sha512-Twm3wBauTO94CSWbjXFMpsHsbaOUVssreq6pUo4wr8YsaIp0jim8EeCa9LfawFetQ+P4PODMmiM+uBhhWRVX0Q==} + /typescript@5.3.0-dev.20231007: + resolution: {integrity: sha512-yNeHmU15JtC5TgUuiCaywQqtVJ6Q1T6mNwDg5N1ObnctoaqBrZ0FGy37NP0Y/UnJUhZxgcYrIb1gcial4fUiyA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -10843,10 +10843,11 @@ packages: dev: false file:projects/arm-azurestackhci.tgz: - resolution: {integrity: sha512-b0wFb4xEP9Yw/rXBfST75Ht5BV2rcE5fJDLLinBQdQHWtzar7DPrU/PA/S44fEuEGkpaP4DN9UURC1nkRitJ5w==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-OKQIkMkuN/h17iCkuwmg5jp2VPOh2RFBajv+EKXtM9yGgyBXxMO5iQOgDiN6OA38pfSpUQWC8eL0I6hywlVMAQ==, tarball: file:projects/arm-azurestackhci.tgz} name: '@rush-temp/arm-azurestackhci' version: 0.0.0 dependencies: + '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.38.0(@types/node@14.18.63) '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) '@rollup/plugin-json': 6.0.0(rollup@2.79.1) @@ -10856,9 +10857,10 @@ packages: '@types/node': 14.18.63 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 - mocha: 10.2.0 - rimraf: 3.0.2 + dotenv: 16.3.1 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 5.0.5 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.63)(rollup@2.79.1) ts-node: 10.9.1(@types/node@14.18.63)(typescript@5.0.4) @@ -10868,6 +10870,7 @@ packages: transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - supports-color dev: false file:projects/arm-baremetalinfrastructure.tgz: diff --git a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md index 16ad5fa40c14..7fbe24051e45 100644 --- a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md @@ -1,15 +1,232 @@ # Release History + +## 4.0.0 (2023-10-07) + +**Features** -## 3.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group Offers + - Added operation group Publishers + - Added operation group Skus + - Added operation group UpdateRuns + - Added operation group Updates + - Added operation group UpdateSummariesOperations + - Added operation ArcSettings.beginInitializeDisableProcess + - Added operation ArcSettings.beginInitializeDisableProcessAndWait + - Added operation ArcSettings.consentAndInstallDefaultExtensions + - Added operation Clusters.beginExtendSoftwareAssuranceBenefit + - Added operation Clusters.beginExtendSoftwareAssuranceBenefitAndWait + - Added operation Extensions.beginUpgrade + - Added operation Extensions.beginUpgradeAndWait + - Added Interface ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams + - Added Interface ArcSettingsInitializeDisableProcessOptionalParams + - Added Interface ClustersExtendSoftwareAssuranceBenefitOptionalParams + - Added Interface DefaultExtensionDetails + - Added Interface ExtensionInstanceView + - Added Interface ExtensionInstanceViewStatus + - Added Interface ExtensionPatch + - Added Interface ExtensionPatchParameters + - Added Interface ExtensionsUpgradeOptionalParams + - Added Interface ExtensionUpgradeParameters + - Added Interface IsolatedVmAttestationConfiguration + - Added Interface Offer + - Added Interface OfferList + - Added Interface OffersGetOptionalParams + - Added Interface OffersListByClusterNextOptionalParams + - Added Interface OffersListByClusterOptionalParams + - Added Interface OffersListByPublisherNextOptionalParams + - Added Interface OffersListByPublisherOptionalParams + - Added Interface PackageVersionInfo + - Added Interface PrecheckResult + - Added Interface PrecheckResultTags + - Added Interface Publisher + - Added Interface PublisherList + - Added Interface PublishersGetOptionalParams + - Added Interface PublishersListByClusterNextOptionalParams + - Added Interface PublishersListByClusterOptionalParams + - Added Interface ServiceConfiguration + - Added Interface Sku + - Added Interface SkuList + - Added Interface SkuMappings + - Added Interface SkusGetOptionalParams + - Added Interface SkusListByOfferNextOptionalParams + - Added Interface SkusListByOfferOptionalParams + - Added Interface SoftwareAssuranceChangeRequest + - Added Interface SoftwareAssuranceChangeRequestProperties + - Added Interface SoftwareAssuranceProperties + - Added Interface Step + - Added Interface SystemData + - Added Interface Update + - Added Interface UpdateList + - Added Interface UpdatePrerequisite + - Added Interface UpdateRun + - Added Interface UpdateRunList + - Added Interface UpdateRunsDeleteHeaders + - Added Interface UpdateRunsDeleteOptionalParams + - Added Interface UpdateRunsGetOptionalParams + - Added Interface UpdateRunsListNextOptionalParams + - Added Interface UpdateRunsListOptionalParams + - Added Interface UpdateRunsPutOptionalParams + - Added Interface UpdatesDeleteHeaders + - Added Interface UpdatesDeleteOptionalParams + - Added Interface UpdatesGetOptionalParams + - Added Interface UpdatesListNextOptionalParams + - Added Interface UpdatesListOptionalParams + - Added Interface UpdatesPostHeaders + - Added Interface UpdatesPostOptionalParams + - Added Interface UpdatesPutOptionalParams + - Added Interface UpdateSummaries + - Added Interface UpdateSummariesDeleteHeaders + - Added Interface UpdateSummariesDeleteOptionalParams + - Added Interface UpdateSummariesGetOptionalParams + - Added Interface UpdateSummariesList + - Added Interface UpdateSummariesListNextOptionalParams + - Added Interface UpdateSummariesListOptionalParams + - Added Interface UpdateSummariesPutOptionalParams + - Added Interface UserAssignedIdentity + - Added Type Alias ArcSettingsConsentAndInstallDefaultExtensionsResponse + - Added Type Alias AvailabilityType + - Added Type Alias ClusterNodeType + - Added Type Alias ClustersExtendSoftwareAssuranceBenefitResponse + - Added Type Alias ConnectivityStatus + - Added Type Alias ExtensionManagedBy + - Added Type Alias HealthState + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias OemActivation + - Added Type Alias OffersGetResponse + - Added Type Alias OffersListByClusterNextResponse + - Added Type Alias OffersListByClusterResponse + - Added Type Alias OffersListByPublisherNextResponse + - Added Type Alias OffersListByPublisherResponse + - Added Type Alias PublishersGetResponse + - Added Type Alias PublishersListByClusterNextResponse + - Added Type Alias PublishersListByClusterResponse + - Added Type Alias RebootRequirement + - Added Type Alias ServiceName + - Added Type Alias Severity + - Added Type Alias SkusGetResponse + - Added Type Alias SkusListByOfferNextResponse + - Added Type Alias SkusListByOfferResponse + - Added Type Alias SoftwareAssuranceIntent + - Added Type Alias SoftwareAssuranceStatus + - Added Type Alias State + - Added Type Alias StatusLevelTypes + - Added Type Alias UpdateRunPropertiesState + - Added Type Alias UpdateRunsGetResponse + - Added Type Alias UpdateRunsListNextResponse + - Added Type Alias UpdateRunsListResponse + - Added Type Alias UpdateRunsPutResponse + - Added Type Alias UpdatesGetResponse + - Added Type Alias UpdatesListNextResponse + - Added Type Alias UpdatesListResponse + - Added Type Alias UpdatesPutResponse + - Added Type Alias UpdateSummariesGetResponse + - Added Type Alias UpdateSummariesListNextResponse + - Added Type Alias UpdateSummariesListResponse + - Added Type Alias UpdateSummariesPropertiesState + - Added Type Alias UpdateSummariesPutResponse + - Interface ArcConnectivityProperties has a new optional parameter serviceConfigurations + - Interface ArcSetting has a new optional parameter defaultExtensions + - Interface Cluster has a new optional parameter connectivityStatus + - Interface Cluster has a new optional parameter isolatedVmAttestationConfiguration + - Interface Cluster has a new optional parameter principalId + - Interface Cluster has a new optional parameter resourceProviderObjectId + - Interface Cluster has a new optional parameter softwareAssuranceProperties + - Interface Cluster has a new optional parameter tenantId + - Interface Cluster has a new optional parameter typeIdentityType + - Interface Cluster has a new optional parameter userAssignedIdentities + - Interface ClusterNode has a new optional parameter ehcResourceId + - Interface ClusterNode has a new optional parameter lastLicensingTimestamp + - Interface ClusterNode has a new optional parameter nodeType + - Interface ClusterNode has a new optional parameter oemActivation + - Interface ClusterNode has a new optional parameter osDisplayVersion + - Interface ClusterPatch has a new optional parameter principalId + - Interface ClusterPatch has a new optional parameter tenantId + - Interface ClusterPatch has a new optional parameter type + - Interface ClusterPatch has a new optional parameter userAssignedIdentities + - Interface ClusterReportedProperties has a new optional parameter clusterType + - Interface ClusterReportedProperties has a new optional parameter manufacturer + - Interface ClusterReportedProperties has a new optional parameter oemActivation + - Interface ClusterReportedProperties has a new optional parameter supportedCapabilities + - Interface Extension has a new optional parameter enableAutomaticUpgrade + - Interface Extension has a new optional parameter managedBy + - Interface PerNodeExtensionState has a new optional parameter instanceView + - Interface PerNodeExtensionState has a new optional parameter typeHandlerVersion + - Interface Resource has a new optional parameter systemData + - Added Enum KnownAvailabilityType + - Added Enum KnownClusterNodeType + - Added Enum KnownConnectivityStatus + - Added Enum KnownExtensionManagedBy + - Added Enum KnownHealthState + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownOemActivation + - Added Enum KnownRebootRequirement + - Added Enum KnownServiceName + - Added Enum KnownSeverity + - Added Enum KnownSoftwareAssuranceIntent + - Added Enum KnownSoftwareAssuranceStatus + - Added Enum KnownState + - Added Enum KnownStatusLevelTypes + - Added Enum KnownUpdateRunPropertiesState + - Added Enum KnownUpdateSummariesPropertiesState + - Enum KnownArcSettingAggregateState has a new value Accepted + - Enum KnownArcSettingAggregateState has a new value DisableInProgress + - Enum KnownArcSettingAggregateState has a new value Provisioning + - Enum KnownExtensionAggregateState has a new value Accepted + - Enum KnownExtensionAggregateState has a new value Provisioning + - Enum KnownExtensionAggregateState has a new value UpgradeFailedRollbackSucceeded + - Enum KnownNodeArcState has a new value Accepted + - Enum KnownNodeArcState has a new value DisableInProgress + - Enum KnownNodeArcState has a new value InProgress + - Enum KnownNodeArcState has a new value PartiallyConnected + - Enum KnownNodeArcState has a new value PartiallySucceeded + - Enum KnownNodeArcState has a new value Provisioning + - Enum KnownNodeExtensionState has a new value Accepted + - Enum KnownNodeExtensionState has a new value InProgress + - Enum KnownNodeExtensionState has a new value PartiallyConnected + - Enum KnownNodeExtensionState has a new value PartiallySucceeded + - Enum KnownNodeExtensionState has a new value Provisioning + - Enum KnownProvisioningState has a new value Connected + - Enum KnownProvisioningState has a new value Creating + - Enum KnownProvisioningState has a new value Deleted + - Enum KnownProvisioningState has a new value Deleting + - Enum KnownProvisioningState has a new value DisableInProgress + - Enum KnownProvisioningState has a new value Disconnected + - Enum KnownProvisioningState has a new value Error + - Enum KnownProvisioningState has a new value InProgress + - Enum KnownProvisioningState has a new value Moving + - Enum KnownProvisioningState has a new value NotSpecified + - Enum KnownProvisioningState has a new value PartiallyConnected + - Enum KnownProvisioningState has a new value PartiallySucceeded + - Enum KnownProvisioningState has a new value Updating + - Enum KnownStatus has a new value Failed + - Enum KnownStatus has a new value InProgress + - Enum KnownStatus has a new value NotSpecified + - Enum KnownStatus has a new value Succeeded -### Other Changes +**Breaking Changes** + - Operation Extensions.beginUpdate has a new signature + - Operation Extensions.beginUpdateAndWait has a new signature + - Interface ArcSetting no longer has parameter createdAt + - Interface ArcSetting no longer has parameter createdBy + - Interface ArcSetting no longer has parameter createdByType + - Interface ArcSetting no longer has parameter lastModifiedAt + - Interface ArcSetting no longer has parameter lastModifiedBy + - Interface ArcSetting no longer has parameter lastModifiedByType + - Interface Cluster no longer has parameter createdAt + - Interface Cluster no longer has parameter createdBy + - Interface Cluster no longer has parameter createdByType + - Interface Cluster no longer has parameter lastModifiedAt + - Interface Cluster no longer has parameter lastModifiedBy + - Interface Cluster no longer has parameter lastModifiedByType + - Interface Extension no longer has parameter createdAt + - Interface Extension no longer has parameter createdBy + - Interface Extension no longer has parameter createdByType + - Interface Extension no longer has parameter lastModifiedAt + - Interface Extension no longer has parameter lastModifiedBy + - Interface Extension no longer has parameter lastModifiedByType + + ## 3.1.0 (2022-11-16) **Features** @@ -91,4 +308,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/azurestackhci/arm-azurestackhci/LICENSE b/sdk/azurestackhci/arm-azurestackhci/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/azurestackhci/arm-azurestackhci/LICENSE +++ b/sdk/azurestackhci/arm-azurestackhci/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/azurestackhci/arm-azurestackhci/_meta.json b/sdk/azurestackhci/arm-azurestackhci/_meta.json index 2a18bb91ca5c..e160ba132702 100644 --- a/sdk/azurestackhci/arm-azurestackhci/_meta.json +++ b/sdk/azurestackhci/arm-azurestackhci/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "2b552dbc5aae2493e3896221a6f882893262f6a2", "readme": "specification/azurestackhci/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\\azurestackhci\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/azurestackhci/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/azurestackhci/arm-azurestackhci/package.json b/sdk/azurestackhci/arm-azurestackhci/package.json index e873490e0945..3c8cc76f58cb 100644 --- a/sdk/azurestackhci/arm-azurestackhci/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureStackHCIClient.", - "version": "3.1.1", + "version": "4.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -33,24 +33,24 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", - "@azure/identity": "^3.3.0", + "rimraf": "^5.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", - "mocha": "^10.0.0", + "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestackhci/arm-azurestackhci", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -84,7 +84,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,12 +112,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-azurestackhci?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestackhci/arm-azurestackhci" +} \ No newline at end of file diff --git a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md index fe5aa9e1cd83..83986bb13fbd 100644 --- a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md +++ b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md @@ -6,9 +6,9 @@ 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 type ActionType = string; @@ -16,6 +16,7 @@ export type ActionType = string; // @public export interface ArcConnectivityProperties { enabled?: boolean; + serviceConfigurations?: ServiceConfiguration[]; } // @public @@ -39,12 +40,7 @@ export interface ArcSetting extends ProxyResource { arcInstanceResourceGroup?: string; arcServicePrincipalObjectId?: string; connectivityProperties?: Record; - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; + readonly defaultExtensions?: DefaultExtensionDetails[]; readonly perNodeDetails?: PerNodeState[]; readonly provisioningState?: ProvisioningState; } @@ -60,10 +56,13 @@ export interface ArcSettingList { // @public export interface ArcSettings { - beginCreateIdentity(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams): Promise, ArcSettingsCreateIdentityResponse>>; + beginCreateIdentity(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams): Promise, ArcSettingsCreateIdentityResponse>>; beginCreateIdentityAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams): Promise; + beginInitializeDisableProcess(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsInitializeDisableProcessOptionalParams): Promise, void>>; + beginInitializeDisableProcessAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsInitializeDisableProcessOptionalParams): Promise; + consentAndInstallDefaultExtensions(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams): Promise; create(resourceGroupName: string, clusterName: string, arcSettingName: string, arcSetting: ArcSetting, options?: ArcSettingsCreateOptionalParams): Promise; generatePassword(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsGeneratePasswordOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ArcSettingsGetOptionalParams): Promise; @@ -71,6 +70,13 @@ export interface ArcSettings { update(resourceGroupName: string, clusterName: string, arcSettingName: string, arcSetting: ArcSettingsPatch, options?: ArcSettingsUpdateOptionalParams): Promise; } +// @public +export interface ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ArcSettingsConsentAndInstallDefaultExtensionsResponse = ArcSetting; + // @public export interface ArcSettingsCreateIdentityOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -107,6 +113,12 @@ export interface ArcSettingsGetOptionalParams extends coreClient.OperationOption // @public export type ArcSettingsGetResponse = ArcSetting; +// @public +export interface ArcSettingsInitializeDisableProcessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface ArcSettingsListByClusterNextOptionalParams extends coreClient.OperationOptions { } @@ -136,6 +148,9 @@ export interface ArcSettingsUpdateOptionalParams extends coreClient.OperationOpt // @public export type ArcSettingsUpdateResponse = ArcSetting; +// @public +export type AvailabilityType = string; + // @public (undocumented) export class AzureStackHCIClient extends coreClient.ServiceClient { // (undocumented) @@ -150,9 +165,21 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { // (undocumented) extensions: Extensions; // (undocumented) + offers: Offers; + // (undocumented) operations: Operations; // (undocumented) + publishers: Publishers; + // (undocumented) + skus: Skus; + // (undocumented) subscriptionId: string; + // (undocumented) + updateRuns: UpdateRuns; + // (undocumented) + updates: Updates; + // (undocumented) + updateSummariesOperations: UpdateSummariesOperations; } // @public @@ -171,21 +198,25 @@ export interface Cluster extends TrackedResource { readonly billingModel?: string; readonly cloudId?: string; cloudManagementEndpoint?: string; - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; + readonly connectivityStatus?: ConnectivityStatus; desiredProperties?: ClusterDesiredProperties; + readonly isolatedVmAttestationConfiguration?: IsolatedVmAttestationConfiguration; readonly lastBillingTimestamp?: Date; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; readonly lastSyncTimestamp?: Date; + readonly principalId?: string; readonly provisioningState?: ProvisioningState; readonly registrationTimestamp?: Date; readonly reportedProperties?: ClusterReportedProperties; + readonly resourceProviderObjectId?: string; readonly serviceEndpoint?: string; + softwareAssuranceProperties?: SoftwareAssuranceProperties; readonly status?: Status; + readonly tenantId?: string; readonly trialDaysRemaining?: number; + typeIdentityType?: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; } // @public @@ -215,46 +246,66 @@ export interface ClusterList { // @public export interface ClusterNode { readonly coreCount?: number; + readonly ehcResourceId?: string; readonly id?: number; + readonly lastLicensingTimestamp?: Date; readonly manufacturer?: string; readonly memoryInGiB?: number; readonly model?: string; readonly name?: string; + readonly nodeType?: ClusterNodeType; + readonly oemActivation?: OemActivation; + readonly osDisplayVersion?: string; readonly osName?: string; readonly osVersion?: string; readonly serialNumber?: string; readonly windowsServerSubscription?: WindowsServerSubscription; } +// @public +export type ClusterNodeType = string; + // @public export interface ClusterPatch { aadClientId?: string; aadTenantId?: string; cloudManagementEndpoint?: string; desiredProperties?: ClusterDesiredProperties; + readonly principalId?: string; tags?: { [propertyName: string]: string; }; + readonly tenantId?: string; + type?: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; } // @public export interface ClusterReportedProperties { readonly clusterId?: string; readonly clusterName?: string; + readonly clusterType?: ClusterNodeType; readonly clusterVersion?: string; diagnosticLevel?: DiagnosticLevel; readonly imdsAttestation?: ImdsAttestation; readonly lastUpdated?: Date; + readonly manufacturer?: string; readonly nodes?: ClusterNode[]; + readonly oemActivation?: OemActivation; + readonly supportedCapabilities?: string[]; } // @public export interface Clusters { - beginCreateIdentity(resourceGroupName: string, clusterName: string, options?: ClustersCreateIdentityOptionalParams): Promise, ClustersCreateIdentityResponse>>; + beginCreateIdentity(resourceGroupName: string, clusterName: string, options?: ClustersCreateIdentityOptionalParams): Promise, ClustersCreateIdentityResponse>>; beginCreateIdentityAndWait(resourceGroupName: string, clusterName: string, options?: ClustersCreateIdentityOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginUploadCertificate(resourceGroupName: string, clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams): Promise, void>>; + beginExtendSoftwareAssuranceBenefit(resourceGroupName: string, clusterName: string, softwareAssuranceChangeRequest: SoftwareAssuranceChangeRequest, options?: ClustersExtendSoftwareAssuranceBenefitOptionalParams): Promise, ClustersExtendSoftwareAssuranceBenefitResponse>>; + beginExtendSoftwareAssuranceBenefitAndWait(resourceGroupName: string, clusterName: string, softwareAssuranceChangeRequest: SoftwareAssuranceChangeRequest, options?: ClustersExtendSoftwareAssuranceBenefitOptionalParams): Promise; + beginUploadCertificate(resourceGroupName: string, clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams): Promise, void>>; beginUploadCertificateAndWait(resourceGroupName: string, clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams): Promise; create(resourceGroupName: string, clusterName: string, cluster: Cluster, options?: ClustersCreateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; @@ -285,6 +336,15 @@ export interface ClustersDeleteOptionalParams extends coreClient.OperationOption updateIntervalInMs?: number; } +// @public +export interface ClustersExtendSoftwareAssuranceBenefitOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClustersExtendSoftwareAssuranceBenefitResponse = Cluster; + // @public export interface ClustersGetOptionalParams extends coreClient.OperationOptions { } @@ -333,9 +393,18 @@ export interface ClustersUploadCertificateOptionalParams extends coreClient.Oper updateIntervalInMs?: number; } +// @public +export type ConnectivityStatus = string; + // @public export type CreatedByType = string; +// @public +export interface DefaultExtensionDetails { + readonly category?: string; + readonly consentTime?: Date; +} + // @public export type DiagnosticLevel = string; @@ -363,13 +432,9 @@ export interface ErrorResponse { export interface Extension extends ProxyResource { readonly aggregateState?: ExtensionAggregateState; autoUpgradeMinorVersion?: boolean; - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; + enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; + readonly managedBy?: ExtensionManagedBy; readonly perNodeExtensionDetails?: PerNodeExtensionState[]; protectedSettings?: Record; readonly provisioningState?: ProvisioningState; @@ -382,20 +447,55 @@ export interface Extension extends ProxyResource { // @public export type ExtensionAggregateState = string; +// @public +export interface ExtensionInstanceView { + name?: string; + status?: ExtensionInstanceViewStatus; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export interface ExtensionInstanceViewStatus { + code?: string; + displayStatus?: string; + level?: StatusLevelTypes; + message?: string; + time?: Date; +} + // @public export interface ExtensionList { readonly nextLink?: string; readonly value?: Extension[]; } +// @public +export type ExtensionManagedBy = string; + +// @public +export interface ExtensionPatch { + extensionParameters?: ExtensionPatchParameters; +} + +// @public +export interface ExtensionPatchParameters { + enableAutomaticUpgrade?: boolean; + protectedSettings?: Record; + settings?: Record; + typeHandlerVersion?: string; +} + // @public export interface Extensions { - beginCreate(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsCreateOptionalParams): Promise, ExtensionsCreateResponse>>; + beginCreate(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsCreateOptionalParams): Promise, ExtensionsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsUpdateOptionalParams): Promise, ExtensionsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: Extension, options?: ExtensionsUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: ExtensionPatch, options?: ExtensionsUpdateOptionalParams): Promise, ExtensionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extension: ExtensionPatch, options?: ExtensionsUpdateOptionalParams): Promise; + beginUpgrade(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extensionUpgradeParameters: ExtensionUpgradeParameters, options?: ExtensionsUpgradeOptionalParams): Promise, void>>; + beginUpgradeAndWait(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, extensionUpgradeParameters: ExtensionUpgradeParameters, options?: ExtensionsUpgradeOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, arcSettingName: string, extensionName: string, options?: ExtensionsGetOptionalParams): Promise; listByArcSetting(resourceGroupName: string, clusterName: string, arcSettingName: string, options?: ExtensionsListByArcSettingOptionalParams): PagedAsyncIterableIterator; } @@ -445,12 +545,33 @@ export interface ExtensionsUpdateOptionalParams extends coreClient.OperationOpti // @public export type ExtensionsUpdateResponse = Extension; +// @public +export interface ExtensionsUpgradeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ExtensionUpgradeParameters { + targetVersion?: string; +} + // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export type HealthState = string; + // @public export type ImdsAttestation = string; +// @public +export interface IsolatedVmAttestationConfiguration { + readonly attestationResourceId?: string; + readonly attestationServiceEndpoint?: string; + readonly relyingPartyServiceEndpoint?: string; +} + // @public export enum KnownActionType { Internal = "Internal" @@ -458,11 +579,13 @@ export enum KnownActionType { // @public export enum KnownArcSettingAggregateState { + Accepted = "Accepted", Canceled = "Canceled", Connected = "Connected", Creating = "Creating", Deleted = "Deleted", Deleting = "Deleting", + DisableInProgress = "DisableInProgress", Disconnected = "Disconnected", Error = "Error", Failed = "Failed", @@ -471,10 +594,34 @@ export enum KnownArcSettingAggregateState { NotSpecified = "NotSpecified", PartiallyConnected = "PartiallyConnected", PartiallySucceeded = "PartiallySucceeded", + Provisioning = "Provisioning", Succeeded = "Succeeded", Updating = "Updating" } +// @public +export enum KnownAvailabilityType { + Local = "Local", + Notify = "Notify", + Online = "Online" +} + +// @public +export enum KnownClusterNodeType { + FirstParty = "FirstParty", + ThirdParty = "ThirdParty" +} + +// @public +export enum KnownConnectivityStatus { + Connected = "Connected", + Disconnected = "Disconnected", + NotConnectedRecently = "NotConnectedRecently", + NotSpecified = "NotSpecified", + NotYetRegistered = "NotYetRegistered", + PartiallyConnected = "PartiallyConnected" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -492,6 +639,7 @@ export enum KnownDiagnosticLevel { // @public export enum KnownExtensionAggregateState { + Accepted = "Accepted", Canceled = "Canceled", Connected = "Connected", Creating = "Creating", @@ -505,8 +653,26 @@ export enum KnownExtensionAggregateState { NotSpecified = "NotSpecified", PartiallyConnected = "PartiallyConnected", PartiallySucceeded = "PartiallySucceeded", + Provisioning = "Provisioning", Succeeded = "Succeeded", - Updating = "Updating" + Updating = "Updating", + UpgradeFailedRollbackSucceeded = "UpgradeFailedRollbackSucceeded" +} + +// @public +export enum KnownExtensionManagedBy { + Azure = "Azure", + User = "User" +} + +// @public +export enum KnownHealthState { + Error = "Error", + Failure = "Failure", + InProgress = "InProgress", + Success = "Success", + Unknown = "Unknown", + Warning = "Warning" } // @public @@ -515,24 +681,39 @@ export enum KnownImdsAttestation { Enabled = "Enabled" } +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + UserAssigned = "UserAssigned" +} + // @public export enum KnownNodeArcState { + Accepted = "Accepted", Canceled = "Canceled", Connected = "Connected", Creating = "Creating", Deleted = "Deleted", Deleting = "Deleting", + DisableInProgress = "DisableInProgress", Disconnected = "Disconnected", Error = "Error", Failed = "Failed", + InProgress = "InProgress", Moving = "Moving", NotSpecified = "NotSpecified", + PartiallyConnected = "PartiallyConnected", + PartiallySucceeded = "PartiallySucceeded", + Provisioning = "Provisioning", Succeeded = "Succeeded", Updating = "Updating" } // @public export enum KnownNodeExtensionState { + Accepted = "Accepted", Canceled = "Canceled", Connected = "Connected", Creating = "Creating", @@ -541,12 +722,22 @@ export enum KnownNodeExtensionState { Disconnected = "Disconnected", Error = "Error", Failed = "Failed", + InProgress = "InProgress", Moving = "Moving", NotSpecified = "NotSpecified", + PartiallyConnected = "PartiallyConnected", + PartiallySucceeded = "PartiallySucceeded", + Provisioning = "Provisioning", Succeeded = "Succeeded", Updating = "Updating" } +// @public +export enum KnownOemActivation { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownOrigin { System = "system", @@ -558,9 +749,76 @@ export enum KnownOrigin { export enum KnownProvisioningState { Accepted = "Accepted", Canceled = "Canceled", + Connected = "Connected", + Creating = "Creating", + Deleted = "Deleted", + Deleting = "Deleting", + DisableInProgress = "DisableInProgress", + Disconnected = "Disconnected", + Error = "Error", Failed = "Failed", + InProgress = "InProgress", + Moving = "Moving", + NotSpecified = "NotSpecified", + PartiallyConnected = "PartiallyConnected", + PartiallySucceeded = "PartiallySucceeded", Provisioning = "Provisioning", - Succeeded = "Succeeded" + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownRebootRequirement { + False = "False", + True = "True", + Unknown = "Unknown" +} + +// @public +export enum KnownServiceName { + WAC = "WAC" +} + +// @public +export enum KnownSeverity { + Critical = "Critical", + Hidden = "Hidden", + Informational = "Informational", + Warning = "Warning" +} + +// @public +export enum KnownSoftwareAssuranceIntent { + Disable = "Disable", + Enable = "Enable" +} + +// @public +export enum KnownSoftwareAssuranceStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownState { + DownloadFailed = "DownloadFailed", + Downloading = "Downloading", + HasPrerequisite = "HasPrerequisite", + HealthCheckFailed = "HealthCheckFailed", + HealthChecking = "HealthChecking", + InstallationFailed = "InstallationFailed", + Installed = "Installed", + Installing = "Installing", + Invalid = "Invalid", + NotApplicableBecauseAnotherUpdateIsInProgress = "NotApplicableBecauseAnotherUpdateIsInProgress", + Obsolete = "Obsolete", + PreparationFailed = "PreparationFailed", + Preparing = "Preparing", + Ready = "Ready", + ReadyToInstall = "ReadyToInstall", + Recalled = "Recalled", + ScanFailed = "ScanFailed", + ScanInProgress = "ScanInProgress" } // @public @@ -568,8 +826,39 @@ export enum KnownStatus { ConnectedRecently = "ConnectedRecently", Disconnected = "Disconnected", Error = "Error", + Failed = "Failed", + InProgress = "InProgress", NotConnectedRecently = "NotConnectedRecently", - NotYetRegistered = "NotYetRegistered" + NotSpecified = "NotSpecified", + NotYetRegistered = "NotYetRegistered", + Succeeded = "Succeeded" +} + +// @public +export enum KnownStatusLevelTypes { + Error = "Error", + Info = "Info", + Warning = "Warning" +} + +// @public +export enum KnownUpdateRunPropertiesState { + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded", + Unknown = "Unknown" +} + +// @public +export enum KnownUpdateSummariesPropertiesState { + AppliedSuccessfully = "AppliedSuccessfully", + NeedsAttention = "NeedsAttention", + PreparationFailed = "PreparationFailed", + PreparationInProgress = "PreparationInProgress", + Unknown = "Unknown", + UpdateAvailable = "UpdateAvailable", + UpdateFailed = "UpdateFailed", + UpdateInProgress = "UpdateInProgress" } // @public @@ -578,12 +867,78 @@ export enum KnownWindowsServerSubscription { Enabled = "Enabled" } +// @public +export type ManagedServiceIdentityType = string; + // @public export type NodeArcState = string; // @public export type NodeExtensionState = string; +// @public +export type OemActivation = string; + +// @public +export interface Offer extends ProxyResource { + content?: string; + contentVersion?: string; + readonly provisioningState?: string; + publisherId?: string; + skuMappings?: SkuMappings[]; +} + +// @public +export interface OfferList { + readonly nextLink?: string; + readonly value?: Offer[]; +} + +// @public +export interface Offers { + get(resourceGroupName: string, clusterName: string, publisherName: string, offerName: string, options?: OffersGetOptionalParams): Promise; + listByCluster(resourceGroupName: string, clusterName: string, options?: OffersListByClusterOptionalParams): PagedAsyncIterableIterator; + listByPublisher(resourceGroupName: string, clusterName: string, publisherName: string, options?: OffersListByPublisherOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OffersGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type OffersGetResponse = Offer; + +// @public +export interface OffersListByClusterNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OffersListByClusterNextResponse = OfferList; + +// @public +export interface OffersListByClusterOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type OffersListByClusterResponse = OfferList; + +// @public +export interface OffersListByPublisherNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OffersListByPublisherNextResponse = OfferList; + +// @public +export interface OffersListByPublisherOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type OffersListByPublisherResponse = OfferList; + // @public export interface Operation { readonly actionType?: ActionType; @@ -622,6 +977,13 @@ export type OperationsListResponse = OperationListResult; // @public export type Origin = string; +// @public +export interface PackageVersionInfo { + lastUpdated?: Date; + packageType?: string; + version?: string; +} + // @public (undocumented) export interface PasswordCredential { // (undocumented) @@ -637,8 +999,10 @@ export interface PasswordCredential { // @public export interface PerNodeExtensionState { readonly extension?: string; + readonly instanceView?: ExtensionInstanceView; readonly name?: string; readonly state?: NodeExtensionState; + readonly typeHandlerVersion?: string; } // @public @@ -648,6 +1012,28 @@ export interface PerNodeState { readonly state?: NodeArcState; } +// @public (undocumented) +export interface PrecheckResult { + additionalData?: string; + description?: string; + healthCheckSource?: string; + name?: string; + remediation?: string; + severity?: Severity; + status?: Status; + tags?: PrecheckResultTags; + targetResourceID?: string; + targetResourceName?: string; + timestamp?: Date; + title?: string; +} + +// @public +export interface PrecheckResultTags { + key?: string; + value?: string; +} + // @public export type ProvisioningState = string; @@ -655,22 +1041,180 @@ export type ProvisioningState = string; export interface ProxyResource extends Resource { } +// @public +export interface Publisher extends ProxyResource { + readonly provisioningState?: string; +} + +// @public +export interface PublisherList { + readonly nextLink?: string; + readonly value?: Publisher[]; +} + +// @public +export interface Publishers { + get(resourceGroupName: string, clusterName: string, publisherName: string, options?: PublishersGetOptionalParams): Promise; + listByCluster(resourceGroupName: string, clusterName: string, options?: PublishersListByClusterOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PublishersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PublishersGetResponse = Publisher; + +// @public +export interface PublishersListByClusterNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PublishersListByClusterNextResponse = PublisherList; + +// @public +export interface PublishersListByClusterOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PublishersListByClusterResponse = PublisherList; + // @public (undocumented) export interface RawCertificateData { // (undocumented) certificates?: string[]; } +// @public +export type RebootRequirement = string; + // @public export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } +// @public +export interface ServiceConfiguration { + port: number; + serviceName: ServiceName; +} + +// @public +export type ServiceName = string; + +// @public +export type Severity = string; + +// @public +export interface Sku extends ProxyResource { + content?: string; + contentVersion?: string; + offerId?: string; + readonly provisioningState?: string; + publisherId?: string; + skuMappings?: SkuMappings[]; +} + +// @public +export interface SkuList { + readonly nextLink?: string; + readonly value?: Sku[]; +} + +// @public +export interface SkuMappings { + catalogPlanId?: string; + marketplaceSkuId?: string; + marketplaceSkuVersions?: string[]; +} + +// @public +export interface Skus { + get(resourceGroupName: string, clusterName: string, publisherName: string, offerName: string, skuName: string, options?: SkusGetOptionalParams): Promise; + listByOffer(resourceGroupName: string, clusterName: string, publisherName: string, offerName: string, options?: SkusListByOfferOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SkusGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type SkusGetResponse = Sku; + +// @public +export interface SkusListByOfferNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SkusListByOfferNextResponse = SkuList; + +// @public +export interface SkusListByOfferOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type SkusListByOfferResponse = SkuList; + +// @public (undocumented) +export interface SoftwareAssuranceChangeRequest { + // (undocumented) + properties?: SoftwareAssuranceChangeRequestProperties; +} + +// @public (undocumented) +export interface SoftwareAssuranceChangeRequestProperties { + softwareAssuranceIntent?: SoftwareAssuranceIntent; +} + +// @public +export type SoftwareAssuranceIntent = string; + +// @public +export interface SoftwareAssuranceProperties { + readonly lastUpdated?: Date; + softwareAssuranceIntent?: SoftwareAssuranceIntent; + readonly softwareAssuranceStatus?: SoftwareAssuranceStatus; +} + +// @public +export type SoftwareAssuranceStatus = string; + +// @public +export type State = string; + // @public export type Status = string; +// @public +export type StatusLevelTypes = string; + +// @public +export interface Step { + description?: string; + endTimeUtc?: Date; + errorMessage?: string; + lastUpdatedTimeUtc?: Date; + name?: string; + startTimeUtc?: Date; + status?: string; + steps?: Step[]; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + // @public export interface TrackedResource extends Resource { location: string; @@ -679,12 +1223,267 @@ export interface TrackedResource extends Resource { }; } +// @public +export interface Update extends ProxyResource { + additionalProperties?: string; + availabilityType?: AvailabilityType; + componentVersions?: PackageVersionInfo[]; + description?: string; + displayName?: string; + healthCheckDate?: Date; + healthCheckResult?: PrecheckResult[]; + healthState?: HealthState; + installedDate?: Date; + location?: string; + notifyMessage?: string; + packagePath?: string; + packageSizeInMb?: number; + packageType?: string; + prerequisites?: UpdatePrerequisite[]; + progressPercentage?: number; + readonly provisioningState?: ProvisioningState; + publisher?: string; + // (undocumented) + rebootRequired?: RebootRequirement; + releaseLink?: string; + state?: State; + version?: string; +} + +// @public +export interface UpdateList { + readonly nextLink?: string; + value?: Update[]; +} + +// @public +export interface UpdatePrerequisite { + packageName?: string; + updateType?: string; + version?: string; +} + +// @public +export interface UpdateRun extends ProxyResource { + description?: string; + duration?: string; + endTimeUtc?: Date; + errorMessage?: string; + lastUpdatedTime?: Date; + lastUpdatedTimeUtc?: Date; + location?: string; + namePropertiesProgressName?: string; + readonly provisioningState?: ProvisioningState; + startTimeUtc?: Date; + state?: UpdateRunPropertiesState; + status?: string; + steps?: Step[]; + timeStarted?: Date; +} + +// @public +export interface UpdateRunList { + readonly nextLink?: string; + value?: UpdateRun[]; +} + +// @public +export type UpdateRunPropertiesState = string; + +// @public +export interface UpdateRuns { + beginDelete(resourceGroupName: string, clusterName: string, updateName: string, updateRunName: string, options?: UpdateRunsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, clusterName: string, updateName: string, updateRunName: string, options?: UpdateRunsDeleteOptionalParams): Promise; + get(resourceGroupName: string, clusterName: string, updateName: string, updateRunName: string, options?: UpdateRunsGetOptionalParams): Promise; + list(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdateRunsListOptionalParams): PagedAsyncIterableIterator; + put(resourceGroupName: string, clusterName: string, updateName: string, updateRunName: string, updateRunsProperties: UpdateRun, options?: UpdateRunsPutOptionalParams): Promise; +} + +// @public +export interface UpdateRunsDeleteHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface UpdateRunsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface UpdateRunsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateRunsGetResponse = UpdateRun; + +// @public +export interface UpdateRunsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateRunsListNextResponse = UpdateRunList; + +// @public +export interface UpdateRunsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateRunsListResponse = UpdateRunList; + +// @public +export interface UpdateRunsPutOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateRunsPutResponse = UpdateRun; + +// @public +export interface Updates { + beginDelete(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdatesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdatesDeleteOptionalParams): Promise; + beginPost(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdatesPostOptionalParams): Promise, void>>; + beginPostAndWait(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdatesPostOptionalParams): Promise; + get(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdatesGetOptionalParams): Promise; + list(resourceGroupName: string, clusterName: string, options?: UpdatesListOptionalParams): PagedAsyncIterableIterator; + put(resourceGroupName: string, clusterName: string, updateName: string, updateProperties: Update, options?: UpdatesPutOptionalParams): Promise; +} + +// @public +export interface UpdatesDeleteHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface UpdatesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface UpdatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdatesGetResponse = Update; + +// @public +export interface UpdatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdatesListNextResponse = UpdateList; + +// @public +export interface UpdatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdatesListResponse = UpdateList; + +// @public +export interface UpdatesPostHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface UpdatesPostOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface UpdatesPutOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdatesPutResponse = Update; + +// @public +export interface UpdateSummaries extends ProxyResource { + currentVersion?: string; + hardwareModel?: string; + healthCheckDate?: Date; + healthCheckResult?: PrecheckResult[]; + healthState?: HealthState; + lastChecked?: Date; + lastUpdated?: Date; + location?: string; + oemFamily?: string; + packageVersions?: PackageVersionInfo[]; + readonly provisioningState?: ProvisioningState; + state?: UpdateSummariesPropertiesState; +} + +// @public +export interface UpdateSummariesDeleteHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface UpdateSummariesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface UpdateSummariesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateSummariesGetResponse = UpdateSummaries; + +// @public +export interface UpdateSummariesList { + readonly nextLink?: string; + value?: UpdateSummaries[]; +} + +// @public +export interface UpdateSummariesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateSummariesListNextResponse = UpdateSummariesList; + +// @public +export interface UpdateSummariesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateSummariesListResponse = UpdateSummariesList; + +// @public +export interface UpdateSummariesOperations { + beginDelete(resourceGroupName: string, clusterName: string, options?: UpdateSummariesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: UpdateSummariesDeleteOptionalParams): Promise; + get(resourceGroupName: string, clusterName: string, options?: UpdateSummariesGetOptionalParams): Promise; + list(resourceGroupName: string, clusterName: string, options?: UpdateSummariesListOptionalParams): PagedAsyncIterableIterator; + put(resourceGroupName: string, clusterName: string, updateLocationProperties: UpdateSummaries, options?: UpdateSummariesPutOptionalParams): Promise; +} + +// @public +export type UpdateSummariesPropertiesState = string; + +// @public +export interface UpdateSummariesPutOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UpdateSummariesPutResponse = UpdateSummaries; + // @public (undocumented) export interface UploadCertificateRequest { // (undocumented) properties?: RawCertificateData; } +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + // @public export type WindowsServerSubscription = string; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts index 331390013c19..486ffed9c21a 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts @@ -18,13 +18,25 @@ import { ArcSettingsImpl, ClustersImpl, ExtensionsImpl, - OperationsImpl + OffersImpl, + OperationsImpl, + PublishersImpl, + SkusImpl, + UpdateRunsImpl, + UpdateSummariesOperationsImpl, + UpdatesImpl } from "./operations"; import { ArcSettings, Clusters, Extensions, - Operations + Offers, + Operations, + Publishers, + Skus, + UpdateRuns, + UpdateSummariesOperations, + Updates } from "./operationsInterfaces"; import { AzureStackHCIClientOptionalParams } from "./models"; @@ -60,7 +72,7 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-azurestackhci/3.1.1`; + const packageDetails = `azsdk-js-arm-azurestackhci/4.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -113,11 +125,17 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; + this.apiVersion = options.apiVersion || "2023-08-01"; this.arcSettings = new ArcSettingsImpl(this); this.clusters = new ClustersImpl(this); this.extensions = new ExtensionsImpl(this); + this.offers = new OffersImpl(this); this.operations = new OperationsImpl(this); + this.publishers = new PublishersImpl(this); + this.skus = new SkusImpl(this); + this.updateRuns = new UpdateRunsImpl(this); + this.updateSummariesOperations = new UpdateSummariesOperationsImpl(this); + this.updates = new UpdatesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -152,5 +170,11 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { arcSettings: ArcSettings; clusters: Clusters; extensions: Extensions; + offers: Offers; operations: Operations; + publishers: Publishers; + skus: Skus; + updateRuns: UpdateRuns; + updateSummariesOperations: UpdateSummariesOperations; + updates: Updates; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/lroImpl.ts b/sdk/azurestackhci/arm-azurestackhci/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/lroImpl.ts +++ b/sdk/azurestackhci/arm-azurestackhci/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/azurestackhci/arm-azurestackhci/src/models/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts index c7e519185fc5..9b89365450e7 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts @@ -41,6 +41,20 @@ export interface PerNodeState { readonly state?: NodeArcState; } +/** Properties for a particular default extension category. */ +export interface DefaultExtensionDetails { + /** + * Default extension category + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly category?: string; + /** + * Consent time for extension category + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly consentTime?: Date; +} + /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** @@ -58,6 +72,27 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ @@ -143,6 +178,36 @@ export interface ClusterList { readonly nextLink?: string; } +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** Software Assurance properties of the cluster. */ +export interface SoftwareAssuranceProperties { + /** + * Status of the Software Assurance for the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly softwareAssuranceStatus?: SoftwareAssuranceStatus; + /** Customer Intent for Software Assurance Benefit. */ + softwareAssuranceIntent?: SoftwareAssuranceIntent; + /** + * TimeStamp denoting the latest SA benefit applicability is validated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdated?: Date; +} + /** Desired properties of the cluster. */ export interface ClusterDesiredProperties { /** Desired state of Windows Server Subscription. */ @@ -185,6 +250,26 @@ export interface ClusterReportedProperties { readonly imdsAttestation?: ImdsAttestation; /** Level of diagnostic data emitted by the cluster. */ diagnosticLevel?: DiagnosticLevel; + /** + * Capabilities supported by the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly supportedCapabilities?: string[]; + /** + * The node type of all the nodes of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clusterType?: ClusterNodeType; + /** + * The manufacturer of all the nodes of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly manufacturer?: string; + /** + * OEM activation status of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly oemActivation?: OemActivation; } /** Cluster node details. */ @@ -204,6 +289,16 @@ export interface ClusterNode { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly windowsServerSubscription?: WindowsServerSubscription; + /** + * Type of the cluster node hardware. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nodeType?: ClusterNodeType; + /** + * Edge Hardware Center Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ehcResourceId?: string; /** * Manufacturer of the cluster node hardware. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -224,6 +319,11 @@ export interface ClusterNode { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osVersion?: string; + /** + * Display version of the operating system running on the cluster node. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osDisplayVersion?: string; /** * Immutable id of the cluster node. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -239,6 +339,35 @@ export interface ClusterNode { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly memoryInGiB?: number; + /** + * Most recent licensing timestamp. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastLicensingTimestamp?: Date; + /** + * OEM activation status of the node. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly oemActivation?: OemActivation; +} + +/** Attestation configurations for isolated VM (e.g. TVM, CVM) of the cluster. */ +export interface IsolatedVmAttestationConfiguration { + /** + * Fully qualified Arm Resource Id of the Microsoft Azure Attestation resource associated with this cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly attestationResourceId?: string; + /** + * Region specific endpoint for relying party service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly relyingPartyServiceEndpoint?: string; + /** + * Region specific endpoint for Microsoft Azure Attestation service for the cluster + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly attestationServiceEndpoint?: string; } /** Cluster details to update. */ @@ -253,6 +382,20 @@ export interface ClusterPatch { aadTenantId?: string; /** Desired properties of the cluster. */ desiredProperties?: ClusterDesiredProperties; + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type?: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; } export interface UploadCertificateRequest { @@ -271,6 +414,15 @@ export interface ClusterIdentityResponse { aadApplicationObjectId?: string; } +export interface SoftwareAssuranceChangeRequest { + properties?: SoftwareAssuranceChangeRequestProperties; +} + +export interface SoftwareAssuranceChangeRequestProperties { + /** Customer Intent for Software Assurance Benefit. */ + softwareAssuranceIntent?: SoftwareAssuranceIntent; +} + /** List of Extensions in HCI cluster. */ export interface ExtensionList { /** @@ -297,11 +449,95 @@ export interface PerNodeExtensionState { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly extension?: string; + /** + * Specifies the version of the script handler. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly typeHandlerVersion?: string; /** * State of Arc Extension in this node. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly state?: NodeExtensionState; + /** + * The extension instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceView?: ExtensionInstanceView; +} + +/** Describes the Extension Instance View. */ +export interface ExtensionInstanceView { + /** The extension name. */ + name?: string; + /** Specifies the type of the extension; an example is "MicrosoftMonitoringAgent". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Instance view status. */ + status?: ExtensionInstanceViewStatus; +} + +/** Instance view status. */ +export interface ExtensionInstanceViewStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: StatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; +} + +/** Extension Details to update */ +export interface ExtensionPatch { + /** Describes the properties of a Machine Extension that can be updated. */ + extensionParameters?: ExtensionPatchParameters; +} + +/** Describes the properties of a Machine Extension that can be updated. */ +export interface ExtensionPatchParameters { + /** Specifies the version of the script handler. Latest version would be used if not specified. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** Protected settings (may contain secrets). */ + protectedSettings?: Record; +} + +/** Describes the parameters for Extension upgrade. */ +export interface ExtensionUpgradeParameters { + /** Extension Upgrade Target Version. */ + targetVersion?: string; +} + +/** List of Offer proxy resources for the HCI cluster. */ +export interface OfferList { + /** + * List of Offer proxy resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Offer[]; + /** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** SKU Mapping details. */ +export interface SkuMappings { + /** Identifier of the CatalogPlan for the sku */ + catalogPlanId?: string; + /** Identifier for the sku */ + marketplaceSkuId?: string; + /** Array of SKU versions available */ + marketplaceSkuVersions?: string[]; } /** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ @@ -368,10 +604,156 @@ export interface OperationDisplay { readonly description?: string; } +/** List of Publisher proxy resources for the HCI cluster. */ +export interface PublisherList { + /** + * List of Publisher proxy resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Publisher[]; + /** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** List of SKU proxy resources for the HCI cluster. */ +export interface SkuList { + /** + * List of SKU proxy resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Sku[]; + /** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** List of Update runs */ +export interface UpdateRunList { + /** List of Update runs */ + value?: UpdateRun[]; + /** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Progress representation of the update run steps. */ +export interface Step { + /** Name of the step. */ + name?: string; + /** More detailed description of the step. */ + description?: string; + /** Error message, specified if the step is in a failed state. */ + errorMessage?: string; + /** Status of the step, bubbled up from the ECE action plan for installation attempts. Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. */ + status?: string; + /** When the step started, or empty if it has not started executing. */ + startTimeUtc?: Date; + /** When the step reached a terminal state. */ + endTimeUtc?: Date; + /** Completion time of this step or the last completed sub-step. */ + lastUpdatedTimeUtc?: Date; + /** Recursive model for child steps of this step. */ + steps?: Step[]; +} + +/** List of Update Summaries */ +export interface UpdateSummariesList { + /** List of Update Summaries */ + value?: UpdateSummaries[]; + /** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Current version of each updatable component. */ +export interface PackageVersionInfo { + /** Package type */ + packageType?: string; + /** Package version */ + version?: string; + /** Last time this component was updated. */ + lastUpdated?: Date; +} + +export interface PrecheckResult { + /** Name of the individual test/rule/alert that was executed. Unique, not exposed to the customer. */ + name?: string; + /** Key-value pairs that allow grouping/filtering individual tests. */ + tags?: PrecheckResultTags; + /** User-facing name; one or more sentences indicating the direct issue. */ + title?: string; + /** The status of the check running (i.e. Failed, Succeeded, In Progress). This answers whether the check ran, and passed or failed. */ + status?: Status; + /** Severity of the result (Critical, Warning, Informational, Hidden). This answers how important the result is. Critical is the only update-blocking severity. */ + severity?: Severity; + /** Detailed overview of the issue and what impact the issue has on the stamp. */ + description?: string; + /** Set of steps that can be taken to resolve the issue found. */ + remediation?: string; + /** The unique identifier for the affected resource (such as a node or drive). */ + targetResourceID?: string; + /** The name of the affected resource. */ + targetResourceName?: string; + /** The Time in which the HealthCheck was called. */ + timestamp?: Date; + /** Property bag of key value pairs for additional information. */ + additionalData?: string; + /** The name of the services called for the HealthCheck (I.E. Test-AzureStack, Test-Cluster). */ + healthCheckSource?: string; +} + +/** Key-value pairs that allow grouping/filtering individual tests. */ +export interface PrecheckResultTags { + /** Key that allow grouping/filtering individual tests. */ + key?: string; + /** Value of the key that allow grouping/filtering individual tests. */ + value?: string; +} + +/** List of Updates */ +export interface UpdateList { + /** List of Updates */ + value?: Update[]; + /** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** If update State is HasPrerequisite, this property contains an array of objects describing prerequisite updates before installing this update. Otherwise, it is empty. */ +export interface UpdatePrerequisite { + /** Updatable component type. */ + updateType?: string; + /** Version of the prerequisite. */ + version?: string; + /** Friendly name of the prerequisite. */ + packageName?: string; +} + /** Connectivity related configuration required by arc server. */ export interface ArcConnectivityProperties { /** True indicates ARC connectivity is enabled */ enabled?: boolean; + /** Service configurations associated with the connectivity resource. They are only processed by the server if 'enabled' property is set to 'true'. */ + serviceConfigurations?: ServiceConfiguration[]; +} + +/** Service configuration details */ +export interface ServiceConfiguration { + /** Name of the service. */ + serviceName: ServiceName; + /** The port on which service is enabled. */ + port: number; } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ @@ -414,18 +796,11 @@ export interface ArcSetting extends ProxyResource { readonly perNodeDetails?: PerNodeState[]; /** contains connectivity related configuration for ARC resources */ connectivityProperties?: Record; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; + /** + * Properties for each of the default extensions category + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultExtensions?: DefaultExtensionDetails[]; } /** Details of a particular extension in HCI Cluster. */ @@ -445,13 +820,18 @@ export interface Extension extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly perNodeExtensionDetails?: PerNodeExtensionState[]; + /** + * Indicates if the extension is managed by azure or the user. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedBy?: ExtensionManagedBy; /** 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". */ typePropertiesExtensionParametersType?: string; - /** Specifies the version of the script handler. */ + /** Specifies the version of the script handler. Latest version would be used if not specified. */ 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; @@ -459,18 +839,169 @@ export interface Extension extends ProxyResource { settings?: Record; /** Protected settings (may contain secrets). */ protectedSettings?: Record; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; +} + +/** Offer details. */ +export interface Offer extends ProxyResource { + /** + * Provisioning State + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** Identifier of the Publisher for the offer */ + publisherId?: string; + /** JSON serialized catalog content of the offer */ + content?: string; + /** The API version of the catalog service used to serve the catalog content */ + contentVersion?: string; + /** Array of SKU mappings */ + skuMappings?: SkuMappings[]; +} + +/** Publisher details. */ +export interface Publisher extends ProxyResource { + /** + * Provisioning State + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + +/** Sku details. */ +export interface Sku extends ProxyResource { + /** + * Provisioning State + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** Identifier of the Publisher for the offer */ + publisherId?: string; + /** Identifier of the Offer for the sku */ + offerId?: string; + /** JSON serialized catalog content of the sku offer */ + content?: string; + /** The API version of the catalog service used to serve the catalog content */ + contentVersion?: string; + /** Array of SKU mappings */ + skuMappings?: SkuMappings[]; +} + +/** Details of an Update run */ +export interface UpdateRun extends ProxyResource { + /** The geo-location where the resource lives */ + location?: string; + /** + * Provisioning state of the UpdateRuns proxy resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Timestamp of the update run was started. */ + timeStarted?: Date; + /** Timestamp of the most recently completed step in the update run. */ + lastUpdatedTime?: Date; + /** Duration of the update run. */ + duration?: string; + /** State of the update run. */ + state?: UpdateRunPropertiesState; + /** Name of the step. */ + namePropertiesProgressName?: string; + /** More detailed description of the step. */ + description?: string; + /** Error message, specified if the step is in a failed state. */ + errorMessage?: string; + /** Status of the step, bubbled up from the ECE action plan for installation attempts. Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. */ + status?: string; + /** When the step started, or empty if it has not started executing. */ + startTimeUtc?: Date; + /** When the step reached a terminal state. */ + endTimeUtc?: Date; + /** Completion time of this step or the last completed sub-step. */ + lastUpdatedTimeUtc?: Date; + /** Recursive model for child steps of this step. */ + steps?: Step[]; +} + +/** Get the update summaries for the cluster */ +export interface UpdateSummaries extends ProxyResource { + /** The geo-location where the resource lives */ + location?: string; + /** + * Provisioning state of the UpdateSummaries proxy resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** OEM family name. */ + oemFamily?: string; + /** Name of the hardware model. */ + hardwareModel?: string; + /** Current version of each updatable component. */ + packageVersions?: PackageVersionInfo[]; + /** Current Solution Bundle version of the stamp. */ + currentVersion?: string; + /** Last time an update installation completed successfully. */ + lastUpdated?: Date; + /** Last time the update service successfully checked for updates */ + lastChecked?: Date; + /** Overall health state for update-specific health checks. */ + healthState?: HealthState; + /** An array of pre-check result objects. */ + healthCheckResult?: PrecheckResult[]; + /** Last time the package-specific checks were run. */ + healthCheckDate?: Date; + /** Overall update state of the stamp. */ + state?: UpdateSummariesPropertiesState; +} + +/** Update details */ +export interface Update extends ProxyResource { + /** The geo-location where the resource lives */ + location?: string; + /** + * Provisioning state of the Updates proxy resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Date that the update was installed. */ + installedDate?: Date; + /** Description of the update. */ + description?: string; + /** State of the update as it relates to this stamp. */ + state?: State; + /** If update State is HasPrerequisite, this property contains an array of objects describing prerequisite updates before installing this update. Otherwise, it is empty. */ + prerequisites?: UpdatePrerequisite[]; + /** An array of component versions for a Solution Bundle update, and an empty array otherwise. */ + componentVersions?: PackageVersionInfo[]; + rebootRequired?: RebootRequirement; + /** Overall health state for update-specific health checks. */ + healthState?: HealthState; + /** An array of PrecheckResult objects. */ + healthCheckResult?: PrecheckResult[]; + /** Last time the package-specific checks were run. */ + healthCheckDate?: Date; + /** Path where the update package is available. */ + packagePath?: string; + /** Size of the package. This value is a combination of the size from update metadata and size of the payload that results from the live scan operation for OS update content. */ + packageSizeInMb?: number; + /** Display name of the Update */ + displayName?: string; + /** Version of the update. */ + version?: string; + /** Publisher of the update package. */ + publisher?: string; + /** Link to release notes for the update. */ + releaseLink?: string; + /** Indicates the way the update content can be downloaded. */ + availabilityType?: AvailabilityType; + /** Customer-visible type of the update. */ + packageType?: string; + /** Extensible KV pairs serialized as a string. This is currently used to report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp based on OEM type. */ + additionalProperties?: string; + /** Progress percentage of ongoing operation. Currently this property is only valid when the update is in the Downloading state, where it maps to how much of the update content has been downloaded. */ + progressPercentage?: number; + /** Brief message with instructions for updates of AvailabilityType Notify. */ + notifyMessage?: string; } /** Cluster details. */ @@ -485,6 +1016,11 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: Status; + /** + * Overall connectivity status for the cluster resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectivityStatus?: ConnectivityStatus; /** * Unique, immutable resource id. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -500,6 +1036,8 @@ export interface Cluster extends TrackedResource { aadApplicationObjectId?: string; /** Id of cluster identity service principal. */ aadServicePrincipalObjectId?: string; + /** Software Assurance properties of the cluster. */ + softwareAssuranceProperties?: SoftwareAssuranceProperties; /** Desired properties of the cluster. */ desiredProperties?: ClusterDesiredProperties; /** @@ -507,6 +1045,11 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly reportedProperties?: ClusterReportedProperties; + /** + * Attestation configurations for isolated VM (e.g. TVM, CVM) of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isolatedVmAttestationConfiguration?: IsolatedVmAttestationConfiguration; /** * Number of days remaining in the trial period. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -537,56 +1080,89 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serviceEndpoint?: string; - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; + /** + * Object id of RP Service Principal + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceProviderObjectId?: string; + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + typeIdentityType?: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; } -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" +/** Defines headers for UpdateRuns_delete operation. */ +export interface UpdateRunsDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; } -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; +/** Defines headers for UpdateSummaries_delete operation. */ +export interface UpdateSummariesDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Updates_post operation. */ +export interface UpdatesPostHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Updates_delete operation. */ +export interface UpdatesDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { + /** NotSpecified */ + NotSpecified = "NotSpecified", + /** Error */ + Error = "Error", /** Succeeded */ Succeeded = "Succeeded", /** Failed */ Failed = "Failed", /** Canceled */ Canceled = "Canceled", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", + /** Deleted */ + Deleted = "Deleted", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Moving */ + Moving = "Moving", + /** PartiallySucceeded */ + PartiallySucceeded = "PartiallySucceeded", + /** PartiallyConnected */ + PartiallyConnected = "PartiallyConnected", + /** InProgress */ + InProgress = "InProgress", /** Accepted */ Accepted = "Accepted", /** Provisioning */ - Provisioning = "Provisioning" + Provisioning = "Provisioning", + /** DisableInProgress */ + DisableInProgress = "DisableInProgress" } /** @@ -594,11 +1170,24 @@ export enum KnownProvisioningState { * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **NotSpecified** \ + * **Error** \ * **Succeeded** \ * **Failed** \ * **Canceled** \ + * **Connected** \ + * **Disconnected** \ + * **Deleted** \ + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Moving** \ + * **PartiallySucceeded** \ + * **PartiallyConnected** \ + * **InProgress** \ * **Accepted** \ - * **Provisioning** + * **Provisioning** \ + * **DisableInProgress** */ export type ProvisioningState = string; @@ -633,7 +1222,13 @@ export enum KnownArcSettingAggregateState { /** PartiallyConnected */ PartiallyConnected = "PartiallyConnected", /** InProgress */ - InProgress = "InProgress" + InProgress = "InProgress", + /** Accepted */ + Accepted = "Accepted", + /** Provisioning */ + Provisioning = "Provisioning", + /** DisableInProgress */ + DisableInProgress = "DisableInProgress" } /** @@ -655,7 +1250,10 @@ export enum KnownArcSettingAggregateState { * **Moving** \ * **PartiallySucceeded** \ * **PartiallyConnected** \ - * **InProgress** + * **InProgress** \ + * **Accepted** \ + * **Provisioning** \ + * **DisableInProgress** */ export type ArcSettingAggregateState = string; @@ -684,7 +1282,19 @@ export enum KnownNodeArcState { /** Deleting */ Deleting = "Deleting", /** Moving */ - Moving = "Moving" + Moving = "Moving", + /** PartiallySucceeded */ + PartiallySucceeded = "PartiallySucceeded", + /** PartiallyConnected */ + PartiallyConnected = "PartiallyConnected", + /** InProgress */ + InProgress = "InProgress", + /** Accepted */ + Accepted = "Accepted", + /** Provisioning */ + Provisioning = "Provisioning", + /** DisableInProgress */ + DisableInProgress = "DisableInProgress" } /** @@ -703,10 +1313,64 @@ export enum KnownNodeArcState { * **Creating** \ * **Updating** \ * **Deleting** \ - * **Moving** + * **Moving** \ + * **PartiallySucceeded** \ + * **PartiallyConnected** \ + * **InProgress** \ + * **Accepted** \ + * **Provisioning** \ + * **DisableInProgress** */ export type NodeArcState = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned" +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned, UserAssigned** + */ +export type ManagedServiceIdentityType = string; + /** Known values of {@link Status} that the service accepts. */ export enum KnownStatus { /** NotYetRegistered */ @@ -718,7 +1382,15 @@ export enum KnownStatus { /** Disconnected */ Disconnected = "Disconnected", /** Error */ - Error = "Error" + Error = "Error", + /** NotSpecified */ + NotSpecified = "NotSpecified", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress" } /** @@ -730,10 +1402,80 @@ export enum KnownStatus { * **ConnectedRecently** \ * **NotConnectedRecently** \ * **Disconnected** \ - * **Error** + * **Error** \ + * **NotSpecified** \ + * **Succeeded** \ + * **Failed** \ + * **InProgress** */ export type Status = string; +/** Known values of {@link ConnectivityStatus} that the service accepts. */ +export enum KnownConnectivityStatus { + /** NotYetRegistered */ + NotYetRegistered = "NotYetRegistered", + /** Connected */ + Connected = "Connected", + /** NotConnectedRecently */ + NotConnectedRecently = "NotConnectedRecently", + /** PartiallyConnected */ + PartiallyConnected = "PartiallyConnected", + /** Disconnected */ + Disconnected = "Disconnected", + /** NotSpecified */ + NotSpecified = "NotSpecified" +} + +/** + * Defines values for ConnectivityStatus. \ + * {@link KnownConnectivityStatus} can be used interchangeably with ConnectivityStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotYetRegistered** \ + * **Connected** \ + * **NotConnectedRecently** \ + * **PartiallyConnected** \ + * **Disconnected** \ + * **NotSpecified** + */ +export type ConnectivityStatus = string; + +/** Known values of {@link SoftwareAssuranceStatus} that the service accepts. */ +export enum KnownSoftwareAssuranceStatus { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for SoftwareAssuranceStatus. \ + * {@link KnownSoftwareAssuranceStatus} can be used interchangeably with SoftwareAssuranceStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type SoftwareAssuranceStatus = string; + +/** Known values of {@link SoftwareAssuranceIntent} that the service accepts. */ +export enum KnownSoftwareAssuranceIntent { + /** Enable */ + Enable = "Enable", + /** Disable */ + Disable = "Disable" +} + +/** + * Defines values for SoftwareAssuranceIntent. \ + * {@link KnownSoftwareAssuranceIntent} can be used interchangeably with SoftwareAssuranceIntent, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enable** \ + * **Disable** + */ +export type SoftwareAssuranceIntent = string; + /** Known values of {@link WindowsServerSubscription} that the service accepts. */ export enum KnownWindowsServerSubscription { /** Disabled */ @@ -773,6 +1515,42 @@ export enum KnownDiagnosticLevel { */ export type DiagnosticLevel = string; +/** Known values of {@link ClusterNodeType} that the service accepts. */ +export enum KnownClusterNodeType { + /** FirstParty */ + FirstParty = "FirstParty", + /** ThirdParty */ + ThirdParty = "ThirdParty" +} + +/** + * Defines values for ClusterNodeType. \ + * {@link KnownClusterNodeType} can be used interchangeably with ClusterNodeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FirstParty** \ + * **ThirdParty** + */ +export type ClusterNodeType = string; + +/** Known values of {@link OemActivation} that the service accepts. */ +export enum KnownOemActivation { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled" +} + +/** + * Defines values for OemActivation. \ + * {@link KnownOemActivation} can be used interchangeably with OemActivation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type OemActivation = string; + /** Known values of {@link ImdsAttestation} that the service accepts. */ export enum KnownImdsAttestation { /** Disabled */ @@ -822,7 +1600,13 @@ export enum KnownExtensionAggregateState { /** PartiallyConnected */ PartiallyConnected = "PartiallyConnected", /** InProgress */ - InProgress = "InProgress" + InProgress = "InProgress", + /** Accepted */ + Accepted = "Accepted", + /** Provisioning */ + Provisioning = "Provisioning", + /** UpgradeFailedRollbackSucceeded */ + UpgradeFailedRollbackSucceeded = "UpgradeFailedRollbackSucceeded" } /** @@ -844,7 +1628,10 @@ export enum KnownExtensionAggregateState { * **Moving** \ * **PartiallySucceeded** \ * **PartiallyConnected** \ - * **InProgress** + * **InProgress** \ + * **Accepted** \ + * **Provisioning** \ + * **UpgradeFailedRollbackSucceeded** */ export type ExtensionAggregateState = string; @@ -873,7 +1660,17 @@ export enum KnownNodeExtensionState { /** Deleting */ Deleting = "Deleting", /** Moving */ - Moving = "Moving" + Moving = "Moving", + /** PartiallySucceeded */ + PartiallySucceeded = "PartiallySucceeded", + /** PartiallyConnected */ + PartiallyConnected = "PartiallyConnected", + /** InProgress */ + InProgress = "InProgress", + /** Accepted */ + Accepted = "Accepted", + /** Provisioning */ + Provisioning = "Provisioning" } /** @@ -892,10 +1689,54 @@ export enum KnownNodeExtensionState { * **Creating** \ * **Updating** \ * **Deleting** \ - * **Moving** + * **Moving** \ + * **PartiallySucceeded** \ + * **PartiallyConnected** \ + * **InProgress** \ + * **Accepted** \ + * **Provisioning** */ export type NodeExtensionState = string; +/** Known values of {@link StatusLevelTypes} that the service accepts. */ +export enum KnownStatusLevelTypes { + /** Info */ + Info = "Info", + /** Warning */ + Warning = "Warning", + /** Error */ + Error = "Error" +} + +/** + * Defines values for StatusLevelTypes. \ + * {@link KnownStatusLevelTypes} can be used interchangeably with StatusLevelTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Info** \ + * **Warning** \ + * **Error** + */ +export type StatusLevelTypes = string; + +/** Known values of {@link ExtensionManagedBy} that the service accepts. */ +export enum KnownExtensionManagedBy { + /** Azure */ + Azure = "Azure", + /** User */ + User = "User" +} + +/** + * Defines values for ExtensionManagedBy. \ + * {@link KnownExtensionManagedBy} can be used interchangeably with ExtensionManagedBy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Azure** \ + * **User** + */ +export type ExtensionManagedBy = string; + /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { /** User */ @@ -932,6 +1773,243 @@ export enum KnownActionType { */ export type ActionType = string; +/** Known values of {@link UpdateRunPropertiesState} that the service accepts. */ +export enum KnownUpdateRunPropertiesState { + /** Unknown */ + Unknown = "Unknown", + /** Succeeded */ + Succeeded = "Succeeded", + /** InProgress */ + InProgress = "InProgress", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for UpdateRunPropertiesState. \ + * {@link KnownUpdateRunPropertiesState} can be used interchangeably with UpdateRunPropertiesState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Succeeded** \ + * **InProgress** \ + * **Failed** + */ +export type UpdateRunPropertiesState = string; + +/** Known values of {@link HealthState} that the service accepts. */ +export enum KnownHealthState { + /** Unknown */ + Unknown = "Unknown", + /** Success */ + Success = "Success", + /** Failure */ + Failure = "Failure", + /** Warning */ + Warning = "Warning", + /** Error */ + Error = "Error", + /** InProgress */ + InProgress = "InProgress" +} + +/** + * Defines values for HealthState. \ + * {@link KnownHealthState} can be used interchangeably with HealthState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Success** \ + * **Failure** \ + * **Warning** \ + * **Error** \ + * **InProgress** + */ +export type HealthState = string; + +/** Known values of {@link Severity} that the service accepts. */ +export enum KnownSeverity { + /** Critical */ + Critical = "Critical", + /** Warning */ + Warning = "Warning", + /** Informational */ + Informational = "Informational", + /** Hidden */ + Hidden = "Hidden" +} + +/** + * Defines values for Severity. \ + * {@link KnownSeverity} can be used interchangeably with Severity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Warning** \ + * **Informational** \ + * **Hidden** + */ +export type Severity = string; + +/** Known values of {@link UpdateSummariesPropertiesState} that the service accepts. */ +export enum KnownUpdateSummariesPropertiesState { + /** Unknown */ + Unknown = "Unknown", + /** AppliedSuccessfully */ + AppliedSuccessfully = "AppliedSuccessfully", + /** UpdateAvailable */ + UpdateAvailable = "UpdateAvailable", + /** UpdateInProgress */ + UpdateInProgress = "UpdateInProgress", + /** UpdateFailed */ + UpdateFailed = "UpdateFailed", + /** NeedsAttention */ + NeedsAttention = "NeedsAttention", + /** PreparationInProgress */ + PreparationInProgress = "PreparationInProgress", + /** PreparationFailed */ + PreparationFailed = "PreparationFailed" +} + +/** + * Defines values for UpdateSummariesPropertiesState. \ + * {@link KnownUpdateSummariesPropertiesState} can be used interchangeably with UpdateSummariesPropertiesState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **AppliedSuccessfully** \ + * **UpdateAvailable** \ + * **UpdateInProgress** \ + * **UpdateFailed** \ + * **NeedsAttention** \ + * **PreparationInProgress** \ + * **PreparationFailed** + */ +export type UpdateSummariesPropertiesState = string; + +/** Known values of {@link State} that the service accepts. */ +export enum KnownState { + /** HasPrerequisite */ + HasPrerequisite = "HasPrerequisite", + /** Obsolete */ + Obsolete = "Obsolete", + /** Ready */ + Ready = "Ready", + /** NotApplicableBecauseAnotherUpdateIsInProgress */ + NotApplicableBecauseAnotherUpdateIsInProgress = "NotApplicableBecauseAnotherUpdateIsInProgress", + /** Preparing */ + Preparing = "Preparing", + /** Installing */ + Installing = "Installing", + /** Installed */ + Installed = "Installed", + /** PreparationFailed */ + PreparationFailed = "PreparationFailed", + /** InstallationFailed */ + InstallationFailed = "InstallationFailed", + /** Invalid */ + Invalid = "Invalid", + /** Recalled */ + Recalled = "Recalled", + /** Downloading */ + Downloading = "Downloading", + /** DownloadFailed */ + DownloadFailed = "DownloadFailed", + /** HealthChecking */ + HealthChecking = "HealthChecking", + /** HealthCheckFailed */ + HealthCheckFailed = "HealthCheckFailed", + /** ReadyToInstall */ + ReadyToInstall = "ReadyToInstall", + /** ScanInProgress */ + ScanInProgress = "ScanInProgress", + /** ScanFailed */ + ScanFailed = "ScanFailed" +} + +/** + * Defines values for State. \ + * {@link KnownState} can be used interchangeably with State, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HasPrerequisite** \ + * **Obsolete** \ + * **Ready** \ + * **NotApplicableBecauseAnotherUpdateIsInProgress** \ + * **Preparing** \ + * **Installing** \ + * **Installed** \ + * **PreparationFailed** \ + * **InstallationFailed** \ + * **Invalid** \ + * **Recalled** \ + * **Downloading** \ + * **DownloadFailed** \ + * **HealthChecking** \ + * **HealthCheckFailed** \ + * **ReadyToInstall** \ + * **ScanInProgress** \ + * **ScanFailed** + */ +export type State = string; + +/** Known values of {@link RebootRequirement} that the service accepts. */ +export enum KnownRebootRequirement { + /** Unknown */ + Unknown = "Unknown", + /** True */ + True = "True", + /** False */ + False = "False" +} + +/** + * Defines values for RebootRequirement. \ + * {@link KnownRebootRequirement} can be used interchangeably with RebootRequirement, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **True** \ + * **False** + */ +export type RebootRequirement = string; + +/** Known values of {@link AvailabilityType} that the service accepts. */ +export enum KnownAvailabilityType { + /** Local */ + Local = "Local", + /** Online */ + Online = "Online", + /** Notify */ + Notify = "Notify" +} + +/** + * Defines values for AvailabilityType. \ + * {@link KnownAvailabilityType} can be used interchangeably with AvailabilityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Local** \ + * **Online** \ + * **Notify** + */ +export type AvailabilityType = string; + +/** Known values of {@link ServiceName} that the service accepts. */ +export enum KnownServiceName { + /** WAC */ + WAC = "WAC" +} + +/** + * Defines values for ServiceName. \ + * {@link KnownServiceName} can be used interchangeably with ServiceName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **WAC** + */ +export type ServiceName = string; + /** Optional parameters. */ export interface ArcSettingsListByClusterOptionalParams extends coreClient.OperationOptions {} @@ -988,6 +2066,22 @@ export interface ArcSettingsCreateIdentityOptionalParams /** Contains response data for the createIdentity operation. */ export type ArcSettingsCreateIdentityResponse = ArcIdentityResponse; +/** Optional parameters. */ +export interface ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the consentAndInstallDefaultExtensions operation. */ +export type ArcSettingsConsentAndInstallDefaultExtensionsResponse = ArcSetting; + +/** Optional parameters. */ +export interface ArcSettingsInitializeDisableProcessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface ArcSettingsListByClusterNextOptionalParams extends coreClient.OperationOptions {} @@ -1060,6 +2154,18 @@ export interface ClustersCreateIdentityOptionalParams /** Contains response data for the createIdentity operation. */ export type ClustersCreateIdentityResponse = ClusterIdentityResponse; +/** Optional parameters. */ +export interface ClustersExtendSoftwareAssuranceBenefitOptionalParams + 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 extendSoftwareAssuranceBenefit operation. */ +export type ClustersExtendSoftwareAssuranceBenefitResponse = Cluster; + /** Optional parameters. */ export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} @@ -1121,6 +2227,15 @@ export interface ExtensionsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ExtensionsUpgradeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface ExtensionsListByArcSettingNextOptionalParams extends coreClient.OperationOptions {} @@ -1128,6 +2243,49 @@ export interface ExtensionsListByArcSettingNextOptionalParams /** Contains response data for the listByArcSettingNext operation. */ export type ExtensionsListByArcSettingNextResponse = ExtensionList; +/** Optional parameters. */ +export interface OffersListByPublisherOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the listByPublisher operation. */ +export type OffersListByPublisherResponse = OfferList; + +/** Optional parameters. */ +export interface OffersListByClusterOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the listByCluster operation. */ +export type OffersListByClusterResponse = OfferList; + +/** Optional parameters. */ +export interface OffersGetOptionalParams extends coreClient.OperationOptions { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the get operation. */ +export type OffersGetResponse = Offer; + +/** Optional parameters. */ +export interface OffersListByPublisherNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPublisherNext operation. */ +export type OffersListByPublisherNextResponse = OfferList; + +/** Optional parameters. */ +export interface OffersListByClusterNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByClusterNext operation. */ +export type OffersListByClusterNextResponse = OfferList; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -1135,6 +2293,170 @@ export interface OperationsListOptionalParams /** Contains response data for the list operation. */ export type OperationsListResponse = OperationListResult; +/** Optional parameters. */ +export interface PublishersListByClusterOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByCluster operation. */ +export type PublishersListByClusterResponse = PublisherList; + +/** Optional parameters. */ +export interface PublishersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PublishersGetResponse = Publisher; + +/** Optional parameters. */ +export interface PublishersListByClusterNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByClusterNext operation. */ +export type PublishersListByClusterNextResponse = PublisherList; + +/** Optional parameters. */ +export interface SkusListByOfferOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the listByOffer operation. */ +export type SkusListByOfferResponse = SkuList; + +/** Optional parameters. */ +export interface SkusGetOptionalParams extends coreClient.OperationOptions { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the get operation. */ +export type SkusGetResponse = Sku; + +/** Optional parameters. */ +export interface SkusListByOfferNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByOfferNext operation. */ +export type SkusListByOfferNextResponse = SkuList; + +/** Optional parameters. */ +export interface UpdateRunsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type UpdateRunsListResponse = UpdateRunList; + +/** Optional parameters. */ +export interface UpdateRunsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface UpdateRunsPutOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the put operation. */ +export type UpdateRunsPutResponse = UpdateRun; + +/** Optional parameters. */ +export interface UpdateRunsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type UpdateRunsGetResponse = UpdateRun; + +/** Optional parameters. */ +export interface UpdateRunsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type UpdateRunsListNextResponse = UpdateRunList; + +/** Optional parameters. */ +export interface UpdateSummariesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type UpdateSummariesListResponse = UpdateSummariesList; + +/** Optional parameters. */ +export interface UpdateSummariesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface UpdateSummariesPutOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the put operation. */ +export type UpdateSummariesPutResponse = UpdateSummaries; + +/** Optional parameters. */ +export interface UpdateSummariesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type UpdateSummariesGetResponse = UpdateSummaries; + +/** Optional parameters. */ +export interface UpdateSummariesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type UpdateSummariesListNextResponse = UpdateSummariesList; + +/** Optional parameters. */ +export interface UpdatesPostOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface UpdatesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type UpdatesListResponse = UpdateList; + +/** Optional parameters. */ +export interface UpdatesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface UpdatesPutOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the put operation. */ +export type UpdatesPutResponse = Update; + +/** Optional parameters. */ +export interface UpdatesGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type UpdatesGetResponse = Update; + +/** Optional parameters. */ +export interface UpdatesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type UpdatesListNextResponse = UpdateList; + /** Optional parameters. */ export interface AzureStackHCIClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts index 46e33b41b623..3c106ff8f735 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts @@ -67,6 +67,29 @@ export const PerNodeState: coreClient.CompositeMapper = { } }; +export const DefaultExtensionDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefaultExtensionDetails", + modelProperties: { + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + consentTime: { + serializedName: "consentTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -92,6 +115,58 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -310,6 +385,58 @@ export const ClusterList: coreClient.CompositeMapper = { } }; +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid" + } + } + } + } +}; + +export const SoftwareAssuranceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SoftwareAssuranceProperties", + modelProperties: { + softwareAssuranceStatus: { + serializedName: "softwareAssuranceStatus", + readOnly: true, + type: { + name: "String" + } + }, + softwareAssuranceIntent: { + serializedName: "softwareAssuranceIntent", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + export const ClusterDesiredProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -389,6 +516,39 @@ export const ClusterReportedProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + supportedCapabilities: { + serializedName: "supportedCapabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clusterType: { + serializedName: "clusterType", + readOnly: true, + type: { + name: "String" + } + }, + manufacturer: { + serializedName: "manufacturer", + readOnly: true, + type: { + name: "String" + } + }, + oemActivation: { + serializedName: "oemActivation", + readOnly: true, + type: { + name: "String" + } } } } @@ -420,6 +580,20 @@ export const ClusterNode: coreClient.CompositeMapper = { name: "String" } }, + nodeType: { + serializedName: "nodeType", + readOnly: true, + type: { + name: "String" + } + }, + ehcResourceId: { + serializedName: "ehcResourceId", + readOnly: true, + type: { + name: "String" + } + }, manufacturer: { serializedName: "manufacturer", readOnly: true, @@ -448,6 +622,13 @@ export const ClusterNode: coreClient.CompositeMapper = { name: "String" } }, + osDisplayVersion: { + serializedName: "osDisplayVersion", + readOnly: true, + type: { + name: "String" + } + }, serialNumber: { serializedName: "serialNumber", readOnly: true, @@ -468,6 +649,50 @@ export const ClusterNode: coreClient.CompositeMapper = { type: { name: "Number" } + }, + lastLicensingTimestamp: { + serializedName: "lastLicensingTimestamp", + readOnly: true, + type: { + name: "DateTime" + } + }, + oemActivation: { + serializedName: "oemActivation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IsolatedVmAttestationConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IsolatedVmAttestationConfiguration", + modelProperties: { + attestationResourceId: { + serializedName: "attestationResourceId", + readOnly: true, + type: { + name: "String" + } + }, + relyingPartyServiceEndpoint: { + serializedName: "relyingPartyServiceEndpoint", + readOnly: true, + type: { + name: "String" + } + }, + attestationServiceEndpoint: { + serializedName: "attestationServiceEndpoint", + readOnly: true, + type: { + name: "String" + } } } } @@ -509,6 +734,35 @@ export const ClusterPatch: coreClient.CompositeMapper = { name: "Composite", className: "ClusterDesiredProperties" } + }, + principalId: { + serializedName: "identity.principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "identity.tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "identity.type", + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "identity.userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } } } } @@ -583,6 +837,37 @@ export const ClusterIdentityResponse: coreClient.CompositeMapper = { } }; +export const SoftwareAssuranceChangeRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SoftwareAssuranceChangeRequest", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SoftwareAssuranceChangeRequestProperties" + } + } + } + } +}; + +export const SoftwareAssuranceChangeRequestProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SoftwareAssuranceChangeRequestProperties", + modelProperties: { + softwareAssuranceIntent: { + serializedName: "softwareAssuranceIntent", + type: { + name: "String" + } + } + } + } +}; + export const ExtensionList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -631,67 +916,281 @@ export const PerNodeExtensionState: coreClient.CompositeMapper = { name: "String" } }, - state: { - serializedName: "state", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", + }, + state: { + serializedName: "state", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + instanceView: { + serializedName: "instanceView", type: { - name: "String" + name: "Composite", + className: "ExtensionInstanceView" } } } } }; -export const Operation: coreClient.CompositeMapper = { +export const ExtensionInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "ExtensionInstanceView", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, + type: { + serializedName: "type", type: { - name: "Boolean" + name: "String" } }, - display: { - serializedName: "display", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "ExtensionInstanceViewStatus" + } + } + } + } +}; + +export const ExtensionInstanceViewStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionInstanceViewStatus", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + level: { + serializedName: "level", + type: { + name: "String" + } + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ExtensionPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionPatch", + modelProperties: { + extensionParameters: { + serializedName: "properties.extensionParameters", + type: { + name: "Composite", + className: "ExtensionPatchParameters" + } + } + } + } +}; + +export const ExtensionPatchParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionPatchParameters", + modelProperties: { + typeHandlerVersion: { + serializedName: "typeHandlerVersion", + type: { + name: "String" + } + }, + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const ExtensionUpgradeParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionUpgradeParameters", + modelProperties: { + targetVersion: { + serializedName: "targetVersion", + type: { + name: "String" + } + } + } + } +}; + +export const OfferList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OfferList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Offer" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SkuMappings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuMappings", + modelProperties: { + catalogPlanId: { + serializedName: "catalogPlanId", + type: { + name: "String" + } + }, + marketplaceSkuId: { + serializedName: "marketplaceSkuId", + type: { + name: "String" + } + }, + marketplaceSkuVersions: { + serializedName: "marketplaceSkuVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", type: { name: "Composite", className: "OperationDisplay" @@ -752,47 +1251,56 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ArcConnectivityProperties: coreClient.CompositeMapper = { +export const PublisherList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcConnectivityProperties", + className: "PublisherList", modelProperties: { - enabled: { - serializedName: "enabled", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Publisher" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" } } } } }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { +export const SkuList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "SkuList", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Sku" + } + } } }, - location: { - serializedName: "location", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -801,12 +1309,705 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ArcSetting: coreClient.CompositeMapper = { +export const UpdateRunList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSetting", + className: "UpdateRunList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateRun" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Step: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Step", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + startTimeUtc: { + serializedName: "startTimeUtc", + type: { + name: "DateTime" + } + }, + endTimeUtc: { + serializedName: "endTimeUtc", + type: { + name: "DateTime" + } + }, + lastUpdatedTimeUtc: { + serializedName: "lastUpdatedTimeUtc", + type: { + name: "DateTime" + } + }, + steps: { + serializedName: "steps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Step" + } + } + } + } + } + } +}; + +export const UpdateSummariesList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSummariesList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateSummaries" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PackageVersionInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageVersionInfo", + modelProperties: { + packageType: { + serializedName: "packageType", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PrecheckResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrecheckResult", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Composite", + className: "PrecheckResultTags" + } + }, + title: { + serializedName: "title", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + remediation: { + serializedName: "remediation", + type: { + name: "String" + } + }, + targetResourceID: { + serializedName: "targetResourceID", + type: { + name: "String" + } + }, + targetResourceName: { + serializedName: "targetResourceName", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + additionalData: { + serializedName: "additionalData", + type: { + name: "String" + } + }, + healthCheckSource: { + serializedName: "healthCheckSource", + type: { + name: "String" + } + } + } + } +}; + +export const PrecheckResultTags: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrecheckResultTags", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Update" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const UpdatePrerequisite: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdatePrerequisite", + modelProperties: { + updateType: { + serializedName: "updateType", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + packageName: { + serializedName: "packageName", + type: { + name: "String" + } + } + } + } +}; + +export const ArcConnectivityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArcConnectivityProperties", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + serviceConfigurations: { + serializedName: "serviceConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceConfiguration" + } + } + } + } + } + } +}; + +export const ServiceConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceConfiguration", + modelProperties: { + serviceName: { + serializedName: "serviceName", + required: true, + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +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 ArcSetting: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArcSetting", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + arcInstanceResourceGroup: { + serializedName: "properties.arcInstanceResourceGroup", + type: { + name: "String" + } + }, + arcApplicationClientId: { + serializedName: "properties.arcApplicationClientId", + type: { + name: "String" + } + }, + arcApplicationTenantId: { + serializedName: "properties.arcApplicationTenantId", + type: { + name: "String" + } + }, + arcServicePrincipalObjectId: { + serializedName: "properties.arcServicePrincipalObjectId", + type: { + name: "String" + } + }, + arcApplicationObjectId: { + serializedName: "properties.arcApplicationObjectId", + type: { + name: "String" + } + }, + aggregateState: { + serializedName: "properties.aggregateState", + readOnly: true, + type: { + name: "String" + } + }, + perNodeDetails: { + serializedName: "properties.perNodeDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PerNodeState" + } + } + } + }, + connectivityProperties: { + serializedName: "properties.connectivityProperties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + defaultExtensions: { + serializedName: "properties.defaultExtensions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DefaultExtensionDetails" + } + } + } + } + } + } +}; + +export const Extension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Extension", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + aggregateState: { + serializedName: "properties.aggregateState", + readOnly: true, + type: { + name: "String" + } + }, + perNodeExtensionDetails: { + serializedName: "properties.perNodeExtensionDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PerNodeExtensionState" + } + } + } + }, + managedBy: { + serializedName: "properties.managedBy", + readOnly: true, + type: { + name: "String" + } + }, + forceUpdateTag: { + serializedName: "properties.extensionParameters.forceUpdateTag", + type: { + name: "String" + } + }, + publisher: { + serializedName: "properties.extensionParameters.publisher", + type: { + name: "String" + } + }, + typePropertiesExtensionParametersType: { + serializedName: "properties.extensionParameters.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.extensionParameters.typeHandlerVersion", + type: { + name: "String" + } + }, + autoUpgradeMinorVersion: { + serializedName: + "properties.extensionParameters.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.extensionParameters.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.extensionParameters.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.extensionParameters.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Offer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Offer", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + publisherId: { + serializedName: "properties.publisherId", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + type: { + name: "String" + } + }, + contentVersion: { + serializedName: "properties.contentVersion", + type: { + name: "String" + } + }, + skuMappings: { + serializedName: "properties.skuMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuMappings" + } + } + } + } + } + } +}; + +export const Publisher: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Publisher", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Sku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Sku", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + publisherId: { + serializedName: "properties.publisherId", + type: { + name: "String" + } + }, + offerId: { + serializedName: "properties.offerId", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + type: { + name: "String" + } + }, + contentVersion: { + serializedName: "properties.contentVersion", + type: { + name: "String" + } + }, + skuMappings: { + serializedName: "properties.skuMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuMappings" + } + } + } + } + } + } +}; + +export const UpdateRun: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateRun", modelProperties: { ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -814,109 +2015,195 @@ export const ArcSetting: coreClient.CompositeMapper = { name: "String" } }, - arcInstanceResourceGroup: { - serializedName: "properties.arcInstanceResourceGroup", + timeStarted: { + serializedName: "properties.timeStarted", + type: { + name: "DateTime" + } + }, + lastUpdatedTime: { + serializedName: "properties.lastUpdatedTime", + type: { + name: "DateTime" + } + }, + duration: { + serializedName: "properties.duration", type: { name: "String" } }, - arcApplicationClientId: { - serializedName: "properties.arcApplicationClientId", + state: { + serializedName: "properties.state", type: { name: "String" } }, - arcApplicationTenantId: { - serializedName: "properties.arcApplicationTenantId", + namePropertiesProgressName: { + serializedName: "properties.progress.name", type: { name: "String" } }, - arcServicePrincipalObjectId: { - serializedName: "properties.arcServicePrincipalObjectId", + description: { + serializedName: "properties.progress.description", type: { name: "String" } }, - arcApplicationObjectId: { - serializedName: "properties.arcApplicationObjectId", + errorMessage: { + serializedName: "properties.progress.errorMessage", type: { name: "String" } }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + status: { + serializedName: "properties.progress.status", type: { name: "String" } }, - perNodeDetails: { - serializedName: "properties.perNodeDetails", - readOnly: true, + startTimeUtc: { + serializedName: "properties.progress.startTimeUtc", + type: { + name: "DateTime" + } + }, + endTimeUtc: { + serializedName: "properties.progress.endTimeUtc", + type: { + name: "DateTime" + } + }, + lastUpdatedTimeUtc: { + serializedName: "properties.progress.lastUpdatedTimeUtc", + type: { + name: "DateTime" + } + }, + steps: { + serializedName: "properties.progress.steps", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeState" + className: "Step" } } } + } + } + } +}; + +export const UpdateSummaries: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSummaries", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } }, - connectivityProperties: { - serializedName: "properties.connectivityProperties", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - createdBy: { - serializedName: "systemData.createdBy", + oemFamily: { + serializedName: "properties.oemFamily", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + hardwareModel: { + serializedName: "properties.hardwareModel", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + packageVersions: { + serializedName: "properties.packageVersions", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageVersionInfo" + } + } } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + currentVersion: { + serializedName: "properties.currentVersion", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + lastUpdated: { + serializedName: "properties.lastUpdated", + type: { + name: "DateTime" + } + }, + lastChecked: { + serializedName: "properties.lastChecked", + type: { + name: "DateTime" + } + }, + healthState: { + serializedName: "properties.healthState", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + healthCheckResult: { + serializedName: "properties.healthCheckResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrecheckResult" + } + } + } + }, + healthCheckDate: { + serializedName: "properties.healthCheckDate", type: { name: "DateTime" } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } } } } }; -export const Extension: coreClient.CompositeMapper = { +export const Update: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Extension", + className: "Update", modelProperties: { ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -924,105 +2211,142 @@ export const Extension: coreClient.CompositeMapper = { name: "String" } }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + installedDate: { + serializedName: "properties.installedDate", + type: { + name: "DateTime" + } + }, + description: { + serializedName: "properties.description", type: { name: "String" } }, - perNodeExtensionDetails: { - serializedName: "properties.perNodeExtensionDetails", - readOnly: true, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + prerequisites: { + serializedName: "properties.prerequisites", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeExtensionState" + className: "UpdatePrerequisite" } } } }, - forceUpdateTag: { - serializedName: "properties.extensionParameters.forceUpdateTag", + componentVersions: { + serializedName: "properties.componentVersions", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageVersionInfo" + } + } } }, - publisher: { - serializedName: "properties.extensionParameters.publisher", + rebootRequired: { + serializedName: "properties.rebootRequired", type: { name: "String" } }, - typePropertiesExtensionParametersType: { - serializedName: "properties.extensionParameters.type", + healthState: { + serializedName: "properties.healthState", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.extensionParameters.typeHandlerVersion", + healthCheckResult: { + serializedName: "properties.healthCheckResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrecheckResult" + } + } + } + }, + healthCheckDate: { + serializedName: "properties.healthCheckDate", + type: { + name: "DateTime" + } + }, + packagePath: { + serializedName: "properties.packagePath", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: - "properties.extensionParameters.autoUpgradeMinorVersion", + packageSizeInMb: { + serializedName: "properties.packageSizeInMb", type: { - name: "Boolean" + name: "Number" } }, - settings: { - serializedName: "properties.extensionParameters.settings", + displayName: { + serializedName: "properties.displayName", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - protectedSettings: { - serializedName: "properties.extensionParameters.protectedSettings", + version: { + serializedName: "properties.version", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - createdBy: { - serializedName: "systemData.createdBy", + publisher: { + serializedName: "properties.publisher", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + releaseLink: { + serializedName: "properties.releaseLink", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + availabilityType: { + serializedName: "properties.availabilityType", type: { - name: "DateTime" + name: "String" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + packageType: { + serializedName: "properties.packageType", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + additionalProperties: { + serializedName: "properties.additionalProperties", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + progressPercentage: { + serializedName: "properties.updateStateProperties.progressPercentage", type: { - name: "DateTime" + name: "Number" + } + }, + notifyMessage: { + serializedName: "properties.updateStateProperties.notifyMessage", + type: { + name: "String" } } } @@ -1049,6 +2373,13 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, + connectivityStatus: { + serializedName: "properties.connectivityStatus", + readOnly: true, + type: { + name: "String" + } + }, cloudId: { serializedName: "properties.cloudId", readOnly: true, @@ -1086,6 +2417,13 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, + softwareAssuranceProperties: { + serializedName: "properties.softwareAssuranceProperties", + type: { + name: "Composite", + className: "SoftwareAssuranceProperties" + } + }, desiredProperties: { serializedName: "properties.desiredProperties", type: { @@ -1100,6 +2438,13 @@ export const Cluster: coreClient.CompositeMapper = { className: "ClusterReportedProperties" } }, + isolatedVmAttestationConfiguration: { + serializedName: "properties.isolatedVmAttestationConfiguration", + type: { + name: "Composite", + className: "IsolatedVmAttestationConfiguration" + } + }, trialDaysRemaining: { serializedName: "properties.trialDaysRemaining", readOnly: true, @@ -1142,40 +2487,100 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, - createdBy: { - serializedName: "systemData.createdBy", + resourceProviderObjectId: { + serializedName: "properties.resourceProviderObjectId", + readOnly: true, type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + principalId: { + serializedName: "identity.principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - createdAt: { - serializedName: "systemData.createdAt", + tenantId: { + serializedName: "identity.tenantId", + readOnly: true, type: { - name: "DateTime" + name: "Uuid" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + typeIdentityType: { + serializedName: "identity.type", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + userAssignedIdentities: { + serializedName: "identity.userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UpdateRunsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateRunsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } - }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + } + } + } +}; + +export const UpdateSummariesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSummariesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const UpdatesPostHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdatesPostHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const UpdatesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdatesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" } } } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts index d14a11a57d80..cd76aae95794 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts @@ -17,7 +17,13 @@ import { Cluster as ClusterMapper, ClusterPatch as ClusterPatchMapper, UploadCertificateRequest as UploadCertificateRequestMapper, - Extension as ExtensionMapper + SoftwareAssuranceChangeRequest as SoftwareAssuranceChangeRequestMapper, + Extension as ExtensionMapper, + ExtensionPatch as ExtensionPatchMapper, + ExtensionUpgradeParameters as ExtensionUpgradeParametersMapper, + UpdateRun as UpdateRunMapper, + UpdateSummaries as UpdateSummariesMapper, + Update as UpdateMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -87,7 +93,7 @@ export const clusterName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2023-08-01", isConstant: true, serializedName: "api-version", type: { @@ -156,6 +162,11 @@ export const uploadCertificateRequest: OperationParameter = { mapper: UploadCertificateRequestMapper }; +export const softwareAssuranceChangeRequest: OperationParameter = { + parameterPath: "softwareAssuranceChangeRequest", + mapper: SoftwareAssuranceChangeRequestMapper +}; + export const extensionName: OperationURLParameter = { parameterPath: "extensionName", mapper: { @@ -171,3 +182,93 @@ export const extension: OperationParameter = { parameterPath: "extension", mapper: ExtensionMapper }; + +export const extension1: OperationParameter = { + parameterPath: "extension", + mapper: ExtensionPatchMapper +}; + +export const extensionUpgradeParameters: OperationParameter = { + parameterPath: "extensionUpgradeParameters", + mapper: ExtensionUpgradeParametersMapper +}; + +export const publisherName: OperationURLParameter = { + parameterPath: "publisherName", + mapper: { + serializedName: "publisherName", + required: true, + type: { + name: "String" + } + } +}; + +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + +export const offerName: OperationURLParameter = { + parameterPath: "offerName", + mapper: { + serializedName: "offerName", + required: true, + type: { + name: "String" + } + } +}; + +export const skuName: OperationURLParameter = { + parameterPath: "skuName", + mapper: { + serializedName: "skuName", + required: true, + type: { + name: "String" + } + } +}; + +export const updateName: OperationURLParameter = { + parameterPath: "updateName", + mapper: { + serializedName: "updateName", + required: true, + type: { + name: "String" + } + } +}; + +export const updateRunName: OperationURLParameter = { + parameterPath: "updateRunName", + mapper: { + serializedName: "updateRunName", + required: true, + type: { + name: "String" + } + } +}; + +export const updateRunsProperties: OperationParameter = { + parameterPath: "updateRunsProperties", + mapper: UpdateRunMapper +}; + +export const updateLocationProperties: OperationParameter = { + parameterPath: "updateLocationProperties", + mapper: UpdateSummariesMapper +}; + +export const updateProperties: OperationParameter = { + parameterPath: "updateProperties", + mapper: UpdateMapper +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts index a9b4f814fd0a..3dee3282bc1f 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/arcSettings.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 { AzureStackHCIClient } from "../azureStackHCIClient"; -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 { ArcSetting, ArcSettingsListByClusterNextOptionalParams, @@ -32,6 +36,9 @@ import { ArcSettingsGeneratePasswordResponse, ArcSettingsCreateIdentityOptionalParams, ArcSettingsCreateIdentityResponse, + ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams, + ArcSettingsConsentAndInstallDefaultExtensionsResponse, + ArcSettingsInitializeDisableProcessOptionalParams, ArcSettingsListByClusterNextResponse } from "../models"; @@ -222,14 +229,14 @@ export class ArcSettingsImpl implements ArcSettings { clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams - ): 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 ) => { @@ -262,15 +269,15 @@ export class ArcSettingsImpl implements ArcSettings { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, arcSettingName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, arcSettingName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -330,8 +337,8 @@ export class ArcSettingsImpl implements ArcSettings { arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ArcSettingsCreateIdentityResponse > > { @@ -341,7 +348,7 @@ export class ArcSettingsImpl implements ArcSettings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -374,15 +381,18 @@ export class ArcSettingsImpl implements ArcSettings { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, arcSettingName, options }, - createIdentityOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, arcSettingName, options }, + spec: createIdentityOperationSpec + }); + const poller = await createHttpPoller< + ArcSettingsCreateIdentityResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -410,6 +420,113 @@ export class ArcSettingsImpl implements ArcSettings { return poller.pollUntilDone(); } + /** + * Add consent time for default extensions and initiate extensions installation + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param options The options parameters. + */ + consentAndInstallDefaultExtensions( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + options?: ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, arcSettingName, options }, + consentAndInstallDefaultExtensionsOperationSpec + ); + } + + /** + * Initializes ARC Disable process on the cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param options The options parameters. + */ + async beginInitializeDisableProcess( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + options?: ArcSettingsInitializeDisableProcessOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, arcSettingName, options }, + spec: initializeDisableProcessOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Initializes ARC Disable process on the cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param options The options parameters. + */ + async beginInitializeDisableProcessAndWait( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + options?: ArcSettingsInitializeDisableProcessOptionalParams + ): Promise { + const poller = await this.beginInitializeDisableProcess( + resourceGroupName, + clusterName, + arcSettingName, + options + ); + return poller.pollUntilDone(); + } + /** * ListByClusterNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -606,6 +723,53 @@ const createIdentityOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const consentAndInstallDefaultExtensionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/consentAndInstallDefaultExtensions", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ArcSetting + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.arcSettingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const initializeDisableProcessOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/initializeDisableProcess", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.arcSettingName + ], + headerParameters: [Parameters.accept], + serializer +}; const listByClusterNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -617,7 +781,6 @@ const listByClusterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts index 0dcec8886e8a..64a43b7ee52d 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.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 { AzureStackHCIClient } from "../azureStackHCIClient"; -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 { Cluster, ClustersListBySubscriptionNextOptionalParams, @@ -35,6 +39,9 @@ import { ClustersUploadCertificateOptionalParams, ClustersCreateIdentityOptionalParams, ClustersCreateIdentityResponse, + SoftwareAssuranceChangeRequest, + ClustersExtendSoftwareAssuranceBenefitOptionalParams, + ClustersExtendSoftwareAssuranceBenefitResponse, ClustersListBySubscriptionNextResponse, ClustersListByResourceGroupNextResponse } from "../models"; @@ -268,14 +275,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): 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 ) => { @@ -308,13 +315,13 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -352,14 +359,14 @@ export class ClustersImpl implements Clusters { clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams - ): 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 ) => { @@ -392,15 +399,20 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, uploadCertificateRequest, options }, - uploadCertificateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + uploadCertificateRequest, + options + }, + spec: uploadCertificateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -439,8 +451,8 @@ export class ClustersImpl implements Clusters { clusterName: string, options?: ClustersCreateIdentityOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateIdentityResponse > > { @@ -450,7 +462,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -483,15 +495,18 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - createIdentityOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: createIdentityOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateIdentityResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -516,6 +531,107 @@ export class ClustersImpl implements Clusters { return poller.pollUntilDone(); } + /** + * Extends Software Assurance Benefit to a cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload + * @param options The options parameters. + */ + async beginExtendSoftwareAssuranceBenefit( + resourceGroupName: string, + clusterName: string, + softwareAssuranceChangeRequest: SoftwareAssuranceChangeRequest, + options?: ClustersExtendSoftwareAssuranceBenefitOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersExtendSoftwareAssuranceBenefitResponse + > + > { + 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, + clusterName, + softwareAssuranceChangeRequest, + options + }, + spec: extendSoftwareAssuranceBenefitOperationSpec + }); + const poller = await createHttpPoller< + ClustersExtendSoftwareAssuranceBenefitResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Extends Software Assurance Benefit to a cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload + * @param options The options parameters. + */ + async beginExtendSoftwareAssuranceBenefitAndWait( + resourceGroupName: string, + clusterName: string, + softwareAssuranceChangeRequest: SoftwareAssuranceChangeRequest, + options?: ClustersExtendSoftwareAssuranceBenefitOptionalParams + ): Promise { + const poller = await this.beginExtendSoftwareAssuranceBenefit( + resourceGroupName, + clusterName, + softwareAssuranceChangeRequest, + options + ); + return poller.pollUntilDone(); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -738,6 +854,39 @@ const createIdentityOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const extendSoftwareAssuranceBenefitOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/extendSoftwareAssuranceBenefit", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: { + bodyMapper: Mappers.Cluster + }, + 204: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.softwareAssuranceChangeRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -749,7 +898,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -769,7 +917,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts index 8cf5ce68f745..c31b0388bd3f 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/extensions.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 { AzureStackHCIClient } from "../azureStackHCIClient"; -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 { Extension, ExtensionsListByArcSettingNextOptionalParams, @@ -24,9 +28,12 @@ import { ExtensionsGetResponse, ExtensionsCreateOptionalParams, ExtensionsCreateResponse, + ExtensionPatch, ExtensionsUpdateOptionalParams, ExtensionsUpdateResponse, ExtensionsDeleteOptionalParams, + ExtensionUpgradeParameters, + ExtensionsUpgradeOptionalParams, ExtensionsListByArcSettingNextResponse } from "../models"; @@ -199,8 +206,8 @@ export class ExtensionsImpl implements Extensions { extension: Extension, options?: ExtensionsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ExtensionsCreateResponse > > { @@ -210,7 +217,7 @@ export class ExtensionsImpl implements Extensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -243,9 +250,9 @@ export class ExtensionsImpl implements Extensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, arcSettingName, @@ -253,12 +260,15 @@ export class ExtensionsImpl implements Extensions { extension, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ExtensionsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -306,11 +316,11 @@ export class ExtensionsImpl implements Extensions { clusterName: string, arcSettingName: string, extensionName: string, - extension: Extension, + extension: ExtensionPatch, options?: ExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ExtensionsUpdateResponse > > { @@ -320,7 +330,7 @@ export class ExtensionsImpl implements Extensions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -353,9 +363,9 @@ export class ExtensionsImpl implements Extensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, arcSettingName, @@ -363,12 +373,15 @@ export class ExtensionsImpl implements Extensions { extension, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ExtensionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "original-uri" + resourceLocationConfig: "original-uri" }); await poller.poll(); return poller; @@ -388,7 +401,7 @@ export class ExtensionsImpl implements Extensions { clusterName: string, arcSettingName: string, extensionName: string, - extension: Extension, + extension: ExtensionPatch, options?: ExtensionsUpdateOptionalParams ): Promise { const poller = await this.beginUpdate( @@ -416,14 +429,14 @@ export class ExtensionsImpl implements Extensions { arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams - ): 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 ) => { @@ -456,21 +469,21 @@ export class ExtensionsImpl implements Extensions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, arcSettingName, extensionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -501,6 +514,111 @@ export class ExtensionsImpl implements Extensions { return poller.pollUntilDone(); } + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param options The options parameters. + */ + async beginUpgrade( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + extensionName: string, + extensionUpgradeParameters: ExtensionUpgradeParameters, + options?: ExtensionsUpgradeOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + arcSettingName, + extensionName, + extensionUpgradeParameters, + options + }, + spec: upgradeOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param options The options parameters. + */ + async beginUpgradeAndWait( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + extensionName: string, + extensionUpgradeParameters: ExtensionUpgradeParameters, + options?: ExtensionsUpgradeOptionalParams + ): Promise { + const poller = await this.beginUpgrade( + resourceGroupName, + clusterName, + arcSettingName, + extensionName, + extensionUpgradeParameters, + options + ); + return poller.pollUntilDone(); + } + /** * ListByArcSettingNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -628,7 +746,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.extension, + requestBody: Parameters.extension1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -667,6 +785,33 @@ const deleteOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const upgradeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}/upgrade", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.extensionUpgradeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.arcSettingName, + Parameters.extensionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByArcSettingNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -678,7 +823,6 @@ const listByArcSettingNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts index 2d20c6edaf47..04d9496a7b22 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts @@ -9,4 +9,10 @@ export * from "./arcSettings"; export * from "./clusters"; export * from "./extensions"; +export * from "./offers"; export * from "./operations"; +export * from "./publishers"; +export * from "./skus"; +export * from "./updateRuns"; +export * from "./updateSummariesOperations"; +export * from "./updates"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/offers.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/offers.ts new file mode 100644 index 000000000000..b8b46d1b0428 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/offers.ts @@ -0,0 +1,431 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Offers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + Offer, + OffersListByPublisherNextOptionalParams, + OffersListByPublisherOptionalParams, + OffersListByPublisherResponse, + OffersListByClusterNextOptionalParams, + OffersListByClusterOptionalParams, + OffersListByClusterResponse, + OffersGetOptionalParams, + OffersGetResponse, + OffersListByPublisherNextResponse, + OffersListByClusterNextResponse +} from "../models"; + +/// +/** Class containing Offers operations. */ +export class OffersImpl implements Offers { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class Offers class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param options The options parameters. + */ + public listByPublisher( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: OffersListByPublisherOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByPublisherPagingAll( + resourceGroupName, + clusterName, + publisherName, + 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.listByPublisherPagingPage( + resourceGroupName, + clusterName, + publisherName, + options, + settings + ); + } + }; + } + + private async *listByPublisherPagingPage( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: OffersListByPublisherOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OffersListByPublisherResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByPublisher( + resourceGroupName, + clusterName, + publisherName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByPublisherNext( + resourceGroupName, + clusterName, + publisherName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByPublisherPagingAll( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: OffersListByPublisherOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByPublisherPagingPage( + resourceGroupName, + clusterName, + publisherName, + options + )) { + yield* page; + } + } + + /** + * List Offers available across publishers for the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + public listByCluster( + resourceGroupName: string, + clusterName: string, + options?: OffersListByClusterOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByClusterPagingAll( + resourceGroupName, + clusterName, + 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.listByClusterPagingPage( + resourceGroupName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listByClusterPagingPage( + resourceGroupName: string, + clusterName: string, + options?: OffersListByClusterOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OffersListByClusterResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByCluster( + resourceGroupName, + clusterName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByClusterNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByClusterPagingAll( + resourceGroupName: string, + clusterName: string, + options?: OffersListByClusterOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByClusterPagingPage( + resourceGroupName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param options The options parameters. + */ + private _listByPublisher( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: OffersListByPublisherOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, publisherName, options }, + listByPublisherOperationSpec + ); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + private _listByCluster( + resourceGroupName: string, + clusterName: string, + options?: OffersListByClusterOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listByClusterOperationSpec + ); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: OffersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, publisherName, offerName, options }, + getOperationSpec + ); + } + + /** + * ListByPublisherNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param nextLink The nextLink from the previous successful call to the ListByPublisher method. + * @param options The options parameters. + */ + private _listByPublisherNext( + resourceGroupName: string, + clusterName: string, + publisherName: string, + nextLink: string, + options?: OffersListByPublisherNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, publisherName, nextLink, options }, + listByPublisherNextOperationSpec + ); + } + + /** + * ListByClusterNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param nextLink The nextLink from the previous successful call to the ListByCluster method. + * @param options The options parameters. + */ + private _listByClusterNext( + resourceGroupName: string, + clusterName: string, + nextLink: string, + options?: OffersListByClusterNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, nextLink, options }, + listByClusterNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByPublisherOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OfferList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.publisherName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByClusterOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/offers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OfferList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Offer + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.publisherName, + Parameters.offerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPublisherNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OfferList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink, + Parameters.publisherName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByClusterNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OfferList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/publishers.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/publishers.ts new file mode 100644 index 000000000000..1fc5f9aff2de --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/publishers.ts @@ -0,0 +1,246 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Publishers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + Publisher, + PublishersListByClusterNextOptionalParams, + PublishersListByClusterOptionalParams, + PublishersListByClusterResponse, + PublishersGetOptionalParams, + PublishersGetResponse, + PublishersListByClusterNextResponse +} from "../models"; + +/// +/** Class containing Publishers operations. */ +export class PublishersImpl implements Publishers { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class Publishers class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * List Publishers available for the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + public listByCluster( + resourceGroupName: string, + clusterName: string, + options?: PublishersListByClusterOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByClusterPagingAll( + resourceGroupName, + clusterName, + 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.listByClusterPagingPage( + resourceGroupName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listByClusterPagingPage( + resourceGroupName: string, + clusterName: string, + options?: PublishersListByClusterOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PublishersListByClusterResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByCluster( + resourceGroupName, + clusterName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByClusterNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByClusterPagingAll( + resourceGroupName: string, + clusterName: string, + options?: PublishersListByClusterOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByClusterPagingPage( + resourceGroupName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * List Publishers available for the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + private _listByCluster( + resourceGroupName: string, + clusterName: string, + options?: PublishersListByClusterOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listByClusterOperationSpec + ); + } + + /** + * Get Publisher resource details of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: PublishersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, publisherName, options }, + getOperationSpec + ); + } + + /** + * ListByClusterNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param nextLink The nextLink from the previous successful call to the ListByCluster method. + * @param options The options parameters. + */ + private _listByClusterNext( + resourceGroupName: string, + clusterName: string, + nextLink: string, + options?: PublishersListByClusterNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, nextLink, options }, + listByClusterNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByClusterOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PublisherList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Publisher + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.publisherName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByClusterNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PublisherList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/skus.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/skus.ts new file mode 100644 index 000000000000..3e8dde35051c --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/skus.ts @@ -0,0 +1,296 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Skus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + Sku, + SkusListByOfferNextOptionalParams, + SkusListByOfferOptionalParams, + SkusListByOfferResponse, + SkusGetOptionalParams, + SkusGetResponse, + SkusListByOfferNextResponse +} from "../models"; + +/// +/** Class containing Skus operations. */ +export class SkusImpl implements Skus { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class Skus class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * List Skus available for a offer within the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param options The options parameters. + */ + public listByOffer( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: SkusListByOfferOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByOfferPagingAll( + resourceGroupName, + clusterName, + publisherName, + offerName, + 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.listByOfferPagingPage( + resourceGroupName, + clusterName, + publisherName, + offerName, + options, + settings + ); + } + }; + } + + private async *listByOfferPagingPage( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: SkusListByOfferOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SkusListByOfferResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByOffer( + resourceGroupName, + clusterName, + publisherName, + offerName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByOfferNext( + resourceGroupName, + clusterName, + publisherName, + offerName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByOfferPagingAll( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: SkusListByOfferOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByOfferPagingPage( + resourceGroupName, + clusterName, + publisherName, + offerName, + options + )) { + yield* page; + } + } + + /** + * List Skus available for a offer within the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param options The options parameters. + */ + private _listByOffer( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: SkusListByOfferOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, publisherName, offerName, options }, + listByOfferOperationSpec + ); + } + + /** + * Get SKU resource details within a offer of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + skuName: string, + options?: SkusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + publisherName, + offerName, + skuName, + options + }, + getOperationSpec + ); + } + + /** + * ListByOfferNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param nextLink The nextLink from the previous successful call to the ListByOffer method. + * @param options The options parameters. + */ + private _listByOfferNext( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + nextLink: string, + options?: SkusListByOfferNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + publisherName, + offerName, + nextLink, + options + }, + listByOfferNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByOfferOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SkuList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.publisherName, + Parameters.offerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus/{skuName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Sku + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.publisherName, + Parameters.offerName, + Parameters.skuName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByOfferNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SkuList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink, + Parameters.publisherName, + Parameters.offerName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/updateRuns.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/updateRuns.ts new file mode 100644 index 000000000000..af5d04c2ff8b --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/updateRuns.ts @@ -0,0 +1,453 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { UpdateRuns } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + UpdateRun, + UpdateRunsListNextOptionalParams, + UpdateRunsListOptionalParams, + UpdateRunsListResponse, + UpdateRunsDeleteOptionalParams, + UpdateRunsPutOptionalParams, + UpdateRunsPutResponse, + UpdateRunsGetOptionalParams, + UpdateRunsGetResponse, + UpdateRunsListNextResponse +} from "../models"; + +/// +/** Class containing UpdateRuns operations. */ +export class UpdateRunsImpl implements UpdateRuns { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class UpdateRuns class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * List all Update runs for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdateRunsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + clusterName, + updateName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + clusterName, + updateName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdateRunsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UpdateRunsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + clusterName, + updateName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + updateName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdateRunsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + clusterName, + updateName, + options + )) { + yield* page; + } + } + + /** + * List all Update runs for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdateRunsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, updateName, options }, + listOperationSpec + ); + } + + /** + * Delete specified Update Run + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + options?: UpdateRunsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + updateName, + updateRunName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete specified Update Run + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + options?: UpdateRunsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterName, + updateName, + updateRunName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Put Update runs for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param updateRunsProperties Properties of the updateRuns object + * @param options The options parameters. + */ + put( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + updateRunsProperties: UpdateRun, + options?: UpdateRunsPutOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + updateName, + updateRunName, + updateRunsProperties, + options + }, + putOperationSpec + ); + } + + /** + * Get the Update run for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + options?: UpdateRunsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, updateName, updateRunName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + clusterName: string, + updateName: string, + nextLink: string, + options?: UpdateRunsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, updateName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateRunList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName, + Parameters.updateRunName + ], + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.UpdateRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.updateRunsProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName, + Parameters.updateRunName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName, + Parameters.updateRunName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateRunList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink, + Parameters.updateName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/updateSummariesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/updateSummariesOperations.ts new file mode 100644 index 000000000000..8c8ea150c85a --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/updateSummariesOperations.ts @@ -0,0 +1,394 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { UpdateSummariesOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + UpdateSummaries, + UpdateSummariesListNextOptionalParams, + UpdateSummariesListOptionalParams, + UpdateSummariesListResponse, + UpdateSummariesDeleteOptionalParams, + UpdateSummariesPutOptionalParams, + UpdateSummariesPutResponse, + UpdateSummariesGetOptionalParams, + UpdateSummariesGetResponse, + UpdateSummariesListNextResponse +} from "../models"; + +/// +/** Class containing UpdateSummariesOperations operations. */ +export class UpdateSummariesOperationsImpl + implements UpdateSummariesOperations { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class UpdateSummariesOperations class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * List all Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, clusterName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UpdateSummariesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, clusterName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * List all Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listOperationSpec + ); + } + + /** + * Delete Update Summaries + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete Update Summaries + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Put Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource + * @param options The options parameters. + */ + put( + resourceGroupName: string, + clusterName: string, + updateLocationProperties: UpdateSummaries, + options?: UpdateSummariesPutOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, updateLocationProperties, options }, + putOperationSpec + ); + } + + /** + * Get all Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + clusterName: string, + nextLink: string, + options?: UpdateSummariesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateSummariesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.UpdateSummaries + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.updateLocationProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateSummaries + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateSummariesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/updates.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/updates.ts new file mode 100644 index 000000000000..7dff4ad452ee --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/updates.ts @@ -0,0 +1,518 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Updates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackHCIClient } from "../azureStackHCIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Update, + UpdatesListNextOptionalParams, + UpdatesListOptionalParams, + UpdatesListResponse, + UpdatesPostOptionalParams, + UpdatesDeleteOptionalParams, + UpdatesPutOptionalParams, + UpdatesPutResponse, + UpdatesGetOptionalParams, + UpdatesGetResponse, + UpdatesListNextResponse +} from "../models"; + +/// +/** Class containing Updates operations. */ +export class UpdatesImpl implements Updates { + private readonly client: AzureStackHCIClient; + + /** + * Initialize a new instance of the class Updates class. + * @param client Reference to the service client + */ + constructor(client: AzureStackHCIClient) { + this.client = client; + } + + /** + * List all Updates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + clusterName: string, + options?: UpdatesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, clusterName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + options?: UpdatesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UpdatesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, clusterName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + clusterName: string, + options?: UpdatesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * Apply Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + async beginPost( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesPostOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, updateName, options }, + spec: postOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Apply Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + async beginPostAndWait( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesPostOptionalParams + ): Promise { + const poller = await this.beginPost( + resourceGroupName, + clusterName, + updateName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List all Updates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + clusterName: string, + options?: UpdatesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listOperationSpec + ); + } + + /** + * Delete specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, updateName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterName, + updateName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Put specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateProperties Properties of the Updates object + * @param options The options parameters. + */ + put( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateProperties: Update, + options?: UpdatesPutOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, updateName, updateProperties, options }, + putOperationSpec + ); + } + + /** + * Get specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, updateName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + clusterName: string, + nextLink: string, + options?: UpdatesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const postOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/apply", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Update + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.updateProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Update + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.updateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts index f6625f9cf045..a9035e9a4a34 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/arcSettings.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 { ArcSetting, ArcSettingsListByClusterOptionalParams, @@ -22,7 +22,10 @@ import { ArcSettingsGeneratePasswordOptionalParams, ArcSettingsGeneratePasswordResponse, ArcSettingsCreateIdentityOptionalParams, - ArcSettingsCreateIdentityResponse + ArcSettingsCreateIdentityResponse, + ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams, + ArcSettingsConsentAndInstallDefaultExtensionsResponse, + ArcSettingsInitializeDisableProcessOptionalParams } from "../models"; /// @@ -94,7 +97,7 @@ export interface ArcSettings { clusterName: string, arcSettingName: string, options?: ArcSettingsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete ArcSetting resource details of HCI Cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -134,8 +137,8 @@ export interface ArcSettings { arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ArcSettingsCreateIdentityResponse > >; @@ -152,4 +155,43 @@ export interface ArcSettings { arcSettingName: string, options?: ArcSettingsCreateIdentityOptionalParams ): Promise; + /** + * Add consent time for default extensions and initiate extensions installation + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param options The options parameters. + */ + consentAndInstallDefaultExtensions( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + options?: ArcSettingsConsentAndInstallDefaultExtensionsOptionalParams + ): Promise; + /** + * Initializes ARC Disable process on the cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param options The options parameters. + */ + beginInitializeDisableProcess( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + options?: ArcSettingsInitializeDisableProcessOptionalParams + ): Promise, void>>; + /** + * Initializes ARC Disable process on the cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param options The options parameters. + */ + beginInitializeDisableProcessAndWait( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + options?: ArcSettingsInitializeDisableProcessOptionalParams + ): Promise; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts index 572953e118c3..338edbf3c585 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.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 { Cluster, ClustersListBySubscriptionOptionalParams, @@ -23,7 +23,10 @@ import { UploadCertificateRequest, ClustersUploadCertificateOptionalParams, ClustersCreateIdentityOptionalParams, - ClustersCreateIdentityResponse + ClustersCreateIdentityResponse, + SoftwareAssuranceChangeRequest, + ClustersExtendSoftwareAssuranceBenefitOptionalParams, + ClustersExtendSoftwareAssuranceBenefitResponse } from "../models"; /// @@ -92,7 +95,7 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an HCI cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -116,7 +119,7 @@ export interface Clusters { clusterName: string, uploadCertificateRequest: UploadCertificateRequest, options?: ClustersUploadCertificateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Upload certificate. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -141,8 +144,8 @@ export interface Clusters { clusterName: string, options?: ClustersCreateIdentityOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateIdentityResponse > >; @@ -157,4 +160,35 @@ export interface Clusters { clusterName: string, options?: ClustersCreateIdentityOptionalParams ): Promise; + /** + * Extends Software Assurance Benefit to a cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload + * @param options The options parameters. + */ + beginExtendSoftwareAssuranceBenefit( + resourceGroupName: string, + clusterName: string, + softwareAssuranceChangeRequest: SoftwareAssuranceChangeRequest, + options?: ClustersExtendSoftwareAssuranceBenefitOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersExtendSoftwareAssuranceBenefitResponse + > + >; + /** + * Extends Software Assurance Benefit to a cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload + * @param options The options parameters. + */ + beginExtendSoftwareAssuranceBenefitAndWait( + resourceGroupName: string, + clusterName: string, + softwareAssuranceChangeRequest: SoftwareAssuranceChangeRequest, + options?: ClustersExtendSoftwareAssuranceBenefitOptionalParams + ): Promise; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.ts index 22c2192cc9af..8751afd1eb4a 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/extensions.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 { Extension, ExtensionsListByArcSettingOptionalParams, @@ -15,9 +15,12 @@ import { ExtensionsGetResponse, ExtensionsCreateOptionalParams, ExtensionsCreateResponse, + ExtensionPatch, ExtensionsUpdateOptionalParams, ExtensionsUpdateResponse, - ExtensionsDeleteOptionalParams + ExtensionsDeleteOptionalParams, + ExtensionUpgradeParameters, + ExtensionsUpgradeOptionalParams } from "../models"; /// @@ -68,8 +71,8 @@ export interface Extensions { extension: Extension, options?: ExtensionsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ExtensionsCreateResponse > >; @@ -104,11 +107,11 @@ export interface Extensions { clusterName: string, arcSettingName: string, extensionName: string, - extension: Extension, + extension: ExtensionPatch, options?: ExtensionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ExtensionsUpdateResponse > >; @@ -126,7 +129,7 @@ export interface Extensions { clusterName: string, arcSettingName: string, extensionName: string, - extension: Extension, + extension: ExtensionPatch, options?: ExtensionsUpdateOptionalParams ): Promise; /** @@ -143,7 +146,7 @@ export interface Extensions { arcSettingName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete particular Arc Extension of HCI Cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -159,4 +162,38 @@ export interface Extensions { extensionName: string, options?: ExtensionsDeleteOptionalParams ): Promise; + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param options The options parameters. + */ + beginUpgrade( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + extensionName: string, + extensionUpgradeParameters: ExtensionUpgradeParameters, + options?: ExtensionsUpgradeOptionalParams + ): Promise, void>>; + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param options The options parameters. + */ + beginUpgradeAndWait( + resourceGroupName: string, + clusterName: string, + arcSettingName: string, + extensionName: string, + extensionUpgradeParameters: ExtensionUpgradeParameters, + options?: ExtensionsUpgradeOptionalParams + ): Promise; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts index 2d20c6edaf47..04d9496a7b22 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts @@ -9,4 +9,10 @@ export * from "./arcSettings"; export * from "./clusters"; export * from "./extensions"; +export * from "./offers"; export * from "./operations"; +export * from "./publishers"; +export * from "./skus"; +export * from "./updateRuns"; +export * from "./updateSummariesOperations"; +export * from "./updates"; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/offers.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/offers.ts new file mode 100644 index 000000000000..173d11c68359 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/offers.ts @@ -0,0 +1,60 @@ +/* + * 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 { + Offer, + OffersListByPublisherOptionalParams, + OffersListByClusterOptionalParams, + OffersGetOptionalParams, + OffersGetResponse +} from "../models"; + +/// +/** Interface representing a Offers. */ +export interface Offers { + /** + * List Offers available for a publisher within the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param options The options parameters. + */ + listByPublisher( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: OffersListByPublisherOptionalParams + ): PagedAsyncIterableIterator; + /** + * List Offers available across publishers for the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + listByCluster( + resourceGroupName: string, + clusterName: string, + options?: OffersListByClusterOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get Offer resource details within a publisher of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: OffersGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/publishers.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/publishers.ts new file mode 100644 index 000000000000..6351ecf9b089 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/publishers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Publisher, + PublishersListByClusterOptionalParams, + PublishersGetOptionalParams, + PublishersGetResponse +} from "../models"; + +/// +/** Interface representing a Publishers. */ +export interface Publishers { + /** + * List Publishers available for the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + listByCluster( + resourceGroupName: string, + clusterName: string, + options?: PublishersListByClusterOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get Publisher resource details of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: PublishersGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/skus.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/skus.ts new file mode 100644 index 000000000000..eb186a7696bc --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/skus.ts @@ -0,0 +1,52 @@ +/* + * 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 { + Sku, + SkusListByOfferOptionalParams, + SkusGetOptionalParams, + SkusGetResponse +} from "../models"; + +/// +/** Interface representing a Skus. */ +export interface Skus { + /** + * List Skus available for a offer within the HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param options The options parameters. + */ + listByOffer( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: SkusListByOfferOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get SKU resource details within a offer of HCI Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + skuName: string, + options?: SkusGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateRuns.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateRuns.ts new file mode 100644 index 000000000000..9e70a1fb518f --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateRuns.ts @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + UpdateRun, + UpdateRunsListOptionalParams, + UpdateRunsDeleteOptionalParams, + UpdateRunsPutOptionalParams, + UpdateRunsPutResponse, + UpdateRunsGetOptionalParams, + UpdateRunsGetResponse +} from "../models"; + +/// +/** Interface representing a UpdateRuns. */ +export interface UpdateRuns { + /** + * List all Update runs for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + list( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdateRunsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Delete specified Update Run + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + options?: UpdateRunsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete specified Update Run + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + options?: UpdateRunsDeleteOptionalParams + ): Promise; + /** + * Put Update runs for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param updateRunsProperties Properties of the updateRuns object + * @param options The options parameters. + */ + put( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + updateRunsProperties: UpdateRun, + options?: UpdateRunsPutOptionalParams + ): Promise; + /** + * Get the Update run for a specified update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateRunName The name of the Update Run + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateRunName: string, + options?: UpdateRunsGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateSummariesOperations.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateSummariesOperations.ts new file mode 100644 index 000000000000..238f05c8293b --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateSummariesOperations.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + UpdateSummaries, + UpdateSummariesListOptionalParams, + UpdateSummariesDeleteOptionalParams, + UpdateSummariesPutOptionalParams, + UpdateSummariesPutResponse, + UpdateSummariesGetOptionalParams, + UpdateSummariesGetResponse +} from "../models"; + +/// +/** Interface representing a UpdateSummariesOperations. */ +export interface UpdateSummariesOperations { + /** + * List all Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Delete Update Summaries + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete Update Summaries + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesDeleteOptionalParams + ): Promise; + /** + * Put Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource + * @param options The options parameters. + */ + put( + resourceGroupName: string, + clusterName: string, + updateLocationProperties: UpdateSummaries, + options?: UpdateSummariesPutOptionalParams + ): Promise; + /** + * Get all Update summaries under the HCI cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updates.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updates.ts new file mode 100644 index 000000000000..4477b99c6278 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updates.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Update, + UpdatesListOptionalParams, + UpdatesPostOptionalParams, + UpdatesDeleteOptionalParams, + UpdatesPutOptionalParams, + UpdatesPutResponse, + UpdatesGetOptionalParams, + UpdatesGetResponse +} from "../models"; + +/// +/** Interface representing a Updates. */ +export interface Updates { + /** + * List all Updates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + clusterName: string, + options?: UpdatesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Apply Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + beginPost( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesPostOptionalParams + ): Promise, void>>; + /** + * Apply Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + beginPostAndWait( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesPostOptionalParams + ): Promise; + /** + * Delete specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesDeleteOptionalParams + ): Promise; + /** + * Put specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param updateProperties Properties of the Updates object + * @param options The options parameters. + */ + put( + resourceGroupName: string, + clusterName: string, + updateName: string, + updateProperties: Update, + options?: UpdatesPutOptionalParams + ): Promise; + /** + * Get specified Update + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdatesGetOptionalParams + ): Promise; +} diff --git a/sdk/azurestackhci/arm-azurestackhci/src/pagingHelper.ts b/sdk/azurestackhci/arm-azurestackhci/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/pagingHelper.ts +++ b/sdk/azurestackhci/arm-azurestackhci/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/azurestackhci/arm-azurestackhci/tsconfig.json b/sdk/azurestackhci/arm-azurestackhci/tsconfig.json index ebe661af00c2..3e6ae96443f3 100644 --- a/sdk/azurestackhci/arm-azurestackhci/tsconfig.json +++ b/sdk/azurestackhci/arm-azurestackhci/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-azurestackhci": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"