diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md index b61979e0d279..6e0fe216cfa0 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md +++ b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md @@ -1,5 +1,30 @@ # Release History +## 1.0.0 (2024-10-18) +### Breaking Changes + +- `NetworkAPIVersion20201101` from enum `NetworkAPIVersion` has been removed + +### Features Added + +- New value `NetworkAPIVersionV20201101` added to enum type `NetworkAPIVersion` +- New enum type `AcceleratorManufacturer` with values `AcceleratorManufacturerAMD`, `AcceleratorManufacturerNvidia`, `AcceleratorManufacturerXilinx` +- New enum type `AcceleratorType` with values `AcceleratorTypeFPGA`, `AcceleratorTypeGPU` +- New enum type `ArchitectureType` with values `ArchitectureTypeARM64`, `ArchitectureTypeX64` +- New enum type `CPUManufacturer` with values `CPUManufacturerAMD`, `CPUManufacturerAmpere`, `CPUManufacturerIntel`, `CPUManufacturerMicrosoft` +- New enum type `LocalStorageDiskType` with values `LocalStorageDiskTypeHDD`, `LocalStorageDiskTypeSSD` +- New enum type `VMAttributeSupport` with values `VMAttributeSupportExcluded`, `VMAttributeSupportIncluded`, `VMAttributeSupportRequired` +- New enum type `VMCategory` with values `VMCategoryComputeOptimized`, `VMCategoryFpgaAccelerated`, `VMCategoryGeneralPurpose`, `VMCategoryGpuAccelerated`, `VMCategoryHighPerformanceCompute`, `VMCategoryMemoryOptimized`, `VMCategoryStorageOptimized` +- New struct `AdditionalCapabilities` +- New struct `AdditionalLocationsProfile` +- New struct `LocationProfile` +- New struct `VMAttributeMinMaxDouble` +- New struct `VMAttributeMinMaxInteger` +- New struct `VMAttributes` +- New field `AdditionalVirtualMachineCapabilities` in struct `ComputeProfile` +- New field `AdditionalLocationsProfile`, `VMAttributes` in struct `FleetProperties` + + ## 0.1.0 (2024-07-26) ### Other Changes diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/constants.go b/sdk/resourcemanager/computefleet/armcomputefleet/constants.go index c49940367a6f..9a5b1d23be3c 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/constants.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/constants.go @@ -6,9 +6,48 @@ package armcomputefleet const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" - moduleVersion = "v0.1.0" + moduleVersion = "v1.0.0" ) +// AcceleratorManufacturer - Accelerator manufacturers supported by Azure VMs. +type AcceleratorManufacturer string + +const ( + // AcceleratorManufacturerAMD - AMD GpuType + AcceleratorManufacturerAMD AcceleratorManufacturer = "AMD" + // AcceleratorManufacturerNvidia - Nvidia GpuType + AcceleratorManufacturerNvidia AcceleratorManufacturer = "Nvidia" + // AcceleratorManufacturerXilinx - Xilinx GpuType + AcceleratorManufacturerXilinx AcceleratorManufacturer = "Xilinx" +) + +// PossibleAcceleratorManufacturerValues returns the possible values for the AcceleratorManufacturer const type. +func PossibleAcceleratorManufacturerValues() []AcceleratorManufacturer { + return []AcceleratorManufacturer{ + AcceleratorManufacturerAMD, + AcceleratorManufacturerNvidia, + AcceleratorManufacturerXilinx, + } +} + +// AcceleratorType - Accelerator types supported by Azure VMs. +type AcceleratorType string + +const ( + // AcceleratorTypeFPGA - FPGA Accelerator + AcceleratorTypeFPGA AcceleratorType = "FPGA" + // AcceleratorTypeGPU - GPU Accelerator + AcceleratorTypeGPU AcceleratorType = "GPU" +) + +// PossibleAcceleratorTypeValues returns the possible values for the AcceleratorType const type. +func PossibleAcceleratorTypeValues() []AcceleratorType { + return []AcceleratorType{ + AcceleratorTypeFPGA, + AcceleratorTypeGPU, + } +} + // ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. type ActionType string @@ -24,6 +63,48 @@ func PossibleActionTypeValues() []ActionType { } } +// ArchitectureType - Architecture types supported by Azure VMs. +type ArchitectureType string + +const ( + // ArchitectureTypeARM64 - ARM64 Architecture + ArchitectureTypeARM64 ArchitectureType = "ARM64" + // ArchitectureTypeX64 - X64 Architecture + ArchitectureTypeX64 ArchitectureType = "X64" +) + +// PossibleArchitectureTypeValues returns the possible values for the ArchitectureType const type. +func PossibleArchitectureTypeValues() []ArchitectureType { + return []ArchitectureType{ + ArchitectureTypeARM64, + ArchitectureTypeX64, + } +} + +// CPUManufacturer - Cpu Manufacturers supported by Azure VMs. +type CPUManufacturer string + +const ( + // CPUManufacturerAMD - AMD CPU. + CPUManufacturerAMD CPUManufacturer = "AMD" + // CPUManufacturerAmpere - Ampere CPU. + CPUManufacturerAmpere CPUManufacturer = "Ampere" + // CPUManufacturerIntel - Intel CPU. + CPUManufacturerIntel CPUManufacturer = "Intel" + // CPUManufacturerMicrosoft - Microsoft CPU. + CPUManufacturerMicrosoft CPUManufacturer = "Microsoft" +) + +// PossibleCPUManufacturerValues returns the possible values for the CPUManufacturer const type. +func PossibleCPUManufacturerValues() []CPUManufacturer { + return []CPUManufacturer{ + CPUManufacturerAMD, + CPUManufacturerAmpere, + CPUManufacturerIntel, + CPUManufacturerMicrosoft, + } +} + // CachingTypes - Specifies the caching requirements. type CachingTypes string @@ -344,6 +425,24 @@ func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode { } } +// LocalStorageDiskType - Different kind of Local storage disk types supported by Azure VMs. +type LocalStorageDiskType string + +const ( + // LocalStorageDiskTypeHDD - HDD DiskType. + LocalStorageDiskTypeHDD LocalStorageDiskType = "HDD" + // LocalStorageDiskTypeSSD - SDD DiskType. + LocalStorageDiskTypeSSD LocalStorageDiskType = "SSD" +) + +// PossibleLocalStorageDiskTypeValues returns the possible values for the LocalStorageDiskType const type. +func PossibleLocalStorageDiskTypeValues() []LocalStorageDiskType { + return []LocalStorageDiskType{ + LocalStorageDiskTypeHDD, + LocalStorageDiskTypeSSD, + } +} + // ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). type ManagedServiceIdentityType string @@ -395,14 +494,14 @@ func PossibleModeValues() []Mode { type NetworkAPIVersion string const ( - // NetworkAPIVersion20201101 - Initial version supported. Later versions are supported as well. - NetworkAPIVersion20201101 NetworkAPIVersion = "2020-11-01" + // NetworkAPIVersionV20201101 - Initial version supported. Later versions are supported as well. + NetworkAPIVersionV20201101 NetworkAPIVersion = "2020-11-01" ) // PossibleNetworkAPIVersionValues returns the possible values for the NetworkAPIVersion const type. func PossibleNetworkAPIVersionValues() []NetworkAPIVersion { return []NetworkAPIVersion{ - NetworkAPIVersion20201101, + NetworkAPIVersionV20201101, } } @@ -735,6 +834,75 @@ func PossibleStorageAccountTypesValues() []StorageAccountTypes { } } +// VMAttributeSupport - VMSizes supported by Azure VMs. Included is a union of Excluded and Required. +type VMAttributeSupport string + +const ( + // VMAttributeSupportExcluded - All VMSizes having the feature support will be excluded. + VMAttributeSupportExcluded VMAttributeSupport = "Excluded" + // VMAttributeSupportIncluded - VMSizes that have the feature support and that do not have the feature support will be used. + // Included is a union of Excluded and Required. + VMAttributeSupportIncluded VMAttributeSupport = "Included" + // VMAttributeSupportRequired - Only the VMSizes having the feature support will be used. + VMAttributeSupportRequired VMAttributeSupport = "Required" +) + +// PossibleVMAttributeSupportValues returns the possible values for the VMAttributeSupport const type. +func PossibleVMAttributeSupportValues() []VMAttributeSupport { + return []VMAttributeSupport{ + VMAttributeSupportExcluded, + VMAttributeSupportIncluded, + VMAttributeSupportRequired, + } +} + +// VMCategory - VMCategories defined for Azure VMs. +// See: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose +type VMCategory string + +const ( + // VMCategoryComputeOptimized - Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium + // traffic web servers, network appliances, batch processes, and application servers. + VMCategoryComputeOptimized VMCategory = "ComputeOptimized" + // VMCategoryFpgaAccelerated - FPGA optimized VM sizes are specialized virtual machines available with single or multiple + // FPGA. + // These sizes are designed for compute-intensive workloads. This article provides information about the number and type of + // FPGA, vCPUs, data disks, and NICs. + // Storage throughput and network bandwidth are also included for each size in this grouping. + VMCategoryFpgaAccelerated VMCategory = "FpgaAccelerated" + // VMCategoryGeneralPurpose - General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development, + // small to medium databases, and low to medium traffic web servers. + VMCategoryGeneralPurpose VMCategory = "GeneralPurpose" + // VMCategoryGpuAccelerated - GPU optimized VM sizes are specialized virtual machines available with single, multiple, or + // fractional GPUs. + // These sizes are designed for compute-intensive, graphics-intensive, and visualization workloads. + VMCategoryGpuAccelerated VMCategory = "GpuAccelerated" + // VMCategoryHighPerformanceCompute - Azure High Performance Compute VMs are optimized for various HPC workloads such as computational + // fluid dynamics, finite element analysis, frontend and backend EDA, + // rendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis. + VMCategoryHighPerformanceCompute VMCategory = "HighPerformanceCompute" + // VMCategoryMemoryOptimized - Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database + // servers, medium to large caches, and in-memory analytics. + VMCategoryMemoryOptimized VMCategory = "MemoryOptimized" + // VMCategoryStorageOptimized - Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal + // for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases. + // Examples include Cassandra, MongoDB, Cloudera, and Redis. + VMCategoryStorageOptimized VMCategory = "StorageOptimized" +) + +// PossibleVMCategoryValues returns the possible values for the VMCategory const type. +func PossibleVMCategoryValues() []VMCategory { + return []VMCategory{ + VMCategoryComputeOptimized, + VMCategoryFpgaAccelerated, + VMCategoryGeneralPurpose, + VMCategoryGpuAccelerated, + VMCategoryHighPerformanceCompute, + VMCategoryMemoryOptimized, + VMCategoryStorageOptimized, + } +} + // WindowsPatchAssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine. type WindowsPatchAssessmentMode string diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go index 8974c8b7e939..2fd16b96db29 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go @@ -42,7 +42,7 @@ func NewFleetsClient(subscriptionID string, credential azcore.TokenCredential, o // BeginCreateOrUpdate - Create a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - fleetName - The name of the Compute Fleet // - resource - Resource create parameters. @@ -69,7 +69,7 @@ func (client *FleetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGro // CreateOrUpdate - Create a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 func (client *FleetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, resource Fleet, options *FleetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "FleetsClient.BeginCreateOrUpdate" @@ -111,7 +111,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -124,7 +124,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res // BeginDelete - Delete a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - fleetName - The name of the Compute Fleet // - options - FleetsClientBeginDeleteOptions contains the optional parameters for the FleetsClient.BeginDelete method. @@ -148,7 +148,7 @@ func (client *FleetsClient) BeginDelete(ctx context.Context, resourceGroupName s // Delete - Delete a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 func (client *FleetsClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "FleetsClient.BeginDelete" @@ -190,7 +190,7 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,7 +199,7 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Get a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - fleetName - The name of the Compute Fleet // - options - FleetsClientGetOptions contains the optional parameters for the FleetsClient.Get method. @@ -245,7 +245,7 @@ func (client *FleetsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,7 @@ func (client *FleetsClient) getHandleResponse(resp *http.Response) (FleetsClient // NewListByResourceGroupPager - List Fleet resources by resource group // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - FleetsClientListByResourceGroupOptions contains the optional parameters for the FleetsClient.NewListByResourceGroupPager // method. @@ -305,7 +305,7 @@ func (client *FleetsClient) listByResourceGroupCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +322,7 @@ func (client *FleetsClient) listByResourceGroupHandleResponse(resp *http.Respons // NewListBySubscriptionPager - List Fleet resources by subscription ID // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - options - FleetsClientListBySubscriptionOptions contains the optional parameters for the FleetsClient.NewListBySubscriptionPager // method. func (client *FleetsClient) NewListBySubscriptionPager(options *FleetsClientListBySubscriptionOptions) *runtime.Pager[FleetsClientListBySubscriptionResponse] { @@ -360,7 +360,7 @@ func (client *FleetsClient) listBySubscriptionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,7 +377,7 @@ func (client *FleetsClient) listBySubscriptionHandleResponse(resp *http.Response // NewListVirtualMachineScaleSetsPager - List VirtualMachineScaleSet resources by Fleet // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Fleet // - options - FleetsClientListVirtualMachineScaleSetsOptions contains the optional parameters for the FleetsClient.NewListVirtualMachineScaleSetsPager @@ -425,7 +425,7 @@ func (client *FleetsClient) listVirtualMachineScaleSetsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -443,7 +443,7 @@ func (client *FleetsClient) listVirtualMachineScaleSetsHandleResponse(resp *http // BeginUpdate - Update a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - fleetName - The name of the Compute Fleet // - properties - The resource properties to be updated. @@ -468,7 +468,7 @@ func (client *FleetsClient) BeginUpdate(ctx context.Context, resourceGroupName s // Update - Update a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 func (client *FleetsClient) update(ctx context.Context, resourceGroupName string, fleetName string, properties FleetUpdate, options *FleetsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "FleetsClient.BeginUpdate" @@ -510,7 +510,7 @@ func (client *FleetsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/models.go b/sdk/resourcemanager/computefleet/armcomputefleet/models.go index ea1a4e47e695..caf2d6bf4392 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/models.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/models.go @@ -43,6 +43,24 @@ type APIErrorBase struct { Target *string } +// AdditionalCapabilities for VM. +type AdditionalCapabilities struct { + // The flag that enables or disables hibernation capability on the VM. + HibernationEnabled *bool + + // The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account + // type on the VM or VMSS. + // Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only + // if this property is enabled. + UltraSSDEnabled *bool +} + +// AdditionalLocationsProfile - Represents the configuration for additional locations where Fleet resources may be deployed. +type AdditionalLocationsProfile struct { + // REQUIRED; The list of location profiles. + LocationProfiles []*LocationProfile +} + // AdditionalUnattendContent - Specifies additional XML formatted information that can be included in the // Unattend.xml file, which is used by Windows Setup. Contents are defined by // setting name, component name, and the pass in which the content is applied. @@ -172,6 +190,12 @@ type ComputeProfile struct { // REQUIRED; Base Virtual Machine Profile Properties to be specified according to "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile" BaseVirtualMachineProfile *BaseVirtualMachineProfile + // Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled. + // ultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs. + // hibernationEnabled: Enables the hibernation capability on the VMSS VMs. + // Default value is null if not specified. This property cannot be updated once set. + AdditionalVirtualMachineCapabilities *AdditionalCapabilities + // Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and Virtual Machines. // The default value will be the latest supported computeApiVersion by Compute Fleet. ComputeAPIVersion *string @@ -277,12 +301,18 @@ type FleetProperties struct { // REQUIRED; List of VM sizes supported for Compute Fleet VMSizesProfile []*VMSizeProfile + // Represents the configuration for additional locations where Fleet resources may be deployed. + AdditionalLocationsProfile *AdditionalLocationsProfile + // Configuration Options for Regular instances in Compute Fleet. RegularPriorityProfile *RegularPriorityProfile // Configuration Options for Spot instances in Compute Fleet. SpotPriorityProfile *SpotPriorityProfile + // Attribute based Fleet. + VMAttributes *VMAttributes + // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState @@ -428,6 +458,18 @@ type LinuxVMGuestPatchAutomaticByPlatformSettings struct { RebootSetting *LinuxVMGuestPatchAutomaticByPlatformRebootSetting } +// LocationProfile - Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride +// (optional). +type LocationProfile struct { + // REQUIRED; The ARM location name of the additional region. If LocationProfile is specified, then location is required. + Location *string + + // An override for computeProfile.baseVirtualMachineProfile specific to this region. + // This override is merged with the base virtual machine profile to define the final virtual machine profile for the resources + // deployed in this location. + VirtualMachineProfileOverride *BaseVirtualMachineProfile +} + // ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) type ManagedServiceIdentity struct { // REQUIRED; The type of managed identity assigned to this resource. @@ -793,6 +835,104 @@ type UserAssignedIdentity struct { PrincipalID *string } +// VMAttributeMinMaxDouble - VMAttributes using double values. +type VMAttributeMinMaxDouble struct { + // Maximum value. Double.MaxValue(1.7976931348623157E+308) + Max *float64 + + // Minimum value. default 0. Double.MinValue() + Min *float64 +} + +// VMAttributeMinMaxInteger - While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 +// (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes. +type VMAttributeMinMaxInteger struct { + // Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + Max *int32 + + // Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + Min *int32 +} + +// VMAttributes that will be used to filter VMSizes which will be used to build Fleet. +type VMAttributes struct { + // REQUIRED; The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or + // Max is required if specified. + MemoryInGiB *VMAttributeMinMaxDouble + + // REQUIRED; The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min + // or Max is required if specified. + VCPUCount *VMAttributeMinMaxInteger + + // The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified. + // acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + // If acceleratorSupport is "Excluded", this VMAttribute can not be used. + AcceleratorCount *VMAttributeMinMaxInteger + + // The accelerator manufacturers specified as a list. + // acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + // If acceleratorSupport is "Excluded", this VMAttribute can not be used. + AcceleratorManufacturers []*AcceleratorManufacturer + + // Specifies whether the VMSize supporting accelerator should be used to build Fleet or not. + // acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + // If acceleratorSupport is "Excluded", this VMAttribute can not be used. + AcceleratorSupport *VMAttributeSupport + + // The accelerator types specified as a list. acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + // If acceleratorSupport is "Excluded", this VMAttribute can not be used. + AcceleratorTypes []*AcceleratorType + + // The VM architecture types specified as a list. Optional parameter. + ArchitectureTypes []*ArchitectureType + + // Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not. + BurstableSupport *VMAttributeSupport + + // The VM CPU manufacturers specified as a list. Optional parameter. + CPUManufacturers []*CPUManufacturer + + // The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + DataDiskCount *VMAttributeMinMaxInteger + + // Specifies which VMSizes should be excluded while building Fleet. Optional parameter. + ExcludedVMSizes []*string + + // The local storage disk types specified as a list. LocalStorageSupport should be set to "Included" or "Required" to use + // this VMAttribute. + // If localStorageSupport is "Excluded", this VMAttribute can not be used. + LocalStorageDiskTypes []*LocalStorageDiskType + + // LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + // If localStorageSupport is "Excluded", this VMAttribute can not be used. + LocalStorageInGiB *VMAttributeMinMaxDouble + + // Specifies whether the VMSize supporting local storage should be used to build Fleet or not. + LocalStorageSupport *VMAttributeSupport + + // The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified. + MemoryInGiBPerVCpu *VMAttributeMinMaxDouble + + // The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if + // specified. + NetworkBandwidthInMbps *VMAttributeMinMaxDouble + + // The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + NetworkInterfaceCount *VMAttributeMinMaxInteger + + // The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. + // Either Min or Max is required if specified. + // rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. + // If rdmaSupport is "Excluded", this VMAttribute can not be used. + RdmaNetworkInterfaceCount *VMAttributeMinMaxInteger + + // Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not. + RdmaSupport *VMAttributeSupport + + // The VM category specified as a list. Optional parameter. + VMCategories []*VMCategory +} + // VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. **Note:** It can // only be set for Confidential VMs. type VMDiskSecurityProfile struct { diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go b/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go index b84ea4b3cb54..df1f6336792d 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go @@ -116,6 +116,64 @@ func (a *APIErrorBase) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AdditionalCapabilities. +func (a AdditionalCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hibernationEnabled", a.HibernationEnabled) + populate(objectMap, "ultraSSDEnabled", a.UltraSSDEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalCapabilities. +func (a *AdditionalCapabilities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hibernationEnabled": + err = unpopulate(val, "HibernationEnabled", &a.HibernationEnabled) + delete(rawMsg, key) + case "ultraSSDEnabled": + err = unpopulate(val, "UltraSSDEnabled", &a.UltraSSDEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdditionalLocationsProfile. +func (a AdditionalLocationsProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locationProfiles", a.LocationProfiles) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalLocationsProfile. +func (a *AdditionalLocationsProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locationProfiles": + err = unpopulate(val, "LocationProfiles", &a.LocationProfiles) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AdditionalUnattendContent. func (a AdditionalUnattendContent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -330,6 +388,7 @@ func (c *CapacityReservationProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeProfile. func (c ComputeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "additionalVirtualMachineCapabilities", c.AdditionalVirtualMachineCapabilities) populate(objectMap, "baseVirtualMachineProfile", c.BaseVirtualMachineProfile) populate(objectMap, "computeApiVersion", c.ComputeAPIVersion) populate(objectMap, "platformFaultDomainCount", c.PlatformFaultDomainCount) @@ -345,6 +404,9 @@ func (c *ComputeProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "additionalVirtualMachineCapabilities": + err = unpopulate(val, "AdditionalVirtualMachineCapabilities", &c.AdditionalVirtualMachineCapabilities) + delete(rawMsg, key) case "baseVirtualMachineProfile": err = unpopulate(val, "BaseVirtualMachineProfile", &c.BaseVirtualMachineProfile) delete(rawMsg, key) @@ -571,12 +633,14 @@ func (f *FleetListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FleetProperties. func (f FleetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "additionalLocationsProfile", f.AdditionalLocationsProfile) populate(objectMap, "computeProfile", f.ComputeProfile) populate(objectMap, "provisioningState", f.ProvisioningState) populate(objectMap, "regularPriorityProfile", f.RegularPriorityProfile) populate(objectMap, "spotPriorityProfile", f.SpotPriorityProfile) populateDateTimeRFC3339(objectMap, "timeCreated", f.TimeCreated) populate(objectMap, "uniqueId", f.UniqueID) + populate(objectMap, "vmAttributes", f.VMAttributes) populate(objectMap, "vmSizesProfile", f.VMSizesProfile) return json.Marshal(objectMap) } @@ -590,6 +654,9 @@ func (f *FleetProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "additionalLocationsProfile": + err = unpopulate(val, "AdditionalLocationsProfile", &f.AdditionalLocationsProfile) + delete(rawMsg, key) case "computeProfile": err = unpopulate(val, "ComputeProfile", &f.ComputeProfile) delete(rawMsg, key) @@ -608,6 +675,9 @@ func (f *FleetProperties) UnmarshalJSON(data []byte) error { case "uniqueId": err = unpopulate(val, "UniqueID", &f.UniqueID) delete(rawMsg, key) + case "vmAttributes": + err = unpopulate(val, "VMAttributes", &f.VMAttributes) + delete(rawMsg, key) case "vmSizesProfile": err = unpopulate(val, "VMSizesProfile", &f.VMSizesProfile) delete(rawMsg, key) @@ -884,6 +954,37 @@ func (l *LinuxVMGuestPatchAutomaticByPlatformSettings) UnmarshalJSON(data []byte return nil } +// MarshalJSON implements the json.Marshaller interface for type LocationProfile. +func (l LocationProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", l.Location) + populate(objectMap, "virtualMachineProfileOverride", l.VirtualMachineProfileOverride) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocationProfile. +func (l *LocationProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &l.Location) + delete(rawMsg, key) + case "virtualMachineProfileOverride": + err = unpopulate(val, "VirtualMachineProfileOverride", &l.VirtualMachineProfileOverride) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1732,6 +1833,171 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type VMAttributeMinMaxDouble. +func (v VMAttributeMinMaxDouble) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "max", v.Max) + populate(objectMap, "min", v.Min) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMAttributeMinMaxDouble. +func (v *VMAttributeMinMaxDouble) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "max": + err = unpopulate(val, "Max", &v.Max) + delete(rawMsg, key) + case "min": + err = unpopulate(val, "Min", &v.Min) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMAttributeMinMaxInteger. +func (v VMAttributeMinMaxInteger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "max", v.Max) + populate(objectMap, "min", v.Min) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMAttributeMinMaxInteger. +func (v *VMAttributeMinMaxInteger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "max": + err = unpopulate(val, "Max", &v.Max) + delete(rawMsg, key) + case "min": + err = unpopulate(val, "Min", &v.Min) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMAttributes. +func (v VMAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acceleratorCount", v.AcceleratorCount) + populate(objectMap, "acceleratorManufacturers", v.AcceleratorManufacturers) + populate(objectMap, "acceleratorSupport", v.AcceleratorSupport) + populate(objectMap, "acceleratorTypes", v.AcceleratorTypes) + populate(objectMap, "architectureTypes", v.ArchitectureTypes) + populate(objectMap, "burstableSupport", v.BurstableSupport) + populate(objectMap, "cpuManufacturers", v.CPUManufacturers) + populate(objectMap, "dataDiskCount", v.DataDiskCount) + populate(objectMap, "excludedVMSizes", v.ExcludedVMSizes) + populate(objectMap, "localStorageDiskTypes", v.LocalStorageDiskTypes) + populate(objectMap, "localStorageInGiB", v.LocalStorageInGiB) + populate(objectMap, "localStorageSupport", v.LocalStorageSupport) + populate(objectMap, "memoryInGiB", v.MemoryInGiB) + populate(objectMap, "memoryInGiBPerVCpu", v.MemoryInGiBPerVCpu) + populate(objectMap, "networkBandwidthInMbps", v.NetworkBandwidthInMbps) + populate(objectMap, "networkInterfaceCount", v.NetworkInterfaceCount) + populate(objectMap, "rdmaNetworkInterfaceCount", v.RdmaNetworkInterfaceCount) + populate(objectMap, "rdmaSupport", v.RdmaSupport) + populate(objectMap, "vCpuCount", v.VCPUCount) + populate(objectMap, "vmCategories", v.VMCategories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMAttributes. +func (v *VMAttributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acceleratorCount": + err = unpopulate(val, "AcceleratorCount", &v.AcceleratorCount) + delete(rawMsg, key) + case "acceleratorManufacturers": + err = unpopulate(val, "AcceleratorManufacturers", &v.AcceleratorManufacturers) + delete(rawMsg, key) + case "acceleratorSupport": + err = unpopulate(val, "AcceleratorSupport", &v.AcceleratorSupport) + delete(rawMsg, key) + case "acceleratorTypes": + err = unpopulate(val, "AcceleratorTypes", &v.AcceleratorTypes) + delete(rawMsg, key) + case "architectureTypes": + err = unpopulate(val, "ArchitectureTypes", &v.ArchitectureTypes) + delete(rawMsg, key) + case "burstableSupport": + err = unpopulate(val, "BurstableSupport", &v.BurstableSupport) + delete(rawMsg, key) + case "cpuManufacturers": + err = unpopulate(val, "CPUManufacturers", &v.CPUManufacturers) + delete(rawMsg, key) + case "dataDiskCount": + err = unpopulate(val, "DataDiskCount", &v.DataDiskCount) + delete(rawMsg, key) + case "excludedVMSizes": + err = unpopulate(val, "ExcludedVMSizes", &v.ExcludedVMSizes) + delete(rawMsg, key) + case "localStorageDiskTypes": + err = unpopulate(val, "LocalStorageDiskTypes", &v.LocalStorageDiskTypes) + delete(rawMsg, key) + case "localStorageInGiB": + err = unpopulate(val, "LocalStorageInGiB", &v.LocalStorageInGiB) + delete(rawMsg, key) + case "localStorageSupport": + err = unpopulate(val, "LocalStorageSupport", &v.LocalStorageSupport) + delete(rawMsg, key) + case "memoryInGiB": + err = unpopulate(val, "MemoryInGiB", &v.MemoryInGiB) + delete(rawMsg, key) + case "memoryInGiBPerVCpu": + err = unpopulate(val, "MemoryInGiBPerVCpu", &v.MemoryInGiBPerVCpu) + delete(rawMsg, key) + case "networkBandwidthInMbps": + err = unpopulate(val, "NetworkBandwidthInMbps", &v.NetworkBandwidthInMbps) + delete(rawMsg, key) + case "networkInterfaceCount": + err = unpopulate(val, "NetworkInterfaceCount", &v.NetworkInterfaceCount) + delete(rawMsg, key) + case "rdmaNetworkInterfaceCount": + err = unpopulate(val, "RdmaNetworkInterfaceCount", &v.RdmaNetworkInterfaceCount) + delete(rawMsg, key) + case "rdmaSupport": + err = unpopulate(val, "RdmaSupport", &v.RdmaSupport) + delete(rawMsg, key) + case "vCpuCount": + err = unpopulate(val, "VCPUCount", &v.VCPUCount) + delete(rawMsg, key) + case "vmCategories": + err = unpopulate(val, "VMCategories", &v.VMCategories) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type VMDiskSecurityProfile. func (v VMDiskSecurityProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/operations_client.go b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client.go index 952cb8845184..e6f217fbf10e 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/operations_client.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client.go @@ -35,7 +35,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List the operations for the provider // -// Generated from API version 2024-05-01-preview +// Generated from API version 2024-11-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -68,7 +68,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2024-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml b/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml index f26478624109..c02fcff6f2cb 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml +++ b/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: aa23ddc02b2b1c5a34c56a49d83b77c0a1aaa614 -repo: Azure/azure-rest-api-specs -additionalDirectories: +commit: a034be5abf91cd32f3b620cd3abcf3d43b6642cc +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: \ No newline at end of file