From 1865c40567a5d084da1d450d44470a96fb51ad52 Mon Sep 17 00:00:00 2001 From: tadelesh Date: Mon, 23 Oct 2023 19:59:53 +0800 Subject: [PATCH] update test --- .../tsp-output/models.tsp | 45 +++ .../tsp-output/AvailabilitySet.tsp | 25 ++ .../arm-compute/tsp-output/CloudService.tsp | 80 ++++ .../arm-compute/tsp-output/DedicatedHost.tsp | 6 + .../arm-compute/tsp-output/DiskAccess.tsp | 26 ++ .../tsp-output/DiskEncryptionSet.tsp | 2 + .../arm-compute/tsp-output/RoleInstance.tsp | 60 +++ .../arm-compute/tsp-output/VirtualMachine.tsp | 48 +++ .../tsp-output/VirtualMachineScaleSet.tsp | 71 ++++ .../tsp-output/VirtualMachineScaleSetVm.tsp | 26 ++ .../test/arm-compute/tsp-output/models.tsp | 358 +++++++++++++++++- .../test/arm-compute/tsp-output/routes.tsp | 4 +- .../tsp-output/models.tsp | 42 ++ .../test/arm-sphere/tsp-output/models.tsp | 30 ++ .../test/arm-test/tsp-output/models.tsp | 12 + 15 files changed, 820 insertions(+), 15 deletions(-) diff --git a/packages/extensions/openapi-to-cadl/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-azureintegrationspaces/tsp-output/models.tsp index e143c1fc73..e3fa6dba78 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -46,6 +46,12 @@ model SpaceResourceProperties { description?: string; } +@doc("The updatable properties of the Space.") +model SpaceUpdateProperties { + @doc("The description of the resource.") + description?: string; +} + @doc("The properties of application.") model ApplicationProperties { @doc("The status of the last operation.") @@ -74,6 +80,15 @@ model TrackingDataStore { dataStoreIngestionUri: string; } +@doc("The updatable properties of the Application.") +model ApplicationUpdateProperties { + @doc("The description of the resource.") + description?: string; + + @doc("The tracking data stores.") + trackingDataStores?: Record; +} + @doc("The properties of business process.") model BusinessProcessProperties { @doc("The status of the last operation.") @@ -142,6 +157,27 @@ model BusinessProcessMappingItem { operationType?: string; } +@doc("The updatable properties of the BusinessProcess.") +model BusinessProcessUpdateProperties { + @doc("The description of the business process.") + description?: string; + + @doc("The table name of the business process.") + tableName?: string; + + @doc("The tracking data store reference name.") + trackingDataStoreReferenceName?: string; + + @doc("The business process identifier.") + identifier?: BusinessProcessIdentifier; + + @doc("The business process stages.") + businessProcessStages?: Record; + + @doc("The business process mapping.") + businessProcessMapping?: Record; +} + @doc("The business process development artifact get or delete request.") model GetOrDeleteBusinessProcessDevelopmentArtifactRequest { @doc("The name of the business process development artifact.") @@ -315,3 +351,12 @@ model InfrastructureResourceProperties { @doc("The id of the infrastructure resource.") resourceId: string; } + +@doc("The updatable properties of the InfrastructureResource.") +model InfrastructureResourceUpdateProperties { + @doc("The type of the infrastructure resource.") + resourceType?: string; + + @doc("The id of the infrastructure resource.") + resourceId?: string; +} diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/AvailabilitySet.tsp index 2a3190dc19..e6f327e38f 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -43,4 +43,29 @@ interface AvailabilitySets { list is ArmResourceListByParent; @doc("Lists all availability sets in a subscription.") listBySubscription is ArmListBySubscription; + @doc(""" +Lists all available virtual machine sizes that can be used to create a new +virtual machine in an existing availability set. +""") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") + @get + ListAvailableSizes is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the availability set.") + @path + availabilitySetName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/CloudService.tsp index e30c0725ed..c800a97182 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/CloudService.tsp @@ -69,4 +69,84 @@ Role Instances. rebuild is ArmResourceActionAsync; @doc("Deletes role instances in a cloud service.") deleteInstances is ArmResourceActionAsync; + @doc("Gets the status of a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + CloudServiceInstanceView + >; + + @doc(""" +Gets the specified update domain of a cloud service. Use nextLink property in +the response to get the next page of update domains. Do this till nextLink is +null to fetch all the update domains. +""") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}") + @get + GetUpdateDomain is Azure.Core.Foundations.Operation< + { + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc(""" +Specifies an integer value that identifies the update domain. Update domains +are identified with a zero-based index: the first update domain has an ID of 0, +the second has an ID of 1, and so on. +""") + @path + updateDomain: int32; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + UpdateDomain + >; + + @doc("Gets a list of all update domains in a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains") + @get + ListUpdateDomains is Azure.Core.Foundations.Operation< + { + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + UpdateDomainListResult + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DedicatedHost.tsp index cc270ba9e4..5a60e263c5 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -45,4 +45,10 @@ https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. """) restart is ArmResourceActionAsync; + @doc(""" +Lists all available dedicated host sizes to which the specified dedicated host +can be resized. NOTE: The dedicated host sizes provided can be used to only +scale up the existing dedicated host. +""") + ListAvailableSizes is Azure.Core.ResourceList; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskAccess.tsp index bbe84de0e7..a2a3a5185b 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskAccess.tsp @@ -36,4 +36,30 @@ interface DiskAccesses { listByResourceGroup is ArmResourceListByParent; @doc("Lists all the disk access resources under a subscription.") list is ArmListBySubscription; + @doc("Gets the private link resources possible under disk access resource") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources") + @get + GetPrivateLinkResources is Azure.Core.Foundations.Operation< + { + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc(""" +The name of the disk access resource that is being created. The name can't be +changed after the disk encryption set is created. Supported characters for the +name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. +""") + @path + diskAccessName: string; + }, + PrivateLinkResourceListResult + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index ed09689fab..c39ad17ca6 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -39,4 +39,6 @@ interface DiskEncryptionSets { listByResourceGroup is ArmResourceListByParent; @doc("Lists all the disk encryption sets under a subscription.") list is ArmListBySubscription; + @doc("Lists all resources that are encrypted with this disk encryption set.") + ListAssociatedResources is Azure.Core.ResourceList; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/RoleInstance.tsp index 2f8f87aa2e..77c7cf8059 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/RoleInstance.tsp @@ -62,4 +62,64 @@ resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. """) rebuild is ArmResourceActionAsync; + @doc(""" +Retrieves information about the run-time state of a role instance in a cloud +service. +""") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("Name of the role instance.") + @path + roleInstanceName: string; + + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + RoleInstanceInstanceView + >; + + @doc("Gets a remote desktop file for a role instance in a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile") + @get + GetRemoteDesktopFile is Azure.Core.Foundations.Operation< + { + @doc("Name of the role instance.") + @path + roleInstanceName: string; + + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + + @doc("Accept header") + @header + accept: "application/x-rdp"; + }, + void + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachine.tsp index e04eccd7cc..ce1bc1f28e 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -192,4 +192,52 @@ expiration duration of 120 minutes. RunCommandInput, RunCommandResult >; + @doc("Retrieves information about the run-time state of a virtual machine.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") + @get + InstanceView is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the virtual machine.") + @path + vmName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineInstanceView + >; + + @doc(""" +Lists all available virtual machine sizes to which the specified virtual +machine can be resized. +""") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") + @get + ListAvailableSizes is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the virtual machine.") + @path + vmName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 2e97e320ad..99e2361b81 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -226,4 +226,75 @@ already running the latest extension versions are not affected. {}, {} >; + @doc("Gets the status of a VM scale set instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetInstanceView + >; + + @doc(""" +Gets a list of SKUs available for your VM scale set, including the minimum and +maximum VM instances allowed for each SKU. +""") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") + @get + ListSkus is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetListSkusResult + >; + + @doc("Gets list of OS upgrades on a VM scale set instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") + @get + GetOSUpgradeHistory is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetListOSUpgradeHistory + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSetVm.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSetVm.tsp index 3a052f2538..8ac8df244a 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSetVm.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/VirtualMachineScaleSetVm.tsp @@ -149,4 +149,30 @@ set. RunCommandInput, RunCommandResult >; + @doc("Gets the status of a virtual machine from a VM scale set.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc(""" +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. +""") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetVMInstanceView + >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp index cda192a95e..06fa5bac8f 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp @@ -3117,6 +3117,66 @@ model ExtendedLocation { type?: ExtendedLocationTypes; } +@doc("Describes the properties of a Virtual Machine Scale Set.") +model VirtualMachineScaleSetUpdateProperties { + @doc("The upgrade policy.") + upgradePolicy?: UpgradePolicy; + + @doc("Policy for automatic repairs.") + automaticRepairsPolicy?: AutomaticRepairsPolicy; + + @doc("The virtual machine profile.") + virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; + + @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") + overprovision?: boolean; + + @doc(""" +When Overprovision is enabled, extensions are launched only on the requested +number of VMs which are finally kept. This property will hence ensure that the +extensions do not run on the extra overprovisioned VMs. +""") + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + + @doc(""" +When true this limits the scale set to a single placement group, of max size +100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified +to false. However, if singlePlacementGroup is false, it may not be modified to +true. +""") + singlePlacementGroup?: boolean; + + @doc(""" +Specifies additional capabilities enabled or disabled on the Virtual Machines +in the Virtual Machine Scale Set. For instance: whether the Virtual Machines +have the capability to support attaching managed data disks with UltraSSD_LRS +storage account type. +""") + additionalCapabilities?: AdditionalCapabilities; + + @doc(""" +Specifies the policies applied when scaling in Virtual Machines in the Virtual +Machine Scale Set. +""") + scaleInPolicy?: ScaleInPolicy; + + @doc(""" +Specifies information about the proximity placement group that the virtual +machine scale set should be assigned to.

Minimum api-version: +2018-04-01. +""") + proximityPlacementGroup?: SubResource; + + @doc(""" +Specifies the desired targets for mixing Spot and Regular priority VMs within +the same VMSS Flex instance. +""") + priorityMixPolicy?: PriorityMixPolicy; + + @doc("Specifies the Spot Restore properties for the virtual machine scale set.") + spotRestorePolicy?: SpotRestorePolicy; +} + @doc("Describes a virtual machine scale set virtual machine profile.") model VirtualMachineScaleSetUpdateVMProfile { @doc("The virtual machine scale set OS profile.") @@ -3767,7 +3827,7 @@ model OrchestrationServiceStateInput { } @doc("Describes a VMSS VM Extension.") -model VirtualMachineScaleSetVMExtensionUpdate { +model VirtualMachineScaleSetVMExtension { ...SubResourceReadOnly; @doc("The name of the extension.") @@ -3778,8 +3838,102 @@ model VirtualMachineScaleSetVMExtensionUpdate { @visibility("read") type?: string; + @doc("The location of the extension.") + @visibility("read", "create") + location?: string; + @doc("Describes the properties of a Virtual Machine Extension.") - properties?: VirtualMachineExtensionUpdateProperties; + properties?: VirtualMachineExtensionProperties; +} + +@doc("Describes the properties of a Virtual Machine Extension.") +model VirtualMachineExtensionUpdateProperties { + @doc(""" +How the extension handler should be forced to update even if the extension +configuration has not changed. +""") + forceUpdateTag?: string; + + @doc("The name of the extension handler publisher.") + publisher?: string; + + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc(""" +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; + + @doc(""" +Indicates whether the extension should be automatically upgraded by the +platform if there is a newer version of the extension available. +""") + enableAutomaticUpgrade?: boolean; + + @doc("Json formatted public settings for the extension.") + settings?: Record; + + @doc(""" +The extension can contain either protectedSettings or +protectedSettingsFromKeyVault or no protected settings at all. +""") + protectedSettings?: Record; + + @doc(""" +Indicates whether failures stemming from the extension will be suppressed +(Operational failures such as not connecting to the VM will not be suppressed +regardless of this value). The default is false. +""") + suppressFailures?: boolean; + + @doc(""" +The extensions protected settings that are passed by reference, and consumed +from key vault +""") + protectedSettingsFromKeyVault?: KeyVaultSecretReference; +} + +@doc("Describes a virtual machine scale set virtual machine.") +model VirtualMachineScaleSetVM { + ...Resource; + + @doc("The virtual machine instance ID.") + @visibility("read") + instanceId?: string; + + @doc("The virtual machine SKU.") + @visibility("read") + sku?: Sku; + + @doc("Describes the properties of a virtual machine scale set virtual machine.") + properties?: VirtualMachineScaleSetVMProperties; + + @doc(""" +Specifies information about the marketplace image used to create the virtual +machine. This element is only used for marketplace images. Before you can use a +marketplace image from an API, you must enable the image for programmatic use. +In the Azure portal, find the marketplace image that you want to use and then +click **Want to deploy programmatically, Get Started ->**. Enter any required +information and then click **Save**. +""") + plan?: Plan; + + @doc("The virtual machine child extension resources.") + @visibility("read") + resources?: VirtualMachineExtension[]; + + @doc("The virtual machine zones.") + @visibility("read") + zones?: string[]; + + @doc("The identity of the virtual machine, if configured.") + identity?: VirtualMachineIdentity; } @doc("Describes the properties of a virtual machine scale set virtual machine.") @@ -5663,6 +5817,11 @@ proximity placement group. vmSizes?: string[]; } +@doc("Specifies information about the proximity placement group.") +model ProximityPlacementGroupUpdate { + ...UpdateResource; +} + @doc("Dedicated Host Group Properties.") model DedicatedHostGroupProperties { @doc("Number of fault domains that the host group can span.") @@ -5843,14 +6002,6 @@ provided upon resource creation, the provided public key needs to be at least publicKey?: string; } -@doc("Specifies information about the SSH public key.") -model SshPublicKeyUpdateResource { - ...UpdateResource; - - @doc("Properties of the SSH public key.") - properties?: SshPublicKeyResourceProperties; -} - @doc("Response from generation of an SSH key pair.") model SshPublicKeyGenerateKeyPairResult { @doc(""" @@ -6447,9 +6598,6 @@ model ThrottledRequestsInput { ...LogAnalyticsInputBase; } -@doc("The List Virtual Machine operation response.") -model RunCommandListResult is Azure.Core.Page; - @doc("Describes the properties of a Run Command metadata.") model RunCommandDocumentBase { @doc("The VM run command schema.") @@ -7122,6 +7270,118 @@ disk encrypted with customer managed key secureVMDiskEncryptionSetId?: string; } +@doc("Disk resource update properties.") +model DiskUpdateProperties { + @doc("the Operating System type.") + osType?: OperatingSystemTypes; + + @doc(""" +If creationData.createOption is Empty, this field is mandatory and it indicates +the size of the disk to create. If this field is present for updates or +creation with other options, it indicates a resize. Resizes are only allowed if +the disk is not attached to a running VM, and can only increase the disk's +size. +""") + diskSizeGB?: int32; + + @doc(""" +Encryption settings collection used be Azure Disk Encryption, can contain +multiple encryption settings per disk or snapshot. +""") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc(""" +The number of IOPS allowed for this disk; only settable for UltraSSD disks. One +operation can transfer between 4k and 256k bytes. +""") + @projectedName("json", "diskIOPSReadWrite") + diskIopsReadWrite?: int32; + + @doc(""" +The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps +means millions of bytes per second - MB here uses the ISO notation, of powers +of 10. +""") + diskMBpsReadWrite?: int32; + + @doc(""" +The total number of IOPS that will be allowed across all VMs mounting the +shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. +""") + @projectedName("json", "diskIOPSReadOnly") + diskIopsReadOnly?: int32; + + @doc(""" +The total throughput (MBps) that will be allowed across all VMs mounting the +shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses +the ISO notation, of powers of 10. +""") + diskMBpsReadOnly?: int32; + + @doc(""" +The maximum number of VMs that can attach to the disk at the same time. Value +greater than one indicates a disk that can be mounted on multiple VMs at the +same time. +""") + maxShares?: int32; + + @doc(""" +Encryption property can be used to encrypt data at rest with customer managed +keys or platform managed keys. +""") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc(""" +Performance tier of the disk (e.g, P4, S10) as described here: +https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not +apply to Ultra disks. +""") + tier?: string; + + @doc(""" +Set to true to enable bursting beyond the provisioned performance target of the +disk. Bursting is disabled by default. Does not apply to Ultra disks. +""") + burstingEnabled?: boolean; + + @doc("Purchase plan information to be added on the OS disk") + purchasePlan?: DiskPurchasePlan; + + @doc("List of supported capabilities to be added on the OS disk.") + supportedCapabilities?: SupportedCapabilities; + + @doc("Properties of the disk for which update is pending.") + @visibility("read") + propertyUpdatesInProgress?: PropertyUpdatesInProgress; + + @doc("Indicates the OS on a disk supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc(""" +Additional authentication requirements when exporting or uploading to a disk or +snapshot. +""") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc(""" +Setting this property to true improves reliability and performance of data +disks that are frequently (more than 5 times a day) by detached from one +virtual machine and attached to another. This property should not be set for +disks that are not detached and attached frequently as it causes the disks to +not align with the fault domain of the virtual machine. +""") + optimizedForFrequentAttach?: boolean; +} + @doc("Data used for requesting a SAS.") model GrantAccessData { @doc("The Access Level, accepted values include None, Read, Write.") @@ -7376,6 +7636,30 @@ Url is required regardless of rotationToLatestKeyVersionEnabled value. keyUrl: string; } +@doc("disk encryption set resource update properties.") +model DiskEncryptionSetUpdateProperties { + @doc("The type of key used to encrypt the data of the disk.") + encryptionType?: DiskEncryptionSetType; + + @doc(""" +Key Vault Key Url to be used for server side encryption of Managed Disks and +Snapshots +""") + activeKey?: KeyForDiskEncryptionSet; + + @doc(""" +Set this flag to true to enable auto-updating of this disk encryption set to +the latest key version. +""") + rotationToLatestKeyVersionEnabled?: boolean; + + @doc(""" +Multi-tenant application client id to access key vault in a different tenant. +Setting the value to 'None' will clear the property. +""") + federatedClientId?: string; +} + @doc("The List resources which are encrypted with the disk encryption set.") model ResourceUriList is Azure.Core.Page; @@ -7617,6 +7901,54 @@ the CopyStart operation fails. errorMessage: string; } +@doc("Snapshot resource update properties.") +model SnapshotUpdateProperties { + @doc("the Operating System type.") + osType?: OperatingSystemTypes; + + @doc(""" +If creationData.createOption is Empty, this field is mandatory and it indicates +the size of the disk to create. If this field is present for updates or +creation with other options, it indicates a resize. Resizes are only allowed if +the disk is not attached to a running VM, and can only increase the disk's +size. +""") + diskSizeGB?: int32; + + @doc(""" +Encryption settings collection used be Azure Disk Encryption, can contain +multiple encryption settings per disk or snapshot. +""") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc(""" +Encryption property can be used to encrypt data at rest with customer managed +keys or platform managed keys. +""") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Indicates the OS on a snapshot supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc(""" +Additional authentication requirements when exporting or uploading to a disk or +snapshot. +""") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc("List of supported capabilities for the image from which the OS disk was created.") + supportedCapabilities?: SupportedCapabilities; +} + @doc("The List Resource Skus operation response.") model ResourceSkusResult is Azure.Core.Page; diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp index 82665d8929..95d1da536a 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp @@ -692,7 +692,7 @@ The subscription ID forms part of the URI for every service call. @header accept: "application/json, text/json"; }, - void + VirtualMachineRunCommand >; @doc("The operation to update the VMSS VM run command.") @@ -840,7 +840,7 @@ The subscription ID forms part of the URI for every service call. @header accept: "application/json, text/json"; }, - void + VirtualMachineRunCommandsListResult >; } diff --git a/packages/extensions/openapi-to-cadl/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-networkanalytics/tsp-output/models.tsp index 6609dda004..b7342493df 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-networkanalytics/tsp-output/models.tsp @@ -339,6 +339,29 @@ model DataProductVersion { version: string; } +@doc("The updatable properties of the DataProduct.") +model DataProductUpdateProperties { + @doc("List of name or email associated with data product resource deployment.") + @visibility("read", "create", "update") + owners?: string[]; + + @doc("Purview account url for data product to connect to.") + @visibility("read", "create", "update") + purviewAccount?: string; + + @doc("Purview collection url for data product to connect to.") + @visibility("read", "create", "update") + purviewCollection?: string; + + @doc("Flag to enable or disable private link for data product resource.") + @visibility("read", "create", "update") + privateLinksEnabled?: ControlState; + + @doc("Current configured minor version of the data product resource.") + @visibility("read", "update") + currentMinorVersion?: string; +} + @doc("The details for role assignment common properties.") model RoleAssignmentCommonProperties { @doc("Role Id of the Built-In Role") @@ -415,6 +438,25 @@ model DataTypeProperties { visualizationUrl?: string; } +@doc("The updatable properties of the DataType.") +model DataTypeUpdateProperties { + @doc("State of data type.") + @visibility("read", "create", "update") + state?: DataTypeState; + + @doc("Field for storage output retention in days.") + @visibility("read", "create", "update") + storageOutputRetention?: int32; + + @doc("Field for database cache retention in days.") + @visibility("read", "create", "update") + databaseCacheRetention?: int32; + + @doc("Field for database data retention in days.") + @visibility("read", "create", "update") + databaseRetention?: int32; +} + @doc("The details for container sas creation.") model ContainerSaS { @doc("Sas token start timestamp.") diff --git a/packages/extensions/openapi-to-cadl/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-sphere/tsp-output/models.tsp index eec60bcfd7..3fff287303 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-sphere/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-sphere/tsp-output/models.tsp @@ -333,12 +333,42 @@ model ProductProperties { provisioningState?: ProvisioningState; } +@doc("The updatable properties of the Product.") +model ProductUpdateProperties { + @doc("Description of the product") + description?: string; +} + +@doc("The updatable properties of the DeviceGroup.") +model DeviceGroupUpdateProperties { + @doc("Description of the device group.") + description?: string; + + @doc("Operating system feed type of the device group.") + osFeedType?: OSFeedType; + + @doc("Update policy of the device group.") + updatePolicy?: UpdatePolicy; + + @doc("Flag to define if the user allows for crash dump collection.") + allowCrashDumpsCollection?: AllowCrashDumpCollection; + + @doc("Regional data boundary for the device group.") + regionalDataBoundary?: RegionalDataBoundary; +} + @doc("Request to the action call to bulk claim devices.") model ClaimDevicesRequest { @doc("Device identifiers of the devices to be claimed.") deviceIdentifiers: string[]; } +@doc("The updatable properties of the Device.") +model DeviceUpdateProperties { + @doc("Device group id") + deviceGroupId?: string; +} + @doc("Request of the action to create a signed device capability image") model GenerateCapabilityImageRequest { @doc("List of capabilities to create") diff --git a/packages/extensions/openapi-to-cadl/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-test/tsp-output/models.tsp index 19ddd68b15..65a5922e70 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-test/tsp-output/models.tsp @@ -51,6 +51,18 @@ model EmployeeProperties { provisioningState?: ProvisioningState; } +@doc("The updatable properties of the Employee.") +model EmployeeUpdateProperties { + @doc("Age of employee") + age?: int32; + + @doc("City of employee") + city?: string; + + @doc("Profile of employee") + profile?: bytes; +} + @doc("Enroll properties") model EnrollProperties { @doc("Country of employee")