diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 8aee79f5130d..c11b640d765c 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.20221001 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.20221001: + resolution: {integrity: sha512-FpEHIJz2YHKbWgSmEsR6sZaFSEf+f3r89oGl8L+Elfin97XC/gPZllSUkUrc2N53SiMb0RS/U/QXbimMAXSJCQ==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -12586,18 +12586,20 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-UPduExgg6zWJkD190J5/q6ZDD6FchTbCb/PvCl84AnwXW3X+FpiJmYvC9THZ1spLLrlAhF1uOh2PVlzHOojy3Q==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-xBz9s6xGCAdHymYpJjMumY21nPLFXW0wVO9WdUUjCakatwhKjk4/T8tMW4bh5SsGI0FZVtTFx6fazV0A5qvaVg==, tarball: file:projects/arm-hybridcompute.tgz} name: '@rush-temp/arm-hybridcompute' 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 @@ -12609,7 +12611,6 @@ packages: uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index 3fe2e75ff498..612d33da7e8c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,28 +1,48 @@ # Release History - -## 3.1.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 3.1.0-beta.1 (2022-04-26) + +## 3.1.0-beta.2 (2022-10-01) **Features** + - Added operation group ExtensionMetadata + - Added Interface AgentConfiguration + - Added Interface CloudMetadata + - Added Interface ConfigurationExtension + - Added Interface ErrorDetailAutoGenerated + - Added Interface ErrorResponseAutoGenerated + - Added Interface ExtensionMetadataGetOptionalParams + - Added Interface ExtensionMetadataListOptionalParams + - Added Interface ExtensionValue + - Added Interface ExtensionValueListResult + - Added Interface HybridComputePrivateLinkScope + - Added Interface Machine + - Added Interface MachineExtension + - Added Interface MachineExtensionUpdate + - Added Interface MachineUpdate - Added Interface OSProfileLinuxConfiguration - Added Interface OSProfileWindowsConfiguration + - Added Interface PrivateEndpointConnection - Added Interface PrivateEndpointConnectionDataModel + - Added Interface PrivateLinkResource + - Added Interface ProxyResource + - Added Interface ServiceStatus + - Added Interface ServiceStatuses + - Added Interface TrackedResource + - Added Type Alias AgentConfigurationMode + - Added Type Alias AssessmentModeTypes + - Added Type Alias ExtensionMetadataGetResponse + - Added Type Alias ExtensionMetadataListResponse + - Added Type Alias PatchModeTypes - Interface HybridComputePrivateLinkScopeProperties has a new optional parameter privateEndpointConnections - - Interface MachineProperties has a new optional parameter mssqlDiscovered - - Interface MachineProperties has a new optional parameter osType - - Interface MachineUpdateProperties has a new optional parameter osProfile + - Interface OperationValue has a new optional parameter isDataAction - Interface OSProfile has a new optional parameter linuxConfiguration - Interface OSProfile has a new optional parameter windowsConfiguration + - Interface PrivateEndpointConnectionProperties has a new optional parameter groupIds + - Interface Resource has a new optional parameter systemData + - Class HybridComputeManagementClient has a new parameter extensionMetadata + - Added Enum KnownAgentConfigurationMode + - Added Enum KnownAssessmentModeTypes + - Added Enum KnownPatchModeTypes ## 3.0.0 (2022-01-18) diff --git a/sdk/hybridcompute/arm-hybridcompute/README.md b/sdk/hybridcompute/arm-hybridcompute/README.md index 9ed36d6bf2c2..3d9e7820f32b 100644 --- a/sdk/hybridcompute/arm-hybridcompute/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/README.md @@ -13,7 +13,7 @@ The Hybrid Compute Management Client. ### 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/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json index cfd9a4374eb7..d92da1d1a161 100644 --- a/sdk/hybridcompute/arm-hybridcompute/_meta.json +++ b/sdk/hybridcompute/arm-hybridcompute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a", - "readme": "specification\\hybridcompute\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.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\\hybridcompute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "1cd8dc2ea8c3fbf800fba40432777f4eb419b052", + "readme": "specification/hybridcompute/resource-manager/readme.md", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "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/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 304d0420840d..030ffd4af93e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-hybridcompute.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/hybridcompute/arm-hybridcompute", "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-hybridcompute?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md index 30309689f8a0..4a12a0b7a0df 100644 --- a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -10,6 +10,35 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export interface AgentConfiguration { + readonly configMode?: AgentConfigurationMode; + readonly extensionsAllowList?: ConfigurationExtension[]; + readonly extensionsBlockList?: ConfigurationExtension[]; + readonly extensionsEnabled?: string; + readonly guestConfigurationEnabled?: string; + readonly incomingConnectionsPorts?: string[]; + readonly proxyBypass?: string[]; + readonly proxyUrl?: string; +} + +// @public +export type AgentConfigurationMode = string; + +// @public +export type AssessmentModeTypes = string; + +// @public +export interface CloudMetadata { + readonly provider?: string; +} + +// @public +export interface ConfigurationExtension { + readonly publisher?: string; + readonly type?: string; +} + // @public (undocumented) export interface ConnectionDetail { readonly groupId?: string; @@ -37,16 +66,62 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + +// @public +export interface ExtensionMetadata { + get(location: string, publisher: string, extensionType: string, version: string, options?: ExtensionMetadataGetOptionalParams): Promise; + list(location: string, publisher: string, extensionType: string, options?: ExtensionMetadataListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExtensionMetadataGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionMetadataGetResponse = ExtensionValue; + +// @public +export interface ExtensionMetadataListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionMetadataListResponse = ExtensionValueListResult; + // @public export interface ExtensionTargetProperties { targetVersion?: string; } +// @public +export interface ExtensionValue extends ProxyResource { + readonly extensionType?: string; + readonly publisher?: string; + readonly version?: string; +} + +// @public +export interface ExtensionValueListResult { + readonly value?: ExtensionValue[]; +} + // @public (undocumented) export class HybridComputeManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -57,6 +132,8 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise, void>>; beginUpgradeExtensionsAndWait(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise; // (undocumented) + extensionMetadata: ExtensionMetadata; + // (undocumented) machineExtensions: MachineExtensions; // (undocumented) machines: Machines; @@ -80,10 +157,10 @@ export interface HybridComputeManagementClientOptionalParams extends coreClient. } // @public -export type HybridComputePrivateLinkScope = PrivateLinkScopesResource & { +export interface HybridComputePrivateLinkScope extends PrivateLinkScopesResource { properties?: HybridComputePrivateLinkScopeProperties; readonly systemData?: SystemData; -}; +} // @public export interface HybridComputePrivateLinkScopeListResult { @@ -109,24 +186,39 @@ export interface Identity { // @public export type InstanceViewTypes = string; +// @public +export enum KnownAgentConfigurationMode { + Full = "full", + Monitor = "monitor" +} + +// @public +export enum KnownAssessmentModeTypes { + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault" +} + // @public export enum KnownCreatedByType { - // (undocumented) Application = "Application", - // (undocumented) Key = "Key", - // (undocumented) ManagedIdentity = "ManagedIdentity", - // (undocumented) User = "User" } // @public export enum KnownInstanceViewTypes { - // (undocumented) InstanceView = "instanceView" } +// @public +export enum KnownPatchModeTypes { + AutomaticByOS = "AutomaticByOS", + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault", + Manual = "Manual" +} + // @public export enum KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -135,21 +227,15 @@ export enum KnownPublicNetworkAccessType { // @public export enum KnownStatusLevelTypes { - // (undocumented) Error = "Error", - // (undocumented) Info = "Info", - // (undocumented) Warning = "Warning" } // @public export enum KnownStatusTypes { - // (undocumented) Connected = "Connected", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Error = "Error" } @@ -162,17 +248,56 @@ export interface LocationData { } // @public -export type Machine = TrackedResource & { - properties?: MachineProperties; +export interface Machine extends TrackedResource { + readonly adFqdn?: string; + readonly agentConfiguration?: AgentConfiguration; + readonly agentVersion?: string; + clientPublicKey?: string; + cloudMetadata?: CloudMetadata; + readonly detectedProperties?: { + [propertyName: string]: string; + }; + readonly displayName?: string; + readonly dnsFqdn?: string; + readonly domainName?: string; + readonly errorDetails?: ErrorDetail[]; identity?: Identity; - readonly systemData?: SystemData; -}; + readonly lastStatusChange?: Date; + locationData?: LocationData; + readonly machineFqdn?: string; + mssqlDiscovered?: string; + readonly osName?: string; + osProfile?: OSProfile; + readonly osSku?: string; + osType?: string; + readonly osVersion?: string; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; + readonly provisioningState?: string; + readonly resources?: MachineExtension[]; + serviceStatuses?: ServiceStatuses; + readonly status?: StatusTypes; + vmId?: string; + readonly vmUuid?: string; +} // @public -export type MachineExtension = TrackedResource & { - properties?: MachineExtensionProperties; - readonly systemData?: SystemData; -}; +export interface MachineExtension extends TrackedResource { + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + forceUpdateTag?: string; + instanceView?: MachineExtensionInstanceView; + protectedSettings?: { + [propertyName: string]: any; + }; + readonly provisioningState?: string; + publisher?: string; + settings?: { + [propertyName: string]: any; + }; + typeHandlerVersion?: string; + typePropertiesType?: string; +} // @public export interface MachineExtensionInstanceView { @@ -191,19 +316,6 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -// @public -export interface MachineExtensionProperties { - autoUpgradeMinorVersion?: boolean; - forceUpdateTag?: string; - instanceView?: MachineExtensionInstanceView; - protectedSettings?: Record; - readonly provisioningState?: string; - publisher?: string; - settings?: Record; - type?: string; - typeHandlerVersion?: string; -} - // @public export interface MachineExtensions { beginCreateOrUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; @@ -270,17 +382,17 @@ export interface MachineExtensionsUpdateOptionalParams extends coreClient.Operat export type MachineExtensionsUpdateResponse = MachineExtension; // @public -export type MachineExtensionUpdate = ResourceUpdate & { - properties?: MachineExtensionUpdateProperties; -}; - -// @public -export interface MachineExtensionUpdateProperties { +export interface MachineExtensionUpdate extends ResourceUpdate { autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; - protectedSettings?: Record; + protectedSettings?: { + [propertyName: string]: any; + }; publisher?: string; - settings?: Record; + settings?: { + [propertyName: string]: any; + }; type?: string; typeHandlerVersion?: string; } @@ -298,36 +410,6 @@ export interface MachineListResult { value: Machine[]; } -// @public -export interface MachineProperties { - readonly adFqdn?: string; - readonly agentVersion?: string; - clientPublicKey?: string; - readonly detectedProperties?: { - [propertyName: string]: string; - }; - readonly displayName?: string; - readonly dnsFqdn?: string; - readonly domainName?: string; - readonly errorDetails?: ErrorDetail[]; - extensions?: MachineExtensionInstanceView[]; - readonly lastStatusChange?: Date; - locationData?: LocationData; - readonly machineFqdn?: string; - mssqlDiscovered?: string; - readonly osName?: string; - osProfile?: OSProfile; - readonly osSku?: string; - osType?: string; - readonly osVersion?: string; - parentClusterResourceId?: string; - privateLinkScopeResourceId?: string; - readonly provisioningState?: string; - readonly status?: StatusTypes; - vmId?: string; - readonly vmUuid?: string; -} - // @public export interface Machines { delete(resourceGroupName: string, machineName: string, options?: MachinesDeleteOptionalParams): Promise; @@ -377,13 +459,9 @@ export interface MachinesListBySubscriptionOptionalParams extends coreClient.Ope export type MachinesListBySubscriptionResponse = MachineListResult; // @public -export type MachineUpdate = ResourceUpdate & { +export interface MachineUpdate extends ResourceUpdate { + cloudMetadata?: CloudMetadata; identity?: Identity; - properties?: MachineUpdateProperties; -}; - -// @public -export interface MachineUpdateProperties { locationData?: LocationData; osProfile?: OSProfile; parentClusterResourceId?: string; @@ -410,6 +488,7 @@ export type OperationsListResponse = OperationListResult; // @public export interface OperationValue { display?: OperationValueDisplay; + readonly isDataAction?: boolean; readonly name?: string; readonly origin?: string; } @@ -431,19 +510,23 @@ export interface OSProfile { // @public export interface OSProfileLinuxConfiguration { - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + patchMode?: PatchModeTypes; } // @public export interface OSProfileWindowsConfiguration { - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + patchMode?: PatchModeTypes; } // @public -export type PrivateEndpointConnection = ProxyResource & { +export type PatchModeTypes = string; + +// @public +export interface PrivateEndpointConnection extends ProxyResource { properties?: PrivateEndpointConnectionProperties; - readonly systemData?: SystemData; -}; +} // @public export interface PrivateEndpointConnectionDataModel { @@ -461,6 +544,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: string; @@ -518,10 +602,9 @@ export interface PrivateEndpointProperty { } // @public -export type PrivateLinkResource = ProxyResource & { +export interface PrivateLinkResource extends ProxyResource { properties?: PrivateLinkResourceProperties; - readonly systemData?: SystemData; -}; +} // @public export interface PrivateLinkResourceListResult { @@ -671,7 +754,8 @@ export interface PrivateLinkServiceConnectionStateProperty { } // @public -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource { +} // @public export type PublicNetworkAccessType = string; @@ -680,6 +764,7 @@ export type PublicNetworkAccessType = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -690,6 +775,18 @@ export interface ResourceUpdate { }; } +// @public +export interface ServiceStatus { + startupType?: string; + status?: string; +} + +// @public +export interface ServiceStatuses { + extensionService?: ServiceStatus; + guestConfigurationService?: ServiceStatus; +} + // @public export type StatusLevelTypes = string; @@ -714,12 +811,12 @@ export interface TagsResource { } // @public -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { + location: string; tags?: { [propertyName: string]: string; }; - location: string; -}; +} // @public export interface UpgradeExtensionsOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index 0b0fbb7ceec0..9e46d1ddaf7e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -8,12 +8,18 @@ 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "./lroImpl"; import { MachinesImpl, MachineExtensionsImpl, + ExtensionMetadataImpl, OperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, @@ -22,6 +28,7 @@ import { import { Machines, MachineExtensions, + ExtensionMetadata, Operations, PrivateLinkScopes, PrivateLinkResources, @@ -114,13 +121,43 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-10-preview"; + this.apiVersion = options.apiVersion || "2022-08-11-preview"; this.machines = new MachinesImpl(this); this.machineExtensions = new MachineExtensionsImpl(this); + this.extensionMetadata = new ExtensionMetadataImpl(this); this.operations = new OperationsImpl(this); this.privateLinkScopes = new PrivateLinkScopesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(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); } /** @@ -212,6 +249,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { machines: Machines; machineExtensions: MachineExtensions; + extensionMetadata: ExtensionMetadata; operations: Operations; privateLinkScopes: PrivateLinkScopes; privateLinkResources: PrivateLinkResources; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index 2223e789af12..e73319353268 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -57,113 +57,99 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** Describes the properties of a hybrid machine. */ -export interface MachineProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; - /** - * The provisioning state, which only appears in the response. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The status of the hybrid machine agent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: StatusTypes; - /** - * The time of the last status change. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastStatusChange?: Date; - /** - * Details about the error state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorDetails?: ErrorDetail[]; +/** Metadata pertaining to the geographic location of the resource. */ +export interface LocationData { + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located */ + countryOrRegion?: string; +} + +/** Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. */ +export interface AgentConfiguration { /** - * The hybrid machine agent full version. + * Specifies the URL of the proxy to be used. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly agentVersion?: string; - /** Specifies the hybrid machine unique ID. */ - vmId?: string; + readonly proxyUrl?: string; /** - * Specifies the hybrid machine display name. + * Specifies the list of ports that the agent will be able to listen on. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayName?: string; + readonly incomingConnectionsPorts?: string[]; /** - * Specifies the hybrid machine FQDN. + * Array of extensions that are allowed to be installed or updated. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly machineFqdn?: string; - /** Public Key that the client provides to be used during initial resource onboarding */ - clientPublicKey?: string; + readonly extensionsAllowList?: ConfigurationExtension[]; /** - * The Operating System running on the hybrid machine. + * Array of extensions that are blocked (cannot be installed or updated) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly extensionsBlockList?: ConfigurationExtension[]; /** - * The version of Operating System running on the hybrid machine. + * List of service names which should not use the specified proxy server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osVersion?: string; - /** The type of Operating System (windows/linux). */ - osType?: string; + readonly proxyBypass?: string[]; /** - * Specifies the Arc Machine's unique SMBIOS ID + * Specifies whether the extension service is enabled or disabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmUuid?: string; - /** Machine Extensions information */ - extensions?: MachineExtensionInstanceView[]; + readonly extensionsEnabled?: string; /** - * Specifies the Operating System product SKU. + * Specified whether the guest configuration service is enabled or disabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osSku?: string; + readonly guestConfigurationEnabled?: string; /** - * Specifies the Windows domain name. + * Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists and guest configuration, maintained by Microsoft. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly domainName?: string; + readonly configMode?: AgentConfigurationMode; +} + +/** Describes properties that can identify extensions. */ +export interface ConfigurationExtension { /** - * Specifies the AD fully qualified display name. + * Publisher of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly adFqdn?: string; + readonly publisher?: string; /** - * Specifies the DNS fully qualified display name. + * Type of the extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsFqdn?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** Specifies whether any MS SQL instance is discovered on the machine. */ - mssqlDiscovered?: string; + readonly type?: string; +} + +/** Reports the state and behavior of dependent services. */ +export interface ServiceStatuses { + /** The state of the extension service on the Arc-enabled machine. */ + extensionService?: ServiceStatus; + /** The state of the guest configuration service on the Arc-enabled machine. */ + guestConfigurationService?: ServiceStatus; +} + +/** Describes the status and behavior of a service. */ +export interface ServiceStatus { + /** The current status of the service. */ + status?: string; + /** The behavior of the service when the Arc-enabled machine starts up. */ + startupType?: string; +} + +/** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ +export interface CloudMetadata { /** - * Detected properties from the machine. + * Specifies the cloud provider (Azure/AWS/GCP...). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly detectedProperties?: { [propertyName: string]: string }; -} - -/** Metadata pertaining to the geographic location of the resource. */ -export interface LocationData { - /** A canonical name for the geographic or physical location. */ - name: string; - /** The city or locality where the resource is located. */ - city?: string; - /** The district, state, or province where the resource is located. */ - district?: string; - /** The country or region where the resource is located */ - countryOrRegion?: string; + readonly provider?: string; } /** Specifies the operating system settings for the hybrid machine. */ @@ -182,13 +168,17 @@ export interface OSProfile { /** Specifies the windows configuration for update management. */ export interface OSProfileWindowsConfiguration { /** Specifies the assessment mode. */ - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + /** Specifies the patch mode. */ + patchMode?: PatchModeTypes; } /** Specifies the linux configuration for update management. */ export interface OSProfileLinuxConfiguration { /** Specifies the assessment mode. */ - assessmentMode?: string; + assessmentMode?: AssessmentModeTypes; + /** Specifies the patch mode. */ + patchMode?: PatchModeTypes; } /** Describes the Machine Extension Instance View. */ @@ -217,20 +207,28 @@ export interface MachineExtensionInstanceViewStatus { time?: Date; } -/** Identity for the resource. */ -export interface Identity { +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The principal ID of resource identity. + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly id?: string; /** - * The tenant ID of resource. + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** The identity type. */ - type?: "SystemAssigned"; + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; } /** Metadata pertaining to creation and last modification of the resource. */ @@ -249,23 +247,20 @@ export interface SystemData { lastModifiedAt?: Date; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; +/** Identity for the resource. */ +export interface Identity { /** - * The name of the resource + * The principal ID of resource identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly principalId?: string; /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * The tenant ID of resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; } /** The List hybrid machine operation response. */ @@ -276,49 +271,6 @@ export interface MachineListResult { nextLink?: string; } -/** Describes the properties of a Machine Extension. */ -export interface MachineExtensionProperties { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; - /** - * The provisioning state, which only appears in the response. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The machine extension instance view. */ - instanceView?: MachineExtensionInstanceView; -} - -/** Describes the properties of a Machine Extension. */ -export interface MachineExtensionUpdateProperties { - /** How the extension handler should be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** The name of the extension handler publisher. */ - publisher?: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type?: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion?: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; -} - /** The Update Resource model definition. */ export interface ResourceUpdate { /** Resource tags */ @@ -345,6 +297,50 @@ export interface ExtensionTargetProperties { targetVersion?: string; } +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The List Extension Metadata response. */ +export interface ExtensionValueListResult { + /** + * The list of extension metadata + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ExtensionValue[]; +} + /** The List Compute Operation operation response. */ export interface OperationListResult { /** @@ -368,6 +364,11 @@ export interface OperationValue { readonly name?: string; /** Display properties */ display?: OperationValueDisplay; + /** + * This property indicates if the operation is an action or a data action + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; } /** Describes the properties of a Hybrid Compute Operation Value Display. */ @@ -455,6 +456,11 @@ export interface PrivateEndpointConnectionProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; + /** + * List of group IDs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; } /** Private endpoint which the connection belongs to. */ @@ -592,45 +598,56 @@ export interface ConnectionDetail { readonly memberName?: string; } -/** Describes the ARM updatable properties of a hybrid machine. */ -export interface MachineUpdateProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; -} - /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; -}; +} /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource {} /** Describes a Machine Extension Update. */ -export type MachineExtensionUpdate = ResourceUpdate & { - /** Describes Machine Extension Update Properties. */ - properties?: MachineExtensionUpdateProperties; -}; +export interface MachineExtensionUpdate extends ResourceUpdate { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; +} /** Describes a hybrid machine Update. */ -export type MachineUpdate = ResourceUpdate & { +export interface MachineUpdate extends ResourceUpdate { /** Identity for the resource. */ identity?: Identity; - /** Hybrid Compute Machine properties */ - properties?: MachineUpdateProperties; -}; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; + /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ + cloudMetadata?: CloudMetadata; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; +} /** An Azure Arc PrivateLinkScope definition. */ -export type HybridComputePrivateLinkScope = PrivateLinkScopesResource & { +export interface HybridComputePrivateLinkScope + extends PrivateLinkScopesResource { /** Properties that define a Azure Arc PrivateLinkScope resource. */ properties?: HybridComputePrivateLinkScopeProperties; /** @@ -638,56 +655,180 @@ export type HybridComputePrivateLinkScope = PrivateLinkScopesResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; -}; +} + +/** Describes a Machine Extension. */ +export interface MachineExtension extends TrackedResource { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The machine extension instance view. */ + instanceView?: MachineExtensionInstanceView; +} /** Describes a hybrid machine. */ -export type Machine = TrackedResource & { - /** Hybrid Compute Machine properties */ - properties?: MachineProperties; +export interface Machine extends TrackedResource { + /** + * The list of extensions affiliated to the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resources?: MachineExtension[]; /** Identity for the resource. */ identity?: Identity; + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; /** - * The system meta data relating to this resource. + * Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; -}; + readonly agentConfiguration?: AgentConfiguration; + /** Statuses of dependent services that are reported back to ARM. */ + serviceStatuses?: ServiceStatuses; + /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ + cloudMetadata?: CloudMetadata; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The status of the hybrid machine agent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: StatusTypes; + /** + * The time of the last status change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastStatusChange?: Date; + /** + * Details about the error state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorDetails?: ErrorDetail[]; + /** + * The hybrid machine agent full version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly agentVersion?: string; + /** Specifies the hybrid machine unique ID. */ + vmId?: string; + /** + * Specifies the hybrid machine display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** + * Specifies the hybrid machine FQDN. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly machineFqdn?: string; + /** Public Key that the client provides to be used during initial resource onboarding */ + clientPublicKey?: string; + /** + * The Operating System running on the hybrid machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osName?: string; + /** + * The version of Operating System running on the hybrid machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osVersion?: string; + /** The type of Operating System (windows/linux). */ + osType?: string; + /** + * Specifies the Arc Machine's unique SMBIOS ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmUuid?: string; + /** + * Specifies the Operating System product SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osSku?: string; + /** + * Specifies the Windows domain name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly domainName?: string; + /** + * Specifies the AD fully qualified display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly adFqdn?: string; + /** + * Specifies the DNS fully qualified display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dnsFqdn?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** Specifies whether any MS SQL instance is discovered on the machine. */ + mssqlDiscovered?: string; + /** + * Detected properties from the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly detectedProperties?: { [propertyName: string]: string }; +} -/** Describes a Machine Extension. */ -export type MachineExtension = TrackedResource & { - /** Describes Machine Extension Properties. */ - properties?: MachineExtensionProperties; +/** Describes a Extension Metadata */ +export interface ExtensionValue extends ProxyResource { /** - * The system meta data relating to this resource. + * The version of the Extension being received. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; -}; + readonly version?: string; + /** + * The type of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly extensionType?: string; + /** + * The publisher of the Extension being received. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publisher?: string; +} /** A private link resource */ -export type PrivateLinkResource = ProxyResource & { +export interface PrivateLinkResource extends ProxyResource { /** Resource properties. */ properties?: PrivateLinkResourceProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -}; +} /** A private endpoint connection */ -export type PrivateEndpointConnection = ProxyResource & { +export interface PrivateEndpointConnection extends ProxyResource { /** Resource properties. */ properties?: PrivateEndpointConnectionProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -}; +} /** Known values of {@link InstanceViewTypes} that the service accepts. */ export enum KnownInstanceViewTypes { + /** InstanceView */ InstanceView = "instanceView" } @@ -700,10 +841,73 @@ export enum KnownInstanceViewTypes { */ export type InstanceViewTypes = string; +/** Known values of {@link AgentConfigurationMode} that the service accepts. */ +export enum KnownAgentConfigurationMode { + /** Full */ + Full = "full", + /** Monitor */ + Monitor = "monitor" +} + +/** + * Defines values for AgentConfigurationMode. \ + * {@link KnownAgentConfigurationMode} can be used interchangeably with AgentConfigurationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **full** \ + * **monitor** + */ +export type AgentConfigurationMode = string; + +/** Known values of {@link AssessmentModeTypes} that the service accepts. */ +export enum KnownAssessmentModeTypes { + /** ImageDefault */ + ImageDefault = "ImageDefault", + /** AutomaticByPlatform */ + AutomaticByPlatform = "AutomaticByPlatform" +} + +/** + * Defines values for AssessmentModeTypes. \ + * {@link KnownAssessmentModeTypes} can be used interchangeably with AssessmentModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** + */ +export type AssessmentModeTypes = string; + +/** Known values of {@link PatchModeTypes} that the service accepts. */ +export enum KnownPatchModeTypes { + /** ImageDefault */ + ImageDefault = "ImageDefault", + /** AutomaticByPlatform */ + AutomaticByPlatform = "AutomaticByPlatform", + /** AutomaticByOS */ + AutomaticByOS = "AutomaticByOS", + /** Manual */ + Manual = "Manual" +} + +/** + * Defines values for PatchModeTypes. \ + * {@link KnownPatchModeTypes} can be used interchangeably with PatchModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** \ + * **AutomaticByOS** \ + * **Manual** + */ +export type PatchModeTypes = string; + /** Known values of {@link StatusTypes} that the service accepts. */ export enum KnownStatusTypes { + /** Connected */ Connected = "Connected", + /** Disconnected */ Disconnected = "Disconnected", + /** Error */ Error = "Error" } @@ -720,8 +924,11 @@ export type StatusTypes = string; /** Known values of {@link StatusLevelTypes} that the service accepts. */ export enum KnownStatusLevelTypes { + /** Info */ Info = "Info", + /** Warning */ Warning = "Warning", + /** Error */ Error = "Error" } @@ -738,9 +945,13 @@ export type StatusLevelTypes = 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" } @@ -884,6 +1095,20 @@ export interface UpgradeExtensionsOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ExtensionMetadataGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExtensionMetadataGetResponse = ExtensionValue; + +/** Optional parameters. */ +export interface ExtensionMetadataListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ExtensionMetadataListResponse = ExtensionValueListResult; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts index 18083d2ef24f..e3713955b9ff 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -104,218 +104,205 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const MachineProperties: coreClient.CompositeMapper = { +export const LocationData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineProperties", + className: "LocationData", modelProperties: { - locationData: { - serializedName: "locationData", + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, type: { - name: "Composite", - className: "LocationData" + name: "String" } }, - osProfile: { - serializedName: "osProfile", + city: { + serializedName: "city", type: { - name: "Composite", - className: "OSProfile" + name: "String" } }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + district: { + serializedName: "district", type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + countryOrRegion: { + serializedName: "countryOrRegion", type: { name: "String" } - }, - lastStatusChange: { - serializedName: "lastStatusChange", + } + } + } +}; + +export const AgentConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentConfiguration", + modelProperties: { + proxyUrl: { + serializedName: "proxyUrl", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - errorDetails: { - serializedName: "errorDetails", + incomingConnectionsPorts: { + serializedName: "incomingConnectionsPorts", readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ErrorDetail" + name: "String" } } } }, - agentVersion: { - serializedName: "agentVersion", - readOnly: true, - type: { - name: "String" - } - }, - vmId: { - serializedName: "vmId", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - machineFqdn: { - serializedName: "machineFqdn", - readOnly: true, - type: { - name: "String" - } - }, - clientPublicKey: { - serializedName: "clientPublicKey", - type: { - name: "String" - } - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String" - } - }, - osVersion: { - serializedName: "osVersion", + extensionsAllowList: { + serializedName: "extensionsAllowList", readOnly: true, type: { - name: "String" - } - }, - osType: { - serializedName: "osType", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationExtension" + } + } } }, - vmUuid: { - serializedName: "vmUuid", + extensionsBlockList: { + serializedName: "extensionsBlockList", readOnly: true, - type: { - name: "String" - } - }, - extensions: { - serializedName: "extensions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtensionInstanceView" + className: "ConfigurationExtension" } } } }, - osSku: { - serializedName: "osSku", + proxyBypass: { + serializedName: "proxyBypass", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - domainName: { - serializedName: "domainName", + extensionsEnabled: { + serializedName: "extensionsEnabled", readOnly: true, type: { name: "String" } }, - adFqdn: { - serializedName: "adFqdn", + guestConfigurationEnabled: { + serializedName: "guestConfigurationEnabled", readOnly: true, type: { name: "String" } }, - dnsFqdn: { - serializedName: "dnsFqdn", + configMode: { + serializedName: "configMode", readOnly: true, type: { name: "String" } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", + } + } + } +}; + +export const ConfigurationExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationExtension", + modelProperties: { + publisher: { + serializedName: "publisher", + readOnly: true, type: { name: "String" } }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - }, - mssqlDiscovered: { - serializedName: "mssqlDiscovered", + } + } + } +}; + +export const ServiceStatuses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatuses", + modelProperties: { + extensionService: { + serializedName: "extensionService", type: { - name: "String" + name: "Composite", + className: "ServiceStatus" } }, - detectedProperties: { - serializedName: "detectedProperties", - readOnly: true, + guestConfigurationService: { + serializedName: "guestConfigurationService", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "ServiceStatus" } } } } }; -export const LocationData: coreClient.CompositeMapper = { +export const ServiceStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationData", + className: "ServiceStatus", modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - city: { - serializedName: "city", + status: { + serializedName: "status", type: { name: "String" } }, - district: { - serializedName: "district", + startupType: { + serializedName: "startupType", type: { name: "String" } - }, - countryOrRegion: { - serializedName: "countryOrRegion", + } + } + } +}; + +export const CloudMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudMetadata", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, type: { name: "String" } @@ -364,6 +351,12 @@ export const OSProfileWindowsConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -379,6 +372,12 @@ export const OSProfileLinuxConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + patchMode: { + serializedName: "patchSettings.patchMode", + type: { + name: "String" + } } } } @@ -457,32 +456,38 @@ export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { } }; -export const Identity: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Identity", + className: "Resource", modelProperties: { - principalId: { - serializedName: "principalId", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - tenantId: { - serializedName: "tenantId", + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, type: { - defaultValue: "SystemAssigned", - isConstant: true, serializedName: "type", + readOnly: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -533,28 +538,29 @@ export const SystemData: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const Identity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "Identity", modelProperties: { - id: { - serializedName: "id", + principalId: { + serializedName: "principalId", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { name: "String" } }, type: { + defaultValue: "SystemAssigned", + isConstant: true, serializedName: "type", - readOnly: true, type: { name: "String" } @@ -591,180 +597,147 @@ export const MachineListResult: coreClient.CompositeMapper = { } }; -export const MachineExtensionProperties: coreClient.CompositeMapper = { +export const ResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionProperties", + className: "ResourceUpdate", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - publisher: { - serializedName: "publisher", + } + } + } +}; + +export const MachineExtensionsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionsListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } } }, - type: { - serializedName: "type", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", - type: { - name: "String" - } - }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "protectedSettings", + } + } + } +}; + +export const MachineExtensionUpgrade: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionUpgrade", + modelProperties: { + extensionTargets: { + serializedName: "extensionTargets", type: { name: "Dictionary", - value: { type: { name: "any" } } - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - instanceView: { - serializedName: "instanceView", - type: { - name: "Composite", - className: "MachineExtensionInstanceView" + value: { + type: { name: "Composite", className: "ExtensionTargetProperties" } + } } } } } }; -export const MachineExtensionUpdateProperties: coreClient.CompositeMapper = { +export const ExtensionTargetProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdateProperties", + className: "ExtensionTargetProperties", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "publisher", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + targetVersion: { + serializedName: "targetVersion", type: { name: "String" } - }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - protectedSettings: { - serializedName: "protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } } } } }; -export const ResourceUpdate: coreClient.CompositeMapper = { +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceUpdate", + className: "ErrorResponseAutoGenerated", modelProperties: { - tags: { - serializedName: "tags", + error: { + serializedName: "error", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "ErrorDetailAutoGenerated" } } } } }; -export const MachineExtensionsListResult: coreClient.CompositeMapper = { +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionsListResult", + className: "ErrorDetailAutoGenerated", modelProperties: { - value: { - serializedName: "value", + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtension" + className: "ErrorDetailAutoGenerated" } } } }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const MachineExtensionUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineExtensionUpgrade", - modelProperties: { - extensionTargets: { - serializedName: "extensionTargets", + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ExtensionTargetProperties" } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } } } } @@ -772,15 +745,22 @@ export const MachineExtensionUpgrade: coreClient.CompositeMapper = { } }; -export const ExtensionTargetProperties: coreClient.CompositeMapper = { +export const ExtensionValueListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtensionTargetProperties", + className: "ExtensionValueListResult", modelProperties: { - targetVersion: { - serializedName: "targetVersion", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExtensionValue" + } + } } } } @@ -834,6 +814,13 @@ export const OperationValue: coreClient.CompositeMapper = { name: "Composite", className: "OperationValueDisplay" } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } } } } @@ -1009,6 +996,18 @@ export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + groupIds: { + serializedName: "groupIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1296,41 +1295,6 @@ export const ConnectionDetail: coreClient.CompositeMapper = { } }; -export const MachineUpdateProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineUpdateProperties", - modelProperties: { - locationData: { - serializedName: "locationData", - type: { - name: "Composite", - className: "LocationData" - } - }, - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "OSProfile" - } - }, - parentClusterResourceId: { - serializedName: "parentClusterResourceId", - type: { - name: "String" - } - }, - privateLinkScopeResourceId: { - serializedName: "privateLinkScopeResourceId", - type: { - name: "String" - } - } - } - } -}; - export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1371,11 +1335,54 @@ export const MachineExtensionUpdate: coreClient.CompositeMapper = { className: "MachineExtensionUpdate", modelProperties: { ...ResourceUpdate.type.modelProperties, - properties: { - serializedName: "properties", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { - name: "Composite", - className: "MachineExtensionUpdateProperties" + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", + type: { + name: "String" + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -1395,13 +1402,39 @@ export const MachineUpdate: coreClient.CompositeMapper = { className: "Identity" } }, - properties: { - serializedName: "properties", + locationData: { + serializedName: "properties.locationData", type: { name: "Composite", - className: "MachineUpdateProperties" + className: "LocationData" } - } + }, + osProfile: { + serializedName: "properties.osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + cloudMetadata: { + serializedName: "properties.cloudMetadata", + type: { + name: "Composite", + className: "CloudMetadata" + } + }, + parentClusterResourceId: { + serializedName: "properties.parentClusterResourceId", + type: { + name: "String" + } + }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" + } + } } } }; @@ -1430,17 +1463,97 @@ export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { } }; +export const MachineExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtension", + modelProperties: { + ...TrackedResource.type.modelProperties, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", + type: { + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", + type: { + name: "String" + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "MachineExtensionInstanceView" + } + } + } + } +}; + export const Machine: coreClient.CompositeMapper = { type: { name: "Composite", className: "Machine", modelProperties: { ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + resources: { + serializedName: "resources", + readOnly: true, type: { - name: "Composite", - className: "MachineProperties" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } } }, identity: { @@ -1450,35 +1563,218 @@ export const Machine: coreClient.CompositeMapper = { className: "Identity" } }, - systemData: { - serializedName: "systemData", + locationData: { + serializedName: "properties.locationData", type: { name: "Composite", - className: "SystemData" + className: "LocationData" + } + }, + agentConfiguration: { + serializedName: "properties.agentConfiguration", + type: { + name: "Composite", + className: "AgentConfiguration" + } + }, + serviceStatuses: { + serializedName: "properties.serviceStatuses", + type: { + name: "Composite", + className: "ServiceStatuses" + } + }, + cloudMetadata: { + serializedName: "properties.cloudMetadata", + type: { + name: "Composite", + className: "CloudMetadata" + } + }, + osProfile: { + serializedName: "properties.osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + lastStatusChange: { + serializedName: "properties.lastStatusChange", + readOnly: true, + type: { + name: "DateTime" + } + }, + errorDetails: { + serializedName: "properties.errorDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + agentVersion: { + serializedName: "properties.agentVersion", + readOnly: true, + type: { + name: "String" + } + }, + vmId: { + serializedName: "properties.vmId", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + readOnly: true, + type: { + name: "String" + } + }, + machineFqdn: { + serializedName: "properties.machineFqdn", + readOnly: true, + type: { + name: "String" + } + }, + clientPublicKey: { + serializedName: "properties.clientPublicKey", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", + readOnly: true, + type: { + name: "String" + } + }, + osVersion: { + serializedName: "properties.osVersion", + readOnly: true, + type: { + name: "String" + } + }, + osType: { + serializedName: "properties.osType", + type: { + name: "String" + } + }, + vmUuid: { + serializedName: "properties.vmUuid", + readOnly: true, + type: { + name: "String" + } + }, + osSku: { + serializedName: "properties.osSku", + readOnly: true, + type: { + name: "String" + } + }, + domainName: { + serializedName: "properties.domainName", + readOnly: true, + type: { + name: "String" + } + }, + adFqdn: { + serializedName: "properties.adFqdn", + readOnly: true, + type: { + name: "String" + } + }, + dnsFqdn: { + serializedName: "properties.dnsFqdn", + readOnly: true, + type: { + name: "String" + } + }, + privateLinkScopeResourceId: { + serializedName: "properties.privateLinkScopeResourceId", + type: { + name: "String" + } + }, + parentClusterResourceId: { + serializedName: "properties.parentClusterResourceId", + type: { + name: "String" + } + }, + mssqlDiscovered: { + serializedName: "properties.mssqlDiscovered", + type: { + name: "String" + } + }, + detectedProperties: { + serializedName: "properties.detectedProperties", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const MachineExtension: coreClient.CompositeMapper = { +export const ExtensionValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtension", + className: "ExtensionValue", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + ...ProxyResource.type.modelProperties, + version: { + serializedName: "properties.version", + readOnly: true, type: { - name: "Composite", - className: "MachineExtensionProperties" + name: "String" } }, - systemData: { - serializedName: "systemData", + extensionType: { + serializedName: "properties.extensionType", + readOnly: true, type: { - name: "Composite", - className: "SystemData" + name: "String" + } + }, + publisher: { + serializedName: "properties.publisher", + readOnly: true, + type: { + name: "String" } } } @@ -1497,13 +1793,6 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Composite", className: "PrivateLinkResourceProperties" } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } } } } @@ -1521,13 +1810,6 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { name: "Composite", className: "PrivateEndpointConnectionProperties" } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } } } } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 3e589fbc8dbd..7ca1ff38013c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -47,7 +47,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-10-preview", + defaultValue: "2022-08-11-preview", isConstant: true, serializedName: "api-version", type: { @@ -166,6 +166,50 @@ export const extensionUpgradeParameters: OperationParameter = { mapper: MachineExtensionUpgradeMapper }; +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const publisher: OperationURLParameter = { + parameterPath: "publisher", + mapper: { + serializedName: "publisher", + required: true, + type: { + name: "String" + } + } +}; + +export const extensionType: OperationURLParameter = { + parameterPath: "extensionType", + mapper: { + serializedName: "extensionType", + required: true, + type: { + name: "String" + } + } +}; + +export const version: OperationURLParameter = { + parameterPath: "version", + mapper: { + serializedName: "version", + required: true, + type: { + name: "String" + } + } +}; + export const scopeName: OperationURLParameter = { parameterPath: "scopeName", mapper: { @@ -187,7 +231,7 @@ export const privateLinkScopeTags: OperationParameter = { mapper: TagsResourceMapper }; -export const location: OperationURLParameter = { +export const location1: OperationURLParameter = { parameterPath: "location", mapper: { constraints: { diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts new file mode 100644 index 000000000000..0a0fed929641 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts @@ -0,0 +1,183 @@ +/* + * 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 { ExtensionMetadata } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse, + ExtensionMetadataListResponse +} from "../models"; + +/// +/** Class containing ExtensionMetadata operations. */ +export class ExtensionMetadataImpl implements ExtensionMetadata { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class ExtensionMetadata class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + public list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + location, + publisher, + extensionType, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, publisher, extensionType, options); + } + }; + } + + private async *listPagingPage( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, publisher, extensionType, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + publisher, + extensionType, + options + )) { + yield* page; + } + } + + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, version, options }, + getOperationSpec + ); + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + private _list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValue + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisher, + Parameters.extensionType, + Parameters.version + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValueListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisher, + Parameters.extensionType + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index f8024e8bc5a1..9a778e7d57fb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -8,6 +8,7 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 8a3d838d5415..a99a7b491471 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts @@ -138,7 +138,7 @@ export class MachinesImpl implements Machines { } /** - * The operation to remove a hybrid machine identity in Azure. + * The operation to delete a hybrid machine. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param options The options parameters. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts index db8980340c1e..32fc1164122a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -530,7 +530,7 @@ const getValidationDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location, + Parameters.location1, Parameters.privateLinkScopeId ], headerParameters: [Parameters.accept], diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts new file mode 100644 index 000000000000..69eff6605ed3 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a ExtensionMetadata. */ +export interface ExtensionMetadata { + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts index f8024e8bc5a1..9a778e7d57fb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -8,6 +8,7 @@ export * from "./machines"; export * from "./machineExtensions"; +export * from "./extensionMetadata"; export * from "./operations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts index 1fb8be19778a..d8a58a3756d7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts @@ -38,7 +38,7 @@ export interface Machines { options?: MachinesListBySubscriptionOptionalParams ): PagedAsyncIterableIterator; /** - * The operation to remove a hybrid machine identity in Azure. + * The operation to delete a hybrid machine. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param options The options parameters. diff --git a/sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts b/sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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/hybridcompute/arm-hybridcompute/tsconfig.json b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json index a87ba17ac142..3e6ae96443f3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json +++ b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-hybridcompute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"