From 05b192d3feb833d3bd6f207217357bcba52b3ea0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 1 Oct 2022 03:38:02 +0000 Subject: [PATCH] CodeGen from PR 20924 in Azure/azure-rest-api-specs Merge cc9e79188a0d40a064cc03fa2473311173dec797 into 9f83afe71e613b243f1374e2c666af057aac15cd --- common/config/rush/pnpm-lock.yaml | 13 +- .../arm-azurestackhci/CHANGELOG.md | 121 +- sdk/azurestackhci/arm-azurestackhci/README.md | 2 +- .../arm-azurestackhci/_meta.json | 8 +- .../arm-azurestackhci/package.json | 29 +- .../review/arm-azurestackhci.api.md | 668 +++++++++-- .../src/azureStackHCIClient.ts | 69 +- .../arm-azurestackhci/src/models/index.ts | 937 ++++++++++++++- .../arm-azurestackhci/src/models/mappers.ts | 1055 +++++++++++++++-- .../src/models/parameters.ts | 73 +- .../src/operations/clusters.ts | 134 +++ .../arm-azurestackhci/src/operations/index.ts | 6 + .../src/operations/offers.ts | 406 +++++++ .../src/operations/publishers.ts | 233 ++++ .../arm-azurestackhci/src/operations/skus.ts | 283 +++++ .../src/operations/updateRuns.ts | 251 ++++ .../operations/updateSummariesOperations.ts | 219 ++++ .../src/operations/updates.ts | 336 ++++++ .../src/operationsInterfaces/clusters.ts | 36 +- .../src/operationsInterfaces/index.ts | 6 + .../src/operationsInterfaces/offers.ts | 60 + .../src/operationsInterfaces/publishers.ts | 44 + .../src/operationsInterfaces/skus.ts | 52 + .../src/operationsInterfaces/updateRuns.ts | 48 + .../updateSummariesOperations.ts | 42 + .../src/operationsInterfaces/updates.ts | 72 ++ .../arm-azurestackhci/test/sampleTest.ts | 39 +- .../arm-azurestackhci/tsconfig.json | 10 +- 28 files changed, 4862 insertions(+), 390 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 8aee79f5130d..372396115772 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4063,7 +4063,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220929 + typescript: 4.9.0-dev.20220930 dev: false /downlevel-dts/0.8.0: @@ -9078,8 +9078,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220929: - resolution: {integrity: sha512-D4q6Fx3w/u1eZH22OgSEn2WZReEEUNXtEUWwpKi9sxvS6db58EHUAnUSz/uFD/RSlyPpgUNM5Wg/Rb4oqUiMvw==} + /typescript/4.9.0-dev.20220930: + resolution: {integrity: sha512-rYlFj6/BJohmUALnr/M54Ch1YJ5xgaTZvGKvKbk2KI0wnwJMr62dKv9DD9YUUGwd0VPVPXj4QsTOY1nWk21zVw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -10817,18 +10817,20 @@ packages: dev: false file:projects/arm-azurestackhci.tgz: - resolution: {integrity: sha512-ThFQ7fAg3tHNjRA91Br7ssSWnLJobS3bckyt68c7vh2lPPlgkAc+viILviZfq7jeJleCY6docyTuN+JwG/OhDg==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-gOjLa6Wkvjji6mdgzgkTvrv9USxVWwgKaTcN/Fiock0gEfc1PfZVDx0U7n8iTmUs8vJ8+DPduuePIEUCp/a+hA==, tarball: file:projects/arm-azurestackhci.tgz} name: '@rush-temp/arm-azurestackhci' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/core-lro': 2.2.4 '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.31.1 + '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.0 '@rollup/plugin-json': 4.1.0_rollup@2.79.0 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.0 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.0 + '@types/chai': 4.3.1 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -10840,7 +10842,6 @@ packages: uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md index 238a56e63418..cc0d2c1d0196 100644 --- a/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/arm-azurestackhci/CHANGELOG.md @@ -1,15 +1,116 @@ # Release History + +## 3.1.0 (2022-10-01) + +**Features** -## 3.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - 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 Clusters.beginExtendSoftwareAssuranceBenefit + - Added operation Clusters.beginExtendSoftwareAssuranceBenefitAndWait + - Added Interface ArcSetting + - Added Interface Cluster + - Added Interface ClustersExtendSoftwareAssuranceBenefitOptionalParams + - Added Interface Extension + - 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 ProxyResource + - Added Interface Publisher + - Added Interface PublisherList + - Added Interface PublishersGetOptionalParams + - Added Interface PublishersListByClusterNextOptionalParams + - Added Interface PublishersListByClusterOptionalParams + - 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 TrackedResource + - Added Interface Update + - Added Interface UpdateList + - Added Interface UpdatePrerequisite + - Added Interface UpdateRun + - Added Interface UpdateRunList + - Added Interface UpdateRunsGetOptionalParams + - Added Interface UpdateRunsListNextOptionalParams + - Added Interface UpdateRunsListOptionalParams + - Added Interface UpdatesGetOptionalParams + - Added Interface UpdatesListNextOptionalParams + - Added Interface UpdatesListOptionalParams + - Added Interface UpdatesPostOptionalParams + - Added Interface UpdateSummaries + - Added Interface UpdateSummariesGetOptionalParams + - Added Interface UpdateSummariesList + - Added Interface UpdateSummariesListNextOptionalParams + - Added Interface UpdateSummariesListOptionalParams + - Added Interface UserAssignedIdentity + - Added Type Alias AvailabilityType + - Added Type Alias ClusterNodeType + - Added Type Alias ClustersExtendSoftwareAssuranceBenefitResponse + - Added Type Alias ManagedServiceIdentityType + - 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 SkusGetResponse + - Added Type Alias SkusListByOfferNextResponse + - Added Type Alias SkusListByOfferResponse + - Added Type Alias SoftwareAssuranceIntent + - Added Type Alias SoftwareAssuranceStatus + - Added Type Alias State + - Added Type Alias UpdateRunPropertiesState + - Added Type Alias UpdateRunsGetResponse + - Added Type Alias UpdateRunsListNextResponse + - Added Type Alias UpdateRunsListResponse + - Added Type Alias UpdatesGetResponse + - Added Type Alias UpdatesListNextResponse + - Added Type Alias UpdatesListResponse + - Added Type Alias UpdateSummariesGetResponse + - Added Type Alias UpdateSummariesListNextResponse + - Added Type Alias UpdateSummariesListResponse + - Added Type Alias UpdateSummariesPropertiesState + - Interface ClusterNode has a new optional parameter nodeType + - 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 Resource has a new optional parameter systemData + - Class AzureStackHCIClient has a new parameter offers + - Class AzureStackHCIClient has a new parameter publishers + - Class AzureStackHCIClient has a new parameter skus + - Class AzureStackHCIClient has a new parameter updateRuns + - Class AzureStackHCIClient has a new parameter updates + - Class AzureStackHCIClient has a new parameter updateSummariesOperations + - Added Enum KnownAvailabilityType + - Added Enum KnownClusterNodeType + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownSoftwareAssuranceIntent + - Added Enum KnownSoftwareAssuranceStatus + - Added Enum KnownState + - Added Enum KnownUpdateRunPropertiesState + - Added Enum KnownUpdateSummariesPropertiesState + ## 3.0.1 (2022-09-30) **Bugs Fixed** diff --git a/sdk/azurestackhci/arm-azurestackhci/README.md b/sdk/azurestackhci/arm-azurestackhci/README.md index 8cbc5e791c39..255b1988b853 100644 --- a/sdk/azurestackhci/arm-azurestackhci/README.md +++ b/sdk/azurestackhci/arm-azurestackhci/README.md @@ -13,7 +13,7 @@ Azure Stack HCI management service ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/azurestackhci/arm-azurestackhci/_meta.json b/sdk/azurestackhci/arm-azurestackhci/_meta.json index b293f9ef7255..949d2c7d4795 100644 --- a/sdk/azurestackhci/arm-azurestackhci/_meta.json +++ b/sdk/azurestackhci/arm-azurestackhci/_meta.json @@ -1,8 +1,8 @@ { - "commit": "057c69f5ed2f893c34944e9bfba3e303d49f64bc", + "commit": "b3ef48894c293b1d6522f3e3286c7f9340a8f13c", "readme": "specification/azurestackhci/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\azurestackhci\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/azurestackhci/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.3", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/azurestackhci/arm-azurestackhci/package.json b/sdk/azurestackhci/arm-azurestackhci/package.json index 1509f819ac98..ba52bd4b2395 100644 --- a/sdk/azurestackhci/arm-azurestackhci/package.json +++ b/sdk/azurestackhci/arm-azurestackhci/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureStackHCIClient.", - "version": "3.0.2", + "version": "3.1.0", "engines": { "node": ">=12.0.0" }, @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-azurestackhci.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", @@ -40,9 +40,13 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestackhci/arm-azurestackhci", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -106,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-azurestackhci?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 a381027df484..33e041270a6c 100644 --- a/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md +++ b/sdk/azurestackhci/arm-azurestackhci/review/arm-azurestackhci.api.md @@ -31,23 +31,17 @@ export interface ArcIdentityResponse { } // @public -export type ArcSetting = ProxyResource & { - readonly provisioningState?: ProvisioningState; - arcInstanceResourceGroup?: string; +export interface ArcSetting extends ProxyResource { + readonly aggregateState?: ArcSettingAggregateState; arcApplicationClientId?: string; + arcApplicationObjectId?: string; arcApplicationTenantId?: string; + arcInstanceResourceGroup?: string; arcServicePrincipalObjectId?: string; - arcApplicationObjectId?: string; - readonly aggregateState?: ArcSettingAggregateState; - readonly perNodeDetails?: PerNodeState[]; connectivityProperties?: Record; - createdBy?: string; - createdByType?: CreatedByType; - createdAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - lastModifiedAt?: Date; -}; + readonly perNodeDetails?: PerNodeState[]; + readonly provisioningState?: ProvisioningState; +} // @public export type ArcSettingAggregateState = string; @@ -136,6 +130,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 +147,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 @@ -163,30 +172,31 @@ export interface AzureStackHCIClientOptionalParams extends coreClient.ServiceCli } // @public -export type Cluster = TrackedResource & { - readonly provisioningState?: ProvisioningState; - readonly status?: Status; - readonly cloudId?: string; - cloudManagementEndpoint?: string; - aadClientId?: string; - aadTenantId?: string; +export interface Cluster extends TrackedResource { aadApplicationObjectId?: string; + aadClientId?: string; aadServicePrincipalObjectId?: string; - desiredProperties?: ClusterDesiredProperties; - readonly reportedProperties?: ClusterReportedProperties; - readonly trialDaysRemaining?: number; + aadTenantId?: string; readonly billingModel?: string; - readonly registrationTimestamp?: Date; - readonly lastSyncTimestamp?: Date; + readonly cloudId?: string; + cloudManagementEndpoint?: string; + desiredProperties?: ClusterDesiredProperties; readonly lastBillingTimestamp?: Date; + readonly lastSyncTimestamp?: Date; + readonly principalId?: string; + readonly provisioningState?: ProvisioningState; + readonly registrationTimestamp?: Date; + readonly reportedProperties?: ClusterReportedProperties; readonly serviceEndpoint?: string; - createdBy?: string; - createdByType?: CreatedByType; - createdAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - lastModifiedAt?: Date; -}; + softwareAssuranceProperties?: SoftwareAssuranceProperties; + readonly status?: Status; + readonly tenantId?: string; + readonly trialDaysRemaining?: number; + typeIdentityType?: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} // @public export interface ClusterDesiredProperties { @@ -220,21 +230,32 @@ export interface ClusterNode { readonly memoryInGiB?: number; readonly model?: string; readonly name?: string; + readonly nodeType?: ClusterNodeType; + 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 @@ -254,6 +275,8 @@ export interface Clusters { beginCreateIdentityAndWait(resourceGroupName: string, clusterName: string, options?: ClustersCreateIdentityOptionalParams): Promise; beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; + 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; @@ -285,6 +308,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 { } @@ -360,24 +392,18 @@ export interface ErrorResponse { } // @public -export type Extension = ProxyResource & { - readonly provisioningState?: ProvisioningState; +export interface Extension extends ProxyResource { readonly aggregateState?: ExtensionAggregateState; - readonly perNodeExtensionDetails?: PerNodeExtensionState[]; + autoUpgradeMinorVersion?: boolean; forceUpdateTag?: string; + readonly perNodeExtensionDetails?: PerNodeExtensionState[]; + protectedSettings?: Record; + readonly provisioningState?: ProvisioningState; publisher?: string; - typePropertiesExtensionParametersType?: string; - typeHandlerVersion?: string; - autoUpgradeMinorVersion?: boolean; settings?: Record; - protectedSettings?: Record; - createdBy?: string; - createdByType?: CreatedByType; - createdAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; - lastModifiedAt?: Date; -}; + typeHandlerVersion?: string; + typePropertiesExtensionParametersType?: string; +} // @public export type ExtensionAggregateState = string; @@ -450,216 +476,277 @@ export type ImdsAttestation = string; // @public export enum KnownActionType { - // (undocumented) Internal = "Internal" } // @public export enum KnownArcSettingAggregateState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Connected = "Connected", - // (undocumented) Creating = "Creating", - // (undocumented) Deleted = "Deleted", - // (undocumented) Deleting = "Deleting", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Error = "Error", - // (undocumented) Failed = "Failed", - // (undocumented) InProgress = "InProgress", - // (undocumented) Moving = "Moving", - // (undocumented) NotSpecified = "NotSpecified", - // (undocumented) PartiallyConnected = "PartiallyConnected", - // (undocumented) PartiallySucceeded = "PartiallySucceeded", - // (undocumented) Succeeded = "Succeeded", - // (undocumented) Updating = "Updating" } +// @public +export enum KnownAvailabilityType { + Local = "Local", + Notify = "Notify", + Online = "Online" +} + +// @public +export enum KnownClusterNodeType { + FirstParty = "FirstParty", + ThirdParty = "ThirdParty" +} + // @public export enum KnownCreatedByType { - // (undocumented) Application = "Application", - // (undocumented) Key = "Key", - // (undocumented) ManagedIdentity = "ManagedIdentity", - // (undocumented) User = "User" } // @public export enum KnownDiagnosticLevel { - // (undocumented) Basic = "Basic", - // (undocumented) Enhanced = "Enhanced", - // (undocumented) Off = "Off" } // @public export enum KnownExtensionAggregateState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Connected = "Connected", - // (undocumented) Creating = "Creating", - // (undocumented) Deleted = "Deleted", - // (undocumented) Deleting = "Deleting", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Error = "Error", - // (undocumented) Failed = "Failed", - // (undocumented) InProgress = "InProgress", - // (undocumented) Moving = "Moving", - // (undocumented) NotSpecified = "NotSpecified", - // (undocumented) PartiallyConnected = "PartiallyConnected", - // (undocumented) PartiallySucceeded = "PartiallySucceeded", - // (undocumented) Succeeded = "Succeeded", - // (undocumented) Updating = "Updating" } // @public export enum KnownImdsAttestation { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + UserAssigned = "UserAssigned" +} + // @public export enum KnownNodeArcState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Connected = "Connected", - // (undocumented) Creating = "Creating", - // (undocumented) Deleted = "Deleted", - // (undocumented) Deleting = "Deleting", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Error = "Error", - // (undocumented) Failed = "Failed", - // (undocumented) Moving = "Moving", - // (undocumented) NotSpecified = "NotSpecified", - // (undocumented) Succeeded = "Succeeded", - // (undocumented) Updating = "Updating" } // @public export enum KnownNodeExtensionState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Connected = "Connected", - // (undocumented) Creating = "Creating", - // (undocumented) Deleted = "Deleted", - // (undocumented) Deleting = "Deleting", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Error = "Error", - // (undocumented) Failed = "Failed", - // (undocumented) Moving = "Moving", - // (undocumented) NotSpecified = "NotSpecified", - // (undocumented) Succeeded = "Succeeded", - // (undocumented) Updating = "Updating" } // @public export enum KnownOrigin { - // (undocumented) System = "system", - // (undocumented) User = "user", - // (undocumented) UserSystem = "user,system" } // @public export enum KnownProvisioningState { - // (undocumented) Accepted = "Accepted", - // (undocumented) Canceled = "Canceled", - // (undocumented) Failed = "Failed", - // (undocumented) Provisioning = "Provisioning", - // (undocumented) Succeeded = "Succeeded" } +// @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 export enum KnownStatus { - // (undocumented) ConnectedRecently = "ConnectedRecently", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Error = "Error", - // (undocumented) NotConnectedRecently = "NotConnectedRecently", - // (undocumented) NotYetRegistered = "NotYetRegistered" } +// @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 export enum KnownWindowsServerSubscription { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } +// @public +export type ManagedServiceIdentityType = string; + // @public export type NodeArcState = string; // @public export type NodeExtensionState = 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 { + expand?: string; +} + +// @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 { + expand?: string; +} + +// @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; @@ -698,6 +785,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) @@ -728,7 +822,46 @@ export interface PerNodeState { export type ProvisioningState = string; // @public -export type ProxyResource = Resource & {}; +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 { @@ -740,19 +873,290 @@ export interface RawCertificateData { export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: 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 { + expand?: string; +} + +// @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; + softwareAssuranceStatus?: SoftwareAssuranceStatus; +} + +// @public +export type SoftwareAssuranceStatus = string; + +// @public +export type State = string; + // @public export type Status = string; // @public -export type TrackedResource = Resource & { +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; tags?: { [propertyName: string]: string; }; - location: string; -}; +} + +// @public +export interface Update extends ProxyResource { + additionalProperties?: string; + availabilityType?: AvailabilityType; + description?: string; + displayName?: string; + installedDate?: Date; + location?: string; + notifyMessage?: string; + packagePath?: string; + packageSizeInMb?: number; + packageType?: string; + prerequisites?: UpdatePrerequisite[]; + progressPercentage?: number; + readonly provisioningState?: ProvisioningState; + publisher?: string; + 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; + lastUpdatedTimeUtc?: Date; + location?: string; + namePropertiesProgressName?: string; + readonly provisioningState?: ProvisioningState; + startTimeUtc?: Date; + state?: UpdateRunPropertiesState; + status?: string; + steps?: Step[]; +} + +// @public +export interface UpdateRunList { + readonly nextLink?: string; + value?: UpdateRun[]; +} + +// @public +export type UpdateRunPropertiesState = string; + +// @public +export interface UpdateRuns { + get(resourceGroupName: string, clusterName: string, updateName: string, updateRunName: string, options?: UpdateRunsGetOptionalParams): Promise; + list(resourceGroupName: string, clusterName: string, updateName: string, options?: UpdateRunsListOptionalParams): PagedAsyncIterableIterator; +} + +// @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 Updates { + 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; +} + +// @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 UpdatesPostOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface UpdateSummaries extends ProxyResource { + currentVersion?: string; + hardwareModel?: string; + location?: string; + oemFamily?: string; + packageVersions?: PackageVersionInfo[]; + readonly provisioningState?: ProvisioningState; + state?: UpdateSummariesPropertiesState; +} + +// @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 { + get(resourceGroupName: string, clusterName: string, options?: UpdateSummariesGetOptionalParams): Promise; + list(resourceGroupName: string, clusterName: string, options?: UpdateSummariesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type UpdateSummariesPropertiesState = string; // @public (undocumented) export interface UploadCertificateRequest { @@ -760,6 +1164,12 @@ export interface UploadCertificateRequest { 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 2d1e9458b566..911daacc4c92 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/azureStackHCIClient.ts @@ -8,18 +8,35 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { ArcSettingsImpl, ClustersImpl, ExtensionsImpl, - OperationsImpl + OperationsImpl, + OffersImpl, + PublishersImpl, + SkusImpl, + UpdateRunsImpl, + UpdateSummariesOperationsImpl, + UpdatesImpl } from "./operations"; import { ArcSettings, Clusters, Extensions, - Operations + Operations, + Offers, + Publishers, + Skus, + UpdateRuns, + UpdateSummariesOperations, + Updates } from "./operationsInterfaces"; import { AzureStackHCIClientOptionalParams } from "./models"; @@ -55,12 +72,15 @@ export class AzureStackHCIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-azurestackhci/3.0.2`; + const packageDetails = `azsdk-js-arm-azurestackhci/3.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } const optionsWithDefaults = { ...defaults, ...options, @@ -99,15 +119,56 @@ 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 || "2022-10-01"; this.arcSettings = new ArcSettingsImpl(this); this.clusters = new ClustersImpl(this); this.extensions = new ExtensionsImpl(this); this.operations = new OperationsImpl(this); + this.offers = new OffersImpl(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); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } arcSettings: ArcSettings; clusters: Clusters; extensions: Extensions; operations: Operations; + offers: Offers; + publishers: Publishers; + skus: Skus; + updateRuns: UpdateRuns; + updateSummariesOperations: UpdateSummariesOperations; + updates: Updates; } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts index 03c622d84d1b..091cdc4878b0 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/index.ts @@ -58,6 +58,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 +164,33 @@ 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. */ + 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. */ @@ -204,6 +252,11 @@ 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; /** * Manufacturer of the cluster node hardware. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -224,6 +277,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. @@ -253,6 +311,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 +343,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 { /** @@ -368,6 +449,131 @@ export interface OperationDisplay { readonly description?: 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[]; +} + +/** 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; +} + +/** 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 */ @@ -375,18 +581,18 @@ export interface ArcConnectivityProperties { } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource {} /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; -}; +} /** ArcSetting details. */ -export type ArcSetting = ProxyResource & { +export interface ArcSetting extends ProxyResource { /** * Provisioning state of the ArcSetting proxy resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -414,22 +620,10 @@ export type ArcSetting = 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; -}; +} /** Details of a particular extension in HCI Cluster. */ -export type Extension = ProxyResource & { +export interface Extension extends ProxyResource { /** * Provisioning state of the Extension proxy resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -459,22 +653,148 @@ export type Extension = 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; -}; +} + +/** 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; + /** 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; + /** 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[]; + /** 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. */ -export type Cluster = TrackedResource & { +export interface Cluster extends TrackedResource { /** * Provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -500,6 +820,8 @@ export type Cluster = 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; /** @@ -537,46 +859,33 @@ export type Cluster = 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; -}; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - User = "User", - Application = "Application", - ManagedIdentity = "ManagedIdentity", - Key = "Key" + /** + * 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 }; } -/** - * 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 ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed", + /** Canceled */ Canceled = "Canceled", + /** Accepted */ Accepted = "Accepted", + /** Provisioning */ Provisioning = "Provisioning" } @@ -595,20 +904,35 @@ export type ProvisioningState = string; /** Known values of {@link ArcSettingAggregateState} that the service accepts. */ export enum KnownArcSettingAggregateState { + /** NotSpecified */ NotSpecified = "NotSpecified", + /** Error */ Error = "Error", + /** Succeeded */ Succeeded = "Succeeded", + /** Canceled */ Canceled = "Canceled", + /** Failed */ Failed = "Failed", + /** 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" } @@ -637,17 +961,29 @@ export type ArcSettingAggregateState = string; /** Known values of {@link NodeArcState} that the service accepts. */ export enum KnownNodeArcState { + /** NotSpecified */ NotSpecified = "NotSpecified", + /** Error */ Error = "Error", + /** Succeeded */ Succeeded = "Succeeded", + /** Canceled */ Canceled = "Canceled", + /** Failed */ Failed = "Failed", + /** Connected */ Connected = "Connected", + /** Disconnected */ Disconnected = "Disconnected", + /** Deleted */ Deleted = "Deleted", + /** Creating */ Creating = "Creating", + /** Updating */ Updating = "Updating", + /** Deleting */ Deleting = "Deleting", + /** Moving */ Moving = "Moving" } @@ -671,12 +1007,65 @@ export enum KnownNodeArcState { */ 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 */ NotYetRegistered = "NotYetRegistered", + /** ConnectedRecently */ ConnectedRecently = "ConnectedRecently", + /** NotConnectedRecently */ NotConnectedRecently = "NotConnectedRecently", + /** Disconnected */ Disconnected = "Disconnected", + /** Error */ Error = "Error" } @@ -693,9 +1082,47 @@ export enum KnownStatus { */ export type Status = 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 */ Disabled = "Disabled", + /** Enabled */ Enabled = "Enabled" } @@ -711,8 +1138,11 @@ export type WindowsServerSubscription = string; /** Known values of {@link DiagnosticLevel} that the service accepts. */ export enum KnownDiagnosticLevel { + /** Off */ Off = "Off", + /** Basic */ Basic = "Basic", + /** Enhanced */ Enhanced = "Enhanced" } @@ -727,9 +1157,29 @@ 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 ImdsAttestation} that the service accepts. */ export enum KnownImdsAttestation { + /** Disabled */ Disabled = "Disabled", + /** Enabled */ Enabled = "Enabled" } @@ -745,20 +1195,35 @@ export type ImdsAttestation = string; /** Known values of {@link ExtensionAggregateState} that the service accepts. */ export enum KnownExtensionAggregateState { + /** NotSpecified */ NotSpecified = "NotSpecified", + /** Error */ Error = "Error", + /** Succeeded */ Succeeded = "Succeeded", + /** Canceled */ Canceled = "Canceled", + /** Failed */ Failed = "Failed", + /** 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" } @@ -787,17 +1252,29 @@ export type ExtensionAggregateState = string; /** Known values of {@link NodeExtensionState} that the service accepts. */ export enum KnownNodeExtensionState { + /** NotSpecified */ NotSpecified = "NotSpecified", + /** Error */ Error = "Error", + /** Succeeded */ Succeeded = "Succeeded", + /** Canceled */ Canceled = "Canceled", + /** Failed */ Failed = "Failed", + /** Connected */ Connected = "Connected", + /** Disconnected */ Disconnected = "Disconnected", + /** Deleted */ Deleted = "Deleted", + /** Creating */ Creating = "Creating", + /** Updating */ Updating = "Updating", + /** Deleting */ Deleting = "Deleting", + /** Moving */ Moving = "Moving" } @@ -823,8 +1300,11 @@ export type NodeExtensionState = string; /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { + /** User */ User = "user", + /** System */ System = "system", + /** UserSystem */ UserSystem = "user,system" } @@ -841,6 +1321,7 @@ export type Origin = string; /** Known values of {@link ActionType} that the service accepts. */ export enum KnownActionType { + /** Internal */ Internal = "Internal" } @@ -853,6 +1334,153 @@ 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 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 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; + /** Optional parameters. */ export interface ArcSettingsListByClusterOptionalParams extends coreClient.OperationOptions {} @@ -981,6 +1609,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 {} @@ -1056,6 +1696,175 @@ export interface OperationsListOptionalParams /** Contains response data for the list operation. */ export type OperationsListResponse = OperationListResult; +/** 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 { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the listByPublisherNext operation. */ +export type OffersListByPublisherNextResponse = OfferList; + +/** Optional parameters. */ +export interface OffersListByClusterNextOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** Contains response data for the listByClusterNext operation. */ +export type OffersListByClusterNextResponse = OfferList; + +/** 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 { + /** Specify $expand=content,contentVersion to populate additional fields related to the marketplace offer. */ + expand?: string; +} + +/** 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 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 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 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..e1d53a518188 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts @@ -92,6 +92,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 +362,57 @@ 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", + 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", @@ -420,6 +523,13 @@ export const ClusterNode: coreClient.CompositeMapper = { name: "String" } }, + nodeType: { + serializedName: "nodeType", + readOnly: true, + type: { + name: "String" + } + }, manufacturer: { serializedName: "manufacturer", readOnly: true, @@ -448,6 +558,13 @@ export const ClusterNode: coreClient.CompositeMapper = { name: "String" } }, + osDisplayVersion: { + serializedName: "osDisplayVersion", + readOnly: true, + type: { + name: "String" + } + }, serialNumber: { serializedName: "serialNumber", readOnly: true, @@ -509,6 +626,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 +729,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", @@ -752,47 +929,88 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ArcConnectivityProperties: coreClient.CompositeMapper = { +export const OfferList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcConnectivityProperties", + className: "OfferList", modelProperties: { - enabled: { - serializedName: "enabled", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Offer" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" } } } } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const SkuMappings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "SkuMappings", modelProperties: { - ...Resource.type.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 TrackedResource: coreClient.CompositeMapper = { +export const PublisherList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "PublisherList", 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: "Publisher" + } + } } }, - location: { - serializedName: "location", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -801,122 +1019,659 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ArcSetting: coreClient.CompositeMapper = { +export const SkuList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArcSetting", + className: "SkuList", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Sku" + } + } } }, - arcInstanceResourceGroup: { - serializedName: "properties.arcInstanceResourceGroup", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } + } + } + } +}; + +export const UpdateRunList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateRunList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateRun" + } + } + } }, - arcApplicationClientId: { - serializedName: "properties.arcApplicationClientId", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - arcApplicationTenantId: { - serializedName: "properties.arcApplicationTenantId", + } + } + } +}; + +export const Step: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Step", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - arcServicePrincipalObjectId: { - serializedName: "properties.arcServicePrincipalObjectId", + description: { + serializedName: "description", type: { name: "String" } }, - arcApplicationObjectId: { - serializedName: "properties.arcApplicationObjectId", + errorMessage: { + serializedName: "errorMessage", type: { name: "String" } }, - aggregateState: { - serializedName: "properties.aggregateState", + 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 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" + } + } + } + } +}; + +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" } } + } + } + } + } +}; + +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" + } + } + } + }, + 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" } } + } + } + } + } +}; + +export const Offer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Offer", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } }, - perNodeDetails: { - serializedName: "properties.perNodeDetails", + 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: "PerNodeState" + className: "SkuMappings" } } } + } + } + } +}; + +export const UpdateRun: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateRun", + 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", + duration: { + serializedName: "properties.duration", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + state: { + serializedName: "properties.state", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + namePropertiesProgressName: { + serializedName: "properties.progress.name", type: { - name: "DateTime" + name: "String" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + description: { + serializedName: "properties.progress.description", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + errorMessage: { + serializedName: "properties.progress.errorMessage", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + status: { + serializedName: "properties.progress.status", + type: { + name: "String" + } + }, + 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: "Step" + } + } + } } } } }; -export const Extension: coreClient.CompositeMapper = { +export const UpdateSummaries: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Extension", + className: "UpdateSummaries", modelProperties: { ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -924,105 +1679,159 @@ export const Extension: coreClient.CompositeMapper = { name: "String" } }, - aggregateState: { - serializedName: "properties.aggregateState", - readOnly: true, + oemFamily: { + serializedName: "properties.oemFamily", type: { name: "String" } }, - perNodeExtensionDetails: { - serializedName: "properties.perNodeExtensionDetails", - readOnly: true, + hardwareModel: { + serializedName: "properties.hardwareModel", + type: { + name: "String" + } + }, + packageVersions: { + serializedName: "properties.packageVersions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PerNodeExtensionState" + className: "PackageVersionInfo" } } } }, - forceUpdateTag: { - serializedName: "properties.extensionParameters.forceUpdateTag", + currentVersion: { + serializedName: "properties.currentVersion", type: { name: "String" } }, - publisher: { - serializedName: "properties.extensionParameters.publisher", + state: { + serializedName: "properties.state", + type: { + name: "String" + } + } + } + } +}; + +export const Update: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Update", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", type: { name: "String" } }, - typePropertiesExtensionParametersType: { - serializedName: "properties.extensionParameters.type", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.extensionParameters.typeHandlerVersion", + installedDate: { + serializedName: "properties.installedDate", + type: { + name: "DateTime" + } + }, + description: { + serializedName: "properties.description", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: - "properties.extensionParameters.autoUpgradeMinorVersion", + state: { + serializedName: "properties.state", type: { - name: "Boolean" + name: "String" } }, - settings: { - serializedName: "properties.extensionParameters.settings", + prerequisites: { + serializedName: "properties.prerequisites", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdatePrerequisite" + } + } } }, - protectedSettings: { - serializedName: "properties.extensionParameters.protectedSettings", + packagePath: { + serializedName: "properties.packagePath", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } }, - createdBy: { - serializedName: "systemData.createdBy", + packageSizeInMb: { + serializedName: "properties.packageSizeInMb", + type: { + name: "Number" + } + }, + displayName: { + serializedName: "properties.displayName", type: { name: "String" } }, - createdByType: { - serializedName: "systemData.createdByType", + version: { + serializedName: "properties.version", type: { name: "String" } }, - createdAt: { - serializedName: "systemData.createdAt", + publisher: { + serializedName: "properties.publisher", type: { - name: "DateTime" + name: "String" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + releaseLink: { + serializedName: "properties.releaseLink", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + availabilityType: { + serializedName: "properties.availabilityType", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + packageType: { + serializedName: "properties.packageType", type: { - name: "DateTime" + name: "String" + } + }, + additionalProperties: { + serializedName: "properties.additionalProperties", + type: { + name: "String" + } + }, + progressPercentage: { + serializedName: "properties.updateStateProperties.progressPercentage", + type: { + name: "Number" + } + }, + notifyMessage: { + serializedName: "properties.updateStateProperties.notifyMessage", + type: { + name: "String" } } } @@ -1086,6 +1895,13 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, + softwareAssuranceProperties: { + serializedName: "properties.softwareAssuranceProperties", + type: { + name: "Composite", + className: "SoftwareAssuranceProperties" + } + }, desiredProperties: { serializedName: "properties.desiredProperties", type: { @@ -1142,40 +1958,33 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, - createdBy: { - serializedName: "systemData.createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "systemData.createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "systemData.createdAt", + principalId: { + serializedName: "identity.principalId", + readOnly: true, type: { - name: "DateTime" + name: "Uuid" } }, - lastModifiedBy: { - serializedName: "systemData.lastModifiedBy", + tenantId: { + serializedName: "identity.tenantId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - lastModifiedByType: { - serializedName: "systemData.lastModifiedByType", + typeIdentityType: { + serializedName: "identity.type", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "systemData.lastModifiedAt", + userAssignedIdentities: { + serializedName: "identity.userAssignedIdentities", type: { - name: "DateTime" + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } } } } diff --git a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts index d14a11a57d80..f21181660ee8 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts @@ -17,6 +17,7 @@ import { Cluster as ClusterMapper, ClusterPatch as ClusterPatchMapper, UploadCertificateRequest as UploadCertificateRequestMapper, + SoftwareAssuranceChangeRequest as SoftwareAssuranceChangeRequestMapper, Extension as ExtensionMapper } from "../models/mappers"; @@ -87,7 +88,7 @@ export const clusterName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2022-10-01", isConstant: true, serializedName: "api-version", type: { @@ -156,6 +157,11 @@ export const uploadCertificateRequest: OperationParameter = { mapper: UploadCertificateRequestMapper }; +export const softwareAssuranceChangeRequest: OperationParameter = { + parameterPath: "softwareAssuranceChangeRequest", + mapper: SoftwareAssuranceChangeRequestMapper +}; + export const extensionName: OperationURLParameter = { parameterPath: "extensionName", mapper: { @@ -171,3 +177,68 @@ export const extension: OperationParameter = { parameterPath: "extension", mapper: ExtensionMapper }; + +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" + } + } +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts index fbc1ce5ecd43..0281c5cb38be 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts @@ -34,6 +34,9 @@ import { ClustersUploadCertificateOptionalParams, ClustersCreateIdentityOptionalParams, ClustersCreateIdentityResponse, + SoftwareAssuranceChangeRequest, + ClustersExtendSoftwareAssuranceBenefitOptionalParams, + ClustersExtendSoftwareAssuranceBenefitResponse, ClustersListBySubscriptionNextResponse, ClustersListByResourceGroupNextResponse } from "../models"; @@ -487,6 +490,104 @@ 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< + PollerLike< + PollOperationState, + ClustersExtendSoftwareAssuranceBenefitResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { + resourceGroupName, + clusterName, + softwareAssuranceChangeRequest, + options + }, + extendSoftwareAssuranceBenefitOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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. @@ -709,6 +810,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", diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts index 2d20c6edaf47..f11093a1a647 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/index.ts @@ -10,3 +10,9 @@ export * from "./arcSettings"; export * from "./clusters"; export * from "./extensions"; export * from "./operations"; +export * from "./offers"; +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..a7f8e31eae83 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/offers.ts @@ -0,0 +1,406 @@ +/* + * 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 { 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, + OffersListByClusterNextOptionalParams, + OffersListByClusterOptionalParams, + OffersListByPublisherResponse, + 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: () => { + return this.listByPublisherPagingPage( + resourceGroupName, + clusterName, + publisherName, + options + ); + } + }; + } + + private async *listByPublisherPagingPage( + resourceGroupName: string, + clusterName: string, + publisherName: string, + options?: OffersListByPublisherOptionalParams + ): AsyncIterableIterator { + let result = await this._listByPublisher( + resourceGroupName, + clusterName, + publisherName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByPublisherNext( + resourceGroupName, + clusterName, + publisherName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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: () => { + return this.listByClusterPagingPage( + resourceGroupName, + clusterName, + options + ); + } + }; + } + + private async *listByClusterPagingPage( + resourceGroupName: string, + clusterName: string, + options?: OffersListByClusterOptionalParams + ): AsyncIterableIterator { + let result = await this._listByCluster( + resourceGroupName, + clusterName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByClusterNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + 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 + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + 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..54a177a5b0d1 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/publishers.ts @@ -0,0 +1,233 @@ +/* + * 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 { 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: () => { + return this.listByClusterPagingPage( + resourceGroupName, + clusterName, + options + ); + } + }; + } + + private async *listByClusterPagingPage( + resourceGroupName: string, + clusterName: string, + options?: PublishersListByClusterOptionalParams + ): AsyncIterableIterator { + let result = await this._listByCluster( + resourceGroupName, + clusterName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByClusterNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + } + }, + queryParameters: [Parameters.apiVersion], + 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..0b1cf061daec --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/skus.ts @@ -0,0 +1,283 @@ +/* + * 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 { 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: () => { + return this.listByOfferPagingPage( + resourceGroupName, + clusterName, + publisherName, + offerName, + options + ); + } + }; + } + + private async *listByOfferPagingPage( + resourceGroupName: string, + clusterName: string, + publisherName: string, + offerName: string, + options?: SkusListByOfferOptionalParams + ): AsyncIterableIterator { + let result = await this._listByOffer( + resourceGroupName, + clusterName, + publisherName, + offerName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByOfferNext( + resourceGroupName, + clusterName, + publisherName, + offerName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + } + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + 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..52ddef7bc0e5 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/updateRuns.ts @@ -0,0 +1,251 @@ +/* + * 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 { 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 { + UpdateRun, + UpdateRunsListNextOptionalParams, + UpdateRunsListOptionalParams, + UpdateRunsListResponse, + 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: () => { + return this.listPagingPage( + resourceGroupName, + clusterName, + updateName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + updateName: string, + options?: UpdateRunsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + clusterName, + updateName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + updateName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + ); + } + + /** + * 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 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 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 + } + }, + queryParameters: [Parameters.apiVersion], + 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..f8f08406103e --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/updateSummariesOperations.ts @@ -0,0 +1,219 @@ +/* + * 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 { 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 { + UpdateSummaries, + UpdateSummariesListNextOptionalParams, + UpdateSummariesListOptionalParams, + UpdateSummariesListResponse, + 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: () => { + return this.listPagingPage(resourceGroupName, clusterName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + options?: UpdateSummariesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, clusterName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + ); + } + + /** + * 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 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 + } + }, + queryParameters: [Parameters.apiVersion], + 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..d6a9b516e1c8 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operations/updates.ts @@ -0,0 +1,336 @@ +/* + * 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 { 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Update, + UpdatesListNextOptionalParams, + UpdatesListOptionalParams, + UpdatesPostOptionalParams, + UpdatesListResponse, + 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: () => { + return this.listPagingPage(resourceGroupName, clusterName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterName: string, + options?: UpdatesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, clusterName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, clusterName, updateName, options }, + postOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + 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 + ); + } + + /** + * 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 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 + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts index 572953e118c3..656f8a68f6d0 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/clusters.ts @@ -23,7 +23,10 @@ import { UploadCertificateRequest, ClustersUploadCertificateOptionalParams, ClustersCreateIdentityOptionalParams, - ClustersCreateIdentityResponse + ClustersCreateIdentityResponse, + SoftwareAssuranceChangeRequest, + ClustersExtendSoftwareAssuranceBenefitOptionalParams, + ClustersExtendSoftwareAssuranceBenefitResponse } from "../models"; /// @@ -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< + PollerLike< + PollOperationState, + 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/index.ts b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts index 2d20c6edaf47..f11093a1a647 100644 --- a/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/index.ts @@ -10,3 +10,9 @@ export * from "./arcSettings"; export * from "./clusters"; export * from "./extensions"; export * from "./operations"; +export * from "./offers"; +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..b6b408df00b4 --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateRuns.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + UpdateRun, + UpdateRunsListOptionalParams, + 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; + /** + * 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 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..641ec8a15b7e --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updateSummariesOperations.ts @@ -0,0 +1,42 @@ +/* + * 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 { + UpdateSummaries, + UpdateSummariesListOptionalParams, + 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; + /** + * 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..c6db4c7a604d --- /dev/null +++ b/sdk/azurestackhci/arm-azurestackhci/src/operationsInterfaces/updates.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Update, + UpdatesListOptionalParams, + UpdatesPostOptionalParams, + 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; + /** + * 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/test/sampleTest.ts b/sdk/azurestackhci/arm-azurestackhci/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/azurestackhci/arm-azurestackhci/test/sampleTest.ts +++ b/sdk/azurestackhci/arm-azurestackhci/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { 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"