From 2eba82cadf196ab2922ece95609393a916c37e6a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 29 Dec 2022 19:53:03 +0000 Subject: [PATCH] CodeGen from PR 22009 in Azure/azure-rest-api-specs Merge 9d0872827241e70e625b29a9687b8f03339ebb66 into f38115ac455af89493b0a0719d9a987404560dda --- .../arm-hybridcompute/CHANGELOG.md | 45 +- .../arm-hybridcompute/_meta.json | 10 +- .../arm-hybridcompute/package.json | 14 +- .../review/arm-hybridcompute.api.md | 234 +++-- .../src/hybridComputeManagementClient.ts | 8 +- .../arm-hybridcompute/src/models/index.ts | 566 +++++++---- .../arm-hybridcompute/src/models/mappers.ts | 962 +++++++++++------- .../src/models/parameters.ts | 48 +- .../src/operations/extensionMetadata.ts | 194 ++++ .../arm-hybridcompute/src/operations/index.ts | 1 + .../src/operations/machineExtensions.ts | 1 - .../src/operations/machines.ts | 4 +- .../operations/privateEndpointConnections.ts | 1 - .../src/operations/privateLinkResources.ts | 1 - .../src/operations/privateLinkScopes.ts | 4 +- .../operationsInterfaces/extensionMetadata.ts | 48 + .../src/operationsInterfaces/index.ts | 1 + .../src/operationsInterfaces/machines.ts | 2 +- .../arm-hybridcompute/src/pagingHelper.ts | 8 +- .../arm-hybridcompute/tsconfig.json | 10 +- 20 files changed, 1523 insertions(+), 639 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index 16c6165c364f..2b079c358a51 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,19 +1,19 @@ # Release History - -## 3.1.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 3.1.0-beta.2 (2022-11-25) + +## 4.0.0-beta.1 (2022-12-29) **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 @@ -25,13 +25,28 @@ - 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 + - Added Enum KnownAgentConfigurationMode + - Added Enum KnownAssessmentModeTypes + - Added Enum KnownPatchModeTypes + - Added function getContinuationToken + +**Breaking Changes** + + - Interface MachineExtensionsListNextOptionalParams no longer has parameter expand ## 3.0.0 (2022-01-18) diff --git a/sdk/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json index 66ea1bf1fe32..d32a7a89d156 100644 --- a/sdk/hybridcompute/arm-hybridcompute/_meta.json +++ b/sdk/hybridcompute/arm-hybridcompute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a", - "readme": "specification\\hybridcompute\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hybridcompute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "0f6ca4d361881e34e4929c745db876851963c78d", + "readme": "specification/hybridcompute/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 9945bfb8c847..b00d91ba8f96 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HybridComputeManagementClient.", - "version": "3.1.0-beta.3", + "version": "4.0.0-beta.1", "engines": { "node": ">=14.0.0" }, @@ -110,13 +110,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 0705649247f5..8e81d1a2a6a7 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 export function getContinuationToken(page: unknown): string | undefined; @@ -60,6 +135,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; @@ -112,6 +189,18 @@ 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 { Application = "Application", @@ -125,6 +214,14 @@ export enum KnownInstanceViewTypes { InstanceView = "instanceView" } +// @public +export enum KnownPatchModeTypes { + AutomaticByOS = "AutomaticByOS", + AutomaticByPlatform = "AutomaticByPlatform", + ImageDefault = "ImageDefault", + Manual = "Manual" +} + // @public export enum KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -155,15 +252,54 @@ export interface LocationData { // @public 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; - properties?: MachineProperties; - readonly systemData?: SystemData; + readonly lastStatusChange?: Date; + locationData?: LocationData; + readonly machineFqdn?: string; + mssqlDiscovered?: string; + readonly osName?: string; + osProfile?: OSProfile; + readonly osSku?: string; + osType?: string; + readonly osVersion?: string; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; + readonly provisioningState?: string; + readonly resources?: MachineExtension[]; + serviceStatuses?: ServiceStatuses; + readonly status?: StatusTypes; + vmId?: string; + readonly vmUuid?: string; } // @public export interface MachineExtension extends TrackedResource { - properties?: MachineExtensionProperties; - readonly systemData?: SystemData; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + forceUpdateTag?: string; + instanceView?: MachineExtensionInstanceView; + protectedSettings?: { + [propertyName: string]: any; + }; + readonly provisioningState?: string; + publisher?: string; + settings?: { + [propertyName: string]: any; + }; + typeHandlerVersion?: string; + typePropertiesType?: string; } // @public @@ -183,19 +319,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>>; @@ -232,7 +355,6 @@ export type MachineExtensionsGetResponse = MachineExtension; // @public export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -263,16 +385,16 @@ export type MachineExtensionsUpdateResponse = MachineExtension; // @public export interface MachineExtensionUpdate extends ResourceUpdate { - properties?: MachineExtensionUpdateProperties; -} - -// @public -export interface MachineExtensionUpdateProperties { autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; - protectedSettings?: Record; + protectedSettings?: { + [propertyName: string]: any; + }; publisher?: string; - settings?: Record; + settings?: { + [propertyName: string]: any; + }; type?: string; typeHandlerVersion?: string; } @@ -290,36 +412,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; @@ -370,12 +462,8 @@ export type MachinesListBySubscriptionResponse = MachineListResult; // @public export interface MachineUpdate extends ResourceUpdate { + cloudMetadata?: CloudMetadata; identity?: Identity; - properties?: MachineUpdateProperties; -} - -// @public -export interface MachineUpdateProperties { locationData?: LocationData; osProfile?: OSProfile; parentClusterResourceId?: string; @@ -402,6 +490,7 @@ export type OperationsListResponse = OperationListResult; // @public export interface OperationValue { display?: OperationValueDisplay; + readonly isDataAction?: boolean; readonly name?: string; readonly origin?: string; } @@ -423,18 +512,22 @@ 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 PatchModeTypes = string; + // @public export interface PrivateEndpointConnection extends ProxyResource { properties?: PrivateEndpointConnectionProperties; - readonly systemData?: SystemData; } // @public @@ -453,6 +546,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: string; @@ -512,7 +606,6 @@ export interface PrivateEndpointProperty { // @public export interface PrivateLinkResource extends ProxyResource { properties?: PrivateLinkResourceProperties; - readonly systemData?: SystemData; } // @public @@ -673,6 +766,7 @@ export type PublicNetworkAccessType = string; export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -683,6 +777,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; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index e4aba1055e13..8867168facfb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -19,6 +19,7 @@ import { LroImpl } from "./lroImpl"; import { MachinesImpl, MachineExtensionsImpl, + ExtensionMetadataImpl, OperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, @@ -27,6 +28,7 @@ import { import { Machines, MachineExtensions, + ExtensionMetadata, Operations, PrivateLinkScopes, PrivateLinkResources, @@ -72,7 +74,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-hybridcompute/3.1.0-beta.3`; + const packageDetails = `azsdk-js-arm-hybridcompute/4.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -125,9 +127,10 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-10-preview"; + this.apiVersion = options.apiVersion || "2022-12-27-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); @@ -252,6 +255,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 c8fc24124f04..e75be013f536 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,18 +598,6 @@ export interface ConnectionDetail { readonly memberName?: string; } -/** Describes the ARM updatable properties of a hybrid machine. */ -export interface MachineUpdateProperties { - /** Metadata pertaining to the geographic location of the resource. */ - locationData?: LocationData; - /** Specifies the operating system settings for the hybrid machine. */ - osProfile?: OSProfile; - /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ - parentClusterResourceId?: string; - /** The resource id of the private link scope this machine is assigned to, if any. */ - privateLinkScopeResourceId?: string; -} - /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export interface TrackedResource extends Resource { /** Resource tags. */ @@ -617,16 +611,38 @@ export interface ProxyResource extends Resource {} /** Describes a Machine Extension Update. */ export interface MachineExtensionUpdate extends ResourceUpdate { - /** Describes Machine Extension Update Properties. */ - properties?: MachineExtensionUpdateProperties; + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; } /** Describes a hybrid machine Update. */ 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. */ @@ -641,50 +657,173 @@ export interface HybridComputePrivateLinkScope readonly systemData?: SystemData; } +/** Describes a Machine Extension. */ +export interface MachineExtension extends TrackedResource { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: { [propertyName: string]: any }; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: { [propertyName: string]: any }; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The machine extension instance view. */ + instanceView?: MachineExtensionInstanceView; +} + /** Describes a hybrid machine. */ export interface Machine extends TrackedResource { - /** Hybrid Compute Machine properties */ - properties?: MachineProperties; + /** + * 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 interface MachineExtension extends 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 interface PrivateLinkResource extends ProxyResource { /** Resource properties. */ properties?: PrivateLinkResourceProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; } /** A private endpoint connection */ export interface PrivateEndpointConnection extends ProxyResource { /** Resource properties. */ properties?: PrivateEndpointConnectionProperties; - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; } /** Known values of {@link InstanceViewTypes} that the service accepts. */ @@ -702,6 +841,66 @@ 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 */ @@ -879,10 +1078,7 @@ export type MachineExtensionsListResponse = MachineExtensionsListResult; /** Optional parameters. */ export interface MachineExtensionsListNextOptionalParams - extends coreClient.OperationOptions { - /** The expand expression to apply on the operation. */ - expand?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type MachineExtensionsListNextResponse = MachineExtensionsListResult; @@ -896,6 +1092,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..1873ed09924f 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-12-27-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..0ece59bd8dcd --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/extensionMetadata.ts @@ -0,0 +1,194 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ExtensionMetadata } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataListResponse, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse +} from "../models"; + +/// +/** Class containing ExtensionMetadata operations. */ +export class ExtensionMetadataImpl implements ExtensionMetadata { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class ExtensionMetadata class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + public list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + location, + publisher, + extensionType, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + location, + publisher, + extensionType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: ExtensionMetadataListResponse; + result = await this._list(location, publisher, extensionType, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + publisher, + extensionType, + options + )) { + yield* page; + } + } + + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, version, options }, + getOperationSpec + ); + } + + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + private _list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, publisher, extensionType, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionValue + }, + default: { + bodyMapper: Mappers.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/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index eebebbcb00e7..70223fdd9d26 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts @@ -619,7 +619,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 59d68ce49514..d67d6d77e0f5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts @@ -167,7 +167,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. @@ -357,7 +357,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -378,7 +377,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts index 77a4bc75fb63..1fe933fe8567 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -488,7 +488,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts index c58e1dc77baa..762e9cb1b6d2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts @@ -234,7 +234,6 @@ const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts index 8c7b8cc9f9b1..48a98aca62c7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -559,7 +559,7 @@ const getValidationDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location, + Parameters.location1, Parameters.privateLinkScopeId ], headerParameters: [Parameters.accept], @@ -598,7 +598,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -618,7 +617,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts new file mode 100644 index 000000000000..69eff6605ed3 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/extensionMetadata.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ExtensionValue, + ExtensionMetadataListOptionalParams, + ExtensionMetadataGetOptionalParams, + ExtensionMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a ExtensionMetadata. */ +export interface ExtensionMetadata { + /** + * Gets all Extension versions based on location, publisher, extensionType + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param options The options parameters. + */ + list( + location: string, + publisher: string, + extensionType: string, + options?: ExtensionMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an Extension Metadata based on location, publisher, extensionType and version + * @param location The location of the Extension being received. + * @param publisher The publisher of the Extension being received. + * @param extensionType The extensionType of the Extension being received. + * @param version The version of the Extension being received. + * @param options The options parameters. + */ + get( + location: string, + publisher: string, + extensionType: string, + version: string, + options?: ExtensionMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts index f8024e8bc5a1..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/src/pagingHelper.ts b/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json index a87ba17ac142..3e6ae96443f3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json +++ b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-hybridcompute": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"