From de1c93f661537f1bbefb067041f7247557f7d9cc Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Tue, 22 Oct 2024 15:34:23 +0800 Subject: [PATCH] [Release] sdk/resourcemanager/computefleet/armcomputefleet/1.0.0 (#23629) * [Release] sdk/resourcemanager/computefleet/armcomputefleet/1.0.0 generation from spec commit: c120171b3684d88562fa26ae7db5d22b7bfa95d8 * refine changelog --- .../computefleet/armcomputefleet/CHANGELOG.md | 24 + .../computefleet/armcomputefleet/constants.go | 176 +- .../armcomputefleet/fleets_client.go | 34 +- .../fleets_client_example_test.go | 3114 +++++++++++++++++ .../computefleet/armcomputefleet/go.mod | 12 +- .../computefleet/armcomputefleet/go.sum | 17 + .../computefleet/armcomputefleet/models.go | 140 + .../armcomputefleet/models_serde.go | 266 ++ .../armcomputefleet/operations_client.go | 4 +- .../operations_client_example_test.go | 98 + .../armcomputefleet/tsp-location.yaml | 4 +- 11 files changed, 3863 insertions(+), 26 deletions(-) create mode 100644 sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go create mode 100644 sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md index b61979e0d2..d91bbac6cf 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md +++ b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md @@ -1,5 +1,29 @@ # Release History +## 1.0.0 (2024-10-22) +### Breaking Changes + +- `NetworkAPIVersion20201101` from enum `NetworkAPIVersion` has been renamed to `NetworkAPIVersionV20201101` + +### Features Added + +- 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 c49940367a..9a5b1d23be 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 8974c8b7e9..2fd16b96db 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/fleets_client_example_test.go b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go new file mode 100644 index 0000000000..6ec2174ed3 --- /dev/null +++ b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go @@ -0,0 +1,3114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. + +package armcomputefleet_test + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" + "log" +) + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_CreateOrUpdate.json +func ExampleFleetsClient_BeginCreateOrUpdate_fleetsCreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewFleetsClient().BeginCreateOrUpdate(ctx, "rgazurefleet", "testFleet", armcomputefleet.Fleet{ + Properties: &armcomputefleet.FleetProperties{ + SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + Capacity: to.Ptr[int32](20), + MinCapacity: to.Ptr[int32](10), + MaxPricePerVM: to.Ptr[float32](0.00865), + EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + Maintain: to.Ptr(true), + }, + RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + Capacity: to.Ptr[int32](20), + MinCapacity: to.Ptr[int32](10), + AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + }, + VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + { + Name: to.Ptr("Standard_d1_v2"), + Rank: to.Ptr[int32](19225), + }, + }, + ComputeProfile: &armcomputefleet.ComputeProfile{ + BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + ComputerNamePrefix: to.Ptr("o"), + AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + AdminPassword: to.Ptr("adfbrdxpv"), + CustomData: to.Ptr("xjjib"), + WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + ProvisionVMAgent: to.Ptr(true), + EnableAutomaticUpdates: to.Ptr(true), + TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + { + PassName: to.Ptr("OobeSystem"), + ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + Content: to.Ptr("bubmqbxjkj"), + }, + }, + PatchSettings: &armcomputefleet.PatchSettings{ + PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + EnableHotpatching: to.Ptr(true), + AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + }, + }, + WinRM: &armcomputefleet.WinRMConfiguration{ + Listeners: []*armcomputefleet.WinRMListener{ + { + Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTPS), + CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + }, + }, + }, + EnableVMAgentPlatformUpdates: to.Ptr(true), + }, + LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + DisablePasswordAuthentication: to.Ptr(true), + SSH: &armcomputefleet.SSHConfiguration{ + PublicKeys: []*armcomputefleet.SSHPublicKey{ + { + Path: to.Ptr("kmqz"), + KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + }, + }, + }, + ProvisionVMAgent: to.Ptr(true), + PatchSettings: &armcomputefleet.LinuxPatchSettings{ + PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + }, + }, + EnableVMAgentPlatformUpdates: to.Ptr(true), + }, + Secrets: []*armcomputefleet.VaultSecretGroup{ + { + SourceVault: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + }, + VaultCertificates: []*armcomputefleet.VaultCertificate{ + { + CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + }, + }, + }, + }, + AllowExtensionOperations: to.Ptr(true), + RequireGuestProvisionSignal: to.Ptr(true), + }, + StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + ImageReference: &armcomputefleet.ImageReference{ + Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + Offer: to.Ptr("isxgumkarlkomp"), + SKU: to.Ptr("eojmppqcrnpmxirtp"), + Version: to.Ptr("wvpcqefgtmqdgltiuz"), + SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + CommunityGalleryImageID: to.Ptr("vlqe"), + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + }, + OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + Name: to.Ptr("wfttw"), + Caching: to.Ptr(armcomputefleet.CachingTypesNone), + WriteAcceleratorEnabled: to.Ptr(true), + CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + }, + DiskSizeGB: to.Ptr[int32](14), + OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + Image: &armcomputefleet.VirtualHardDisk{ + URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + }, + VhdContainers: []*string{ + to.Ptr("tkzcwddtinkfpnfklatw"), + }, + ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + }, + }, + DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + }, + DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + { + Name: to.Ptr("eogiykmdmeikswxmigjws"), + Lun: to.Ptr[int32](14), + Caching: to.Ptr(armcomputefleet.CachingTypesNone), + WriteAcceleratorEnabled: to.Ptr(true), + CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + DiskSizeGB: to.Ptr[int32](6), + ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + }, + }, + DiskIOPSReadWrite: to.Ptr[int64](27), + DiskMBpsReadWrite: to.Ptr[int64](2), + DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + }, + }, + }, + NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + HealthProbe: &armcomputefleet.APIEntityReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + }, + NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + { + Name: to.Ptr("i"), + Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + Primary: to.Ptr(true), + EnableAcceleratedNetworking: to.Ptr(true), + DisableTCPStateTracking: to.Ptr(true), + EnableFpga: to.Ptr(true), + NetworkSecurityGroup: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + }, + DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + DNSServers: []*string{ + to.Ptr("nxmmfolhclsesu"), + }, + }, + IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + { + Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + Subnet: &armcomputefleet.APIEntityReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + }, + Primary: to.Ptr(true), + PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + Name: to.Ptr("fvpqf"), + Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + IdleTimeoutInMinutes: to.Ptr[int32](9), + DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + }, + IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + { + IPTagType: to.Ptr("sddgsoemnzgqizale"), + Tag: to.Ptr("wufmhrjsakbiaetyara"), + }, + }, + PublicIPPrefix: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + }, + PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + }, + SKU: &armcomputefleet.PublicIPAddressSKU{ + Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + }, + }, + PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + }, + }, + ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + }, + }, + LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + }, + }, + LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + }, + }, + }, + }, + }, + EnableIPForwarding: to.Ptr(true), + DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + }, + }, + }, + NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + }, + SecurityProfile: &armcomputefleet.SecurityProfile{ + UefiSettings: &armcomputefleet.UefiSettings{ + SecureBootEnabled: to.Ptr(true), + VTpmEnabled: to.Ptr(true), + }, + EncryptionAtHost: to.Ptr(true), + SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + }, + ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + Enabled: to.Ptr(true), + Mode: to.Ptr(armcomputefleet.ModeAudit), + KeyIncarnationID: to.Ptr[int32](20), + }, + }, + DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + BootDiagnostics: &armcomputefleet.BootDiagnostics{ + Enabled: to.Ptr(true), + StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + }, + }, + ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + { + Name: to.Ptr("bndxuxx"), + Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + ForceUpdateTag: to.Ptr("yhgxw"), + Publisher: to.Ptr("kpxtirxjfprhs"), + Type: to.Ptr("pgjilctjjwaa"), + TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + AutoUpgradeMinorVersion: to.Ptr(true), + EnableAutomaticUpgrade: to.Ptr(true), + Settings: map[string]any{}, + ProtectedSettings: map[string]any{}, + ProvisionAfterExtensions: []*string{ + to.Ptr("nftzosroolbcwmpupujzqwqe"), + }, + SuppressFailures: to.Ptr(true), + ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + SecretURL: to.Ptr("https://myvaultName.vault.azure.net/secrets/secret/mySecretName"), + SourceVault: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + }, + }, + }, + }, + }, + ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + }, + LicenseType: to.Ptr("v"), + ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + NotBeforeTimeout: to.Ptr("iljppmmw"), + Enable: to.Ptr(true), + }, + OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + Enable: to.Ptr(true), + }, + }, + UserData: to.Ptr("s"), + CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + CapacityReservationGroup: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + }, + }, + ApplicationProfile: &armcomputefleet.ApplicationProfile{ + GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + { + Tags: to.Ptr("eyrqjbib"), + Order: to.Ptr[int32](5), + PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + ConfigurationReference: to.Ptr("ulztmiavpojpbpbddgnuuiimxcpau"), + TreatFailureAsDeploymentFailure: to.Ptr(true), + EnableAutomaticUpgrade: to.Ptr(true), + }, + }, + }, + HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + VMSizeProperties: &armcomputefleet.VMSizeProperties{ + VCPUsAvailable: to.Ptr[int32](16), + VCPUsPerCore: to.Ptr[int32](23), + }, + }, + ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + }, + SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + ID: to.Ptr("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"), + ExcludeExtensions: []*string{ + to.Ptr("{securityPostureVMExtensionName}"), + }, + IsOverridable: to.Ptr(true), + }, + }, + ComputeAPIVersion: to.Ptr("2023-07-01"), + PlatformFaultDomainCount: to.Ptr[int32](1), + }, + }, + Zones: []*string{ + to.Ptr("zone1"), + to.Ptr("zone2"), + }, + Identity: &armcomputefleet.ManagedServiceIdentity{ + Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{ + "key9851": {}, + }, + }, + Tags: map[string]*string{ + "key3518": to.Ptr("luvrnuvsgdpbuofdskkcoqhfh"), + }, + Location: to.Ptr("westus"), + Plan: &armcomputefleet.Plan{ + Name: to.Ptr("jwgrcrnrtfoxn"), + Publisher: to.Ptr("iozjbiqqckqm"), + Product: to.Ptr("cgopbyvdyqikahwyxfpzwaqk"), + PromotionCode: to.Ptr("naglezezplcaruqogtxnuizslqnnbr"), + Version: to.Ptr("wa"), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armcomputefleet.FleetsClientCreateOrUpdateResponse{ + // Fleet: &armcomputefleet.Fleet{ + // Properties: &armcomputefleet.FleetProperties{ + // ProvisioningState: to.Ptr(armcomputefleet.ProvisioningStateSucceeded), + // SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + // Capacity: to.Ptr[int32](10), + // MinCapacity: to.Ptr[int32](20), + // MaxPricePerVM: to.Ptr[float32](0.00865), + // EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + // AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + // Maintain: to.Ptr(true), + // }, + // RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + // Capacity: to.Ptr[int32](10), + // MinCapacity: to.Ptr[int32](10), + // AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + // }, + // VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + // { + // Name: to.Ptr("Standard_d1_v2"), + // Rank: to.Ptr[int32](19225), + // }, + // }, + // ComputeProfile: &armcomputefleet.ComputeProfile{ + // BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + // OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + // ComputerNamePrefix: to.Ptr("o"), + // AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + // WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + // ProvisionVMAgent: to.Ptr(true), + // EnableAutomaticUpdates: to.Ptr(true), + // TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + // AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + // { + // PassName: to.Ptr("OobeSystem"), + // ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + // SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + // }, + // }, + // PatchSettings: &armcomputefleet.PatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + // EnableHotpatching: to.Ptr(true), + // AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // WinRM: &armcomputefleet.WinRMConfiguration{ + // Listeners: []*armcomputefleet.WinRMListener{ + // { + // Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTPS), + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // }, + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + // DisablePasswordAuthentication: to.Ptr(true), + // SSH: &armcomputefleet.SSHConfiguration{ + // PublicKeys: []*armcomputefleet.SSHPublicKey{ + // { + // Path: to.Ptr("kmqz"), + // KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + // }, + // }, + // }, + // ProvisionVMAgent: to.Ptr(true), + // PatchSettings: &armcomputefleet.LinuxPatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + // AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // Secrets: []*armcomputefleet.VaultSecretGroup{ + // { + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // VaultCertificates: []*armcomputefleet.VaultCertificate{ + // { + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + // }, + // }, + // }, + // }, + // AllowExtensionOperations: to.Ptr(true), + // RequireGuestProvisionSignal: to.Ptr(true), + // }, + // StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + // ImageReference: &armcomputefleet.ImageReference{ + // Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + // Offer: to.Ptr("isxgumkarlkomp"), + // SKU: to.Ptr("eojmppqcrnpmxirtp"), + // Version: to.Ptr("wvpcqefgtmqdgltiuz"), + // ExactVersion: to.Ptr("zjbntmiskjexlr"), + // SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + // CommunityGalleryImageID: to.Ptr("vlqe"), + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + // }, + // OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + // Name: to.Ptr("wfttw"), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + // Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + // Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + // }, + // DiskSizeGB: to.Ptr[int32](14), + // OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + // Image: &armcomputefleet.VirtualHardDisk{ + // URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + // }, + // VhdContainers: []*string{ + // to.Ptr("tkzcwddtinkfpnfklatw"), + // }, + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + // { + // Name: to.Ptr("eogiykmdmeikswxmigjws"), + // Lun: to.Ptr[int32](14), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiskSizeGB: to.Ptr[int32](6), + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DiskIOPSReadWrite: to.Ptr[int64](27), + // DiskMBpsReadWrite: to.Ptr[int64](2), + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // }, + // }, + // NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + // HealthProbe: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + // }, + // NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + // { + // Name: to.Ptr("i"), + // Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + // Primary: to.Ptr(true), + // EnableAcceleratedNetworking: to.Ptr(true), + // DisableTCPStateTracking: to.Ptr(true), + // EnableFpga: to.Ptr(true), + // NetworkSecurityGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + // }, + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + // DNSServers: []*string{ + // to.Ptr("nxmmfolhclsesu"), + // }, + // }, + // IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + // { + // Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + // Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + // Subnet: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + // }, + // Primary: to.Ptr(true), + // PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + // Name: to.Ptr("fvpqf"), + // Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + // IdleTimeoutInMinutes: to.Ptr[int32](9), + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + // DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + // DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + // }, + // IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + // { + // IPTagType: to.Ptr("sddgsoemnzgqizale"), + // Tag: to.Ptr("wufmhrjsakbiaetyara"), + // }, + // }, + // PublicIPPrefix: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + // }, + // PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // }, + // SKU: &armcomputefleet.PublicIPAddressSKU{ + // Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + // Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + // }, + // }, + // PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + // }, + // }, + // LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + // }, + // }, + // }, + // }, + // }, + // EnableIPForwarding: to.Ptr(true), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + // AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + // }, + // }, + // }, + // NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + // }, + // SecurityProfile: &armcomputefleet.SecurityProfile{ + // UefiSettings: &armcomputefleet.UefiSettings{ + // SecureBootEnabled: to.Ptr(true), + // VTpmEnabled: to.Ptr(true), + // }, + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + // EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + // }, + // ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + // Enabled: to.Ptr(true), + // Mode: to.Ptr(armcomputefleet.ModeAudit), + // KeyIncarnationID: to.Ptr[int32](20), + // }, + // }, + // DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + // BootDiagnostics: &armcomputefleet.BootDiagnostics{ + // Enabled: to.Ptr(true), + // StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + // }, + // }, + // ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + // Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + // { + // Name: to.Ptr("bndxuxx"), + // Type: to.Ptr("cmeam"), + // Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + // ForceUpdateTag: to.Ptr("yhgxw"), + // Publisher: to.Ptr("kpxtirxjfprhs"), + // Type: to.Ptr("pgjilctjjwaa"), + // TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + // AutoUpgradeMinorVersion: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // Settings: map[string]any{ + // }, + // ProvisioningState: to.Ptr("Succeeded"), + // ProvisionAfterExtensions: []*string{ + // to.Ptr("nftzosroolbcwmpupujzqwqe"), + // }, + // SuppressFailures: to.Ptr(true), + // ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + // SecretURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"), + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // }, + // }, + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"), + // }, + // }, + // ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + // }, + // LicenseType: to.Ptr("v"), + // ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + // TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + // NotBeforeTimeout: to.Ptr("iljppmmw"), + // Enable: to.Ptr(true), + // }, + // OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + // NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + // Enable: to.Ptr(true), + // }, + // }, + // UserData: to.Ptr("s"), + // CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + // CapacityReservationGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + // }, + // }, + // ApplicationProfile: &armcomputefleet.ApplicationProfile{ + // GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + // { + // Tags: to.Ptr("eyrqjbib"), + // Order: to.Ptr[int32](5), + // PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + // TreatFailureAsDeploymentFailure: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // }, + // }, + // }, + // HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + // VMSizeProperties: &armcomputefleet.VMSizeProperties{ + // VCPUsAvailable: to.Ptr[int32](16), + // VCPUsPerCore: to.Ptr[int32](23), + // }, + // }, + // ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + // }, + // SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + // ID: to.Ptr("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"), + // ExcludeExtensions: []*string{ + // to.Ptr("{securityPostureVMExtensionName}"), + // }, + // IsOverridable: to.Ptr(true), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // ComputeAPIVersion: to.Ptr("2023-07-01"), + // PlatformFaultDomainCount: to.Ptr[int32](1), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-10T00:16:34.8590555+00:00"); return t}()), + // UniqueID: to.Ptr("a2f7fabd-bbc2-4a20-afe1-49fdb3885a28"), + // }, + // Zones: []*string{ + // to.Ptr("zone1"), + // to.Ptr("zone2"), + // }, + // Identity: &armcomputefleet.ManagedServiceIdentity{ + // PrincipalID: to.Ptr("4d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // TenantID: to.Ptr("5d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{ + // "key9851": &armcomputefleet.UserAssignedIdentity{ + // PrincipalID: to.Ptr("6d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // ClientID: to.Ptr("7d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // }, + // }, + // }, + // Plan: &armcomputefleet.Plan{ + // Name: to.Ptr("jwgrcrnrtfoxn"), + // Publisher: to.Ptr("iozjbiqqckqm"), + // Product: to.Ptr("cgopbyvdyqikahwyxfpzwaqk"), + // PromotionCode: to.Ptr("naglezezplcaruqogtxnuizslqnnbr"), + // Version: to.Ptr("wa"), + // }, + // Tags: map[string]*string{ + // "key3518": to.Ptr("luvrnuvsgdpbuofdskkcoqhfh"), + // }, + // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet"), + // Name: to.Ptr("testFleet"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets"), + // SystemData: &armcomputefleet.SystemData{ + // CreatedBy: to.Ptr("rowegentrpoajsv"), + // CreatedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // LastModifiedBy: to.Ptr("edwuayhhaoepxzisfaqjhmrxjq"), + // LastModifiedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json +func ExampleFleetsClient_BeginCreateOrUpdate_fleetsCreateOrUpdateMinimumSet() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewFleetsClient().BeginCreateOrUpdate(ctx, "rgazurefleet", "testFleet", armcomputefleet.Fleet{ + Properties: &armcomputefleet.FleetProperties{ + SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + Capacity: to.Ptr[int32](2), + MinCapacity: to.Ptr[int32](1), + EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + Maintain: to.Ptr(true), + }, + RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + Capacity: to.Ptr[int32](2), + MinCapacity: to.Ptr[int32](1), + AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + }, + VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + { + Name: to.Ptr("Standard_D2s_v3"), + }, + { + Name: to.Ptr("Standard_D4s_v3"), + }, + { + Name: to.Ptr("Standard_E2s_v3"), + }, + }, + ComputeProfile: &armcomputefleet.ComputeProfile{ + BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + ImageReference: &armcomputefleet.ImageReference{ + Publisher: to.Ptr("canonical"), + Offer: to.Ptr("0001-com-ubuntu-server-focal"), + SKU: to.Ptr("20_04-lts-gen2"), + Version: to.Ptr("latest"), + }, + OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + Caching: to.Ptr(armcomputefleet.CachingTypesReadWrite), + CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + OSType: to.Ptr(armcomputefleet.OperatingSystemTypesLinux), + ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + }, + }, + }, + OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + ComputerNamePrefix: to.Ptr("prefix"), + AdminUsername: to.Ptr("azureuser"), + AdminPassword: to.Ptr("TestPassword$0"), + LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + DisablePasswordAuthentication: to.Ptr(false), + }, + }, + NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + { + Name: to.Ptr("vmNameTest"), + Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + Primary: to.Ptr(true), + EnableAcceleratedNetworking: to.Ptr(false), + IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + { + Name: to.Ptr("vmNameTest"), + Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + Subnet: &armcomputefleet.APIEntityReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + }, + Primary: to.Ptr(true), + LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + }, + }, + }, + }, + }, + EnableIPForwarding: to.Ptr(true), + }, + }, + }, + }, + }, + ComputeAPIVersion: to.Ptr("2023-09-01"), + PlatformFaultDomainCount: to.Ptr[int32](1), + }, + }, + Tags: map[string]*string{ + "key": to.Ptr("fleets-test"), + }, + Location: to.Ptr("eastus2euap"), + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armcomputefleet.FleetsClientCreateOrUpdateResponse{ + // Fleet: &armcomputefleet.Fleet{ + // Properties: &armcomputefleet.FleetProperties{ + // ProvisioningState: to.Ptr(armcomputefleet.ProvisioningStateSucceeded), + // SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + // Capacity: to.Ptr[int32](2), + // MinCapacity: to.Ptr[int32](1), + // EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + // AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + // Maintain: to.Ptr(true), + // }, + // RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + // Capacity: to.Ptr[int32](2), + // MinCapacity: to.Ptr[int32](1), + // AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + // }, + // VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + // { + // Name: to.Ptr("Standard_D2s_v3"), + // }, + // { + // Name: to.Ptr("Standard_D4s_v3"), + // }, + // { + // Name: to.Ptr("Standard_E2s_v3"), + // }, + // }, + // ComputeProfile: &armcomputefleet.ComputeProfile{ + // BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + // StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + // ImageReference: &armcomputefleet.ImageReference{ + // Publisher: to.Ptr("canonical"), + // Offer: to.Ptr("0001-com-ubuntu-server-focal"), + // SKU: to.Ptr("20_04-lts-gen2"), + // Version: to.Ptr("latest"), + // }, + // OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + // Caching: to.Ptr(armcomputefleet.CachingTypesReadWrite), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // OSType: to.Ptr(armcomputefleet.OperatingSystemTypesLinux), + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // }, + // }, + // }, + // OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + // ComputerNamePrefix: to.Ptr("prefix"), + // AdminUsername: to.Ptr("azureuser"), + // LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + // DisablePasswordAuthentication: to.Ptr(false), + // }, + // }, + // NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + // NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + // { + // Name: to.Ptr("vmNameTest"), + // Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + // Primary: to.Ptr(true), + // EnableAcceleratedNetworking: to.Ptr(false), + // IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + // { + // Name: to.Ptr("vmNameTest"), + // Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + // Subnet: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + // }, + // Primary: to.Ptr(true), + // LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // }, + // }, + // }, + // EnableIPForwarding: to.Ptr(true), + // }, + // }, + // }, + // }, + // }, + // ComputeAPIVersion: to.Ptr("2023-09-01"), + // PlatformFaultDomainCount: to.Ptr[int32](1), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-10T00:16:34.8590555+00:00"); return t}()), + // UniqueID: to.Ptr("a2f7fabd-bbc2-4a20-afe1-49fdb3885a28"), + // }, + // Tags: map[string]*string{ + // "key": to.Ptr("fleets-test"), + // }, + // Location: to.Ptr("eastus2euap"), + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet"), + // Name: to.Ptr("testFleet"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets"), + // }, + // } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_Delete.json +func ExampleFleetsClient_BeginDelete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewFleetsClient().BeginDelete(ctx, "rgazurefleet", "testFleet", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + _, err = poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_Get.json +func ExampleFleetsClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewFleetsClient().Get(ctx, "rgazurefleet", "testFleet", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armcomputefleet.FleetsClientGetResponse{ + // Fleet: &armcomputefleet.Fleet{ + // Properties: &armcomputefleet.FleetProperties{ + // ProvisioningState: to.Ptr(armcomputefleet.ProvisioningStateCreating), + // SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // MaxPricePerVM: to.Ptr[float32](0.00865), + // EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + // AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + // Maintain: to.Ptr(true), + // }, + // RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + // }, + // VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + // { + // Name: to.Ptr("Standard_d1_v2"), + // Rank: to.Ptr[int32](19225), + // }, + // }, + // ComputeProfile: &armcomputefleet.ComputeProfile{ + // BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + // OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + // ComputerNamePrefix: to.Ptr("o"), + // AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + // WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + // ProvisionVMAgent: to.Ptr(true), + // EnableAutomaticUpdates: to.Ptr(true), + // TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + // AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + // { + // PassName: to.Ptr("OobeSystem"), + // ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + // SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + // }, + // }, + // PatchSettings: &armcomputefleet.PatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + // EnableHotpatching: to.Ptr(true), + // AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // WinRM: &armcomputefleet.WinRMConfiguration{ + // Listeners: []*armcomputefleet.WinRMListener{ + // { + // Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTP), + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // }, + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + // DisablePasswordAuthentication: to.Ptr(true), + // SSH: &armcomputefleet.SSHConfiguration{ + // PublicKeys: []*armcomputefleet.SSHPublicKey{ + // { + // Path: to.Ptr("kmqz"), + // KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + // }, + // }, + // }, + // ProvisionVMAgent: to.Ptr(true), + // PatchSettings: &armcomputefleet.LinuxPatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + // AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // Secrets: []*armcomputefleet.VaultSecretGroup{ + // { + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // VaultCertificates: []*armcomputefleet.VaultCertificate{ + // { + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + // }, + // }, + // }, + // }, + // AllowExtensionOperations: to.Ptr(true), + // RequireGuestProvisionSignal: to.Ptr(true), + // }, + // StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + // ImageReference: &armcomputefleet.ImageReference{ + // Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + // Offer: to.Ptr("isxgumkarlkomp"), + // SKU: to.Ptr("eojmppqcrnpmxirtp"), + // Version: to.Ptr("wvpcqefgtmqdgltiuz"), + // ExactVersion: to.Ptr("zjbntmiskjexlr"), + // SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + // CommunityGalleryImageID: to.Ptr("vlqe"), + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + // }, + // OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + // Name: to.Ptr("wfttw"), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + // Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + // Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + // }, + // DiskSizeGB: to.Ptr[int32](14), + // OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + // Image: &armcomputefleet.VirtualHardDisk{ + // URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + // }, + // VhdContainers: []*string{ + // to.Ptr("tkzcwddtinkfpnfklatw"), + // }, + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + // { + // Name: to.Ptr("eogiykmdmeikswxmigjws"), + // Lun: to.Ptr[int32](14), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiskSizeGB: to.Ptr[int32](6), + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DiskIOPSReadWrite: to.Ptr[int64](27), + // DiskMBpsReadWrite: to.Ptr[int64](2), + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // }, + // }, + // NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + // HealthProbe: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + // }, + // NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + // { + // Name: to.Ptr("i"), + // Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + // Primary: to.Ptr(true), + // EnableAcceleratedNetworking: to.Ptr(true), + // DisableTCPStateTracking: to.Ptr(true), + // EnableFpga: to.Ptr(true), + // NetworkSecurityGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + // }, + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + // DNSServers: []*string{ + // to.Ptr("nxmmfolhclsesu"), + // }, + // }, + // IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + // { + // Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + // Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + // Subnet: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + // }, + // Primary: to.Ptr(true), + // PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + // Name: to.Ptr("fvpqf"), + // Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + // IdleTimeoutInMinutes: to.Ptr[int32](9), + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + // DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + // DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + // }, + // IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + // { + // IPTagType: to.Ptr("sddgsoemnzgqizale"), + // Tag: to.Ptr("wufmhrjsakbiaetyara"), + // }, + // }, + // PublicIPPrefix: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + // }, + // PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // }, + // SKU: &armcomputefleet.PublicIPAddressSKU{ + // Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + // Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + // }, + // }, + // PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + // }, + // }, + // LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + // }, + // }, + // }, + // }, + // }, + // EnableIPForwarding: to.Ptr(true), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + // AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + // }, + // }, + // }, + // NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + // }, + // SecurityProfile: &armcomputefleet.SecurityProfile{ + // UefiSettings: &armcomputefleet.UefiSettings{ + // SecureBootEnabled: to.Ptr(true), + // VTpmEnabled: to.Ptr(true), + // }, + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + // EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + // }, + // ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + // Enabled: to.Ptr(true), + // Mode: to.Ptr(armcomputefleet.ModeAudit), + // KeyIncarnationID: to.Ptr[int32](20), + // }, + // }, + // DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + // BootDiagnostics: &armcomputefleet.BootDiagnostics{ + // Enabled: to.Ptr(true), + // StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + // }, + // }, + // ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + // Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + // { + // Name: to.Ptr("bndxuxx"), + // Type: to.Ptr("cmeam"), + // Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + // ForceUpdateTag: to.Ptr("yhgxw"), + // Publisher: to.Ptr("kpxtirxjfprhs"), + // Type: to.Ptr("pgjilctjjwaa"), + // TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + // AutoUpgradeMinorVersion: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // Settings: map[string]any{ + // }, + // ProvisioningState: to.Ptr("Succeeded"), + // ProvisionAfterExtensions: []*string{ + // to.Ptr("nftzosroolbcwmpupujzqwqe"), + // }, + // SuppressFailures: to.Ptr(true), + // ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + // SecretURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"), + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // }, + // }, + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"), + // }, + // }, + // ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + // }, + // LicenseType: to.Ptr("v"), + // ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + // TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + // NotBeforeTimeout: to.Ptr("iljppmmw"), + // Enable: to.Ptr(true), + // }, + // OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + // NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + // Enable: to.Ptr(true), + // }, + // }, + // UserData: to.Ptr("s"), + // CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + // CapacityReservationGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + // }, + // }, + // ApplicationProfile: &armcomputefleet.ApplicationProfile{ + // GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + // { + // Tags: to.Ptr("eyrqjbib"), + // Order: to.Ptr[int32](5), + // PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + // TreatFailureAsDeploymentFailure: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // }, + // }, + // }, + // HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + // VMSizeProperties: &armcomputefleet.VMSizeProperties{ + // VCPUsAvailable: to.Ptr[int32](16), + // VCPUsPerCore: to.Ptr[int32](23), + // }, + // }, + // ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + // }, + // SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + // ID: to.Ptr("mubredelfbshboaxrsxiajihahaa"), + // ExcludeExtensions: []*string{ + // to.Ptr("{securityPostureVMExtensionName}"), + // }, + // IsOverridable: to.Ptr(true), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // ComputeAPIVersion: to.Ptr("2023-07-01"), + // PlatformFaultDomainCount: to.Ptr[int32](1), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-10T00:16:34.8590555+00:00"); return t}()), + // UniqueID: to.Ptr("a2f7fabd-bbc2-4a20-afe1-49fdb3885a28"), + // }, + // Zones: []*string{ + // to.Ptr("zone1"), + // to.Ptr("zone2"), + // }, + // Identity: &armcomputefleet.ManagedServiceIdentity{ + // PrincipalID: to.Ptr("4d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // TenantID: to.Ptr("5d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{ + // "key9851": &armcomputefleet.UserAssignedIdentity{ + // PrincipalID: to.Ptr("6d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // ClientID: to.Ptr("7d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // }, + // }, + // }, + // Tags: map[string]*string{ + // "key3518": to.Ptr("luvrnuvsgdpbuofdskkcoqhfh"), + // }, + // Plan: &armcomputefleet.Plan{ + // Name: to.Ptr("jwgrcrnrtfoxn"), + // Publisher: to.Ptr("iozjbiqqckqm"), + // Product: to.Ptr("cgopbyvdyqikahwyxfpzwaqk"), + // PromotionCode: to.Ptr("naglezezplcaruqogtxnuizslqnnbr"), + // Version: to.Ptr("wa"), + // }, + // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet"), + // Name: to.Ptr("testFleet"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets"), + // SystemData: &armcomputefleet.SystemData{ + // CreatedBy: to.Ptr("rowegentrpoajsv"), + // CreatedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // LastModifiedBy: to.Ptr("edwuayhhaoepxzisfaqjhmrxjq"), + // LastModifiedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_ListByResourceGroup.json +func ExampleFleetsClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewFleetsClient().NewListByResourceGroupPager("rgazurefleet", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armcomputefleet.FleetsClientListByResourceGroupResponse{ + // FleetListResult: armcomputefleet.FleetListResult{ + // Value: []*armcomputefleet.Fleet{ + // { + // Properties: &armcomputefleet.FleetProperties{ + // ProvisioningState: to.Ptr(armcomputefleet.ProvisioningStateCreating), + // SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // MaxPricePerVM: to.Ptr[float32](0.00865), + // EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + // AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + // Maintain: to.Ptr(true), + // }, + // RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + // }, + // VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + // { + // Name: to.Ptr("Standard_d1_v2"), + // Rank: to.Ptr[int32](19225), + // }, + // }, + // ComputeProfile: &armcomputefleet.ComputeProfile{ + // BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + // OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + // ComputerNamePrefix: to.Ptr("o"), + // AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + // WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + // ProvisionVMAgent: to.Ptr(true), + // EnableAutomaticUpdates: to.Ptr(true), + // TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + // AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + // { + // PassName: to.Ptr("OobeSystem"), + // ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + // SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + // }, + // }, + // PatchSettings: &armcomputefleet.PatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + // EnableHotpatching: to.Ptr(true), + // AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // WinRM: &armcomputefleet.WinRMConfiguration{ + // Listeners: []*armcomputefleet.WinRMListener{ + // { + // Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTP), + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // }, + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + // DisablePasswordAuthentication: to.Ptr(true), + // SSH: &armcomputefleet.SSHConfiguration{ + // PublicKeys: []*armcomputefleet.SSHPublicKey{ + // { + // Path: to.Ptr("kmqz"), + // KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + // }, + // }, + // }, + // ProvisionVMAgent: to.Ptr(true), + // PatchSettings: &armcomputefleet.LinuxPatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + // AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // Secrets: []*armcomputefleet.VaultSecretGroup{ + // { + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // VaultCertificates: []*armcomputefleet.VaultCertificate{ + // { + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + // }, + // }, + // }, + // }, + // AllowExtensionOperations: to.Ptr(true), + // RequireGuestProvisionSignal: to.Ptr(true), + // }, + // StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + // ImageReference: &armcomputefleet.ImageReference{ + // Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + // Offer: to.Ptr("isxgumkarlkomp"), + // SKU: to.Ptr("eojmppqcrnpmxirtp"), + // Version: to.Ptr("wvpcqefgtmqdgltiuz"), + // ExactVersion: to.Ptr("zjbntmiskjexlr"), + // SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + // CommunityGalleryImageID: to.Ptr("vlqe"), + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + // }, + // OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + // Name: to.Ptr("wfttw"), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + // Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + // Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + // }, + // DiskSizeGB: to.Ptr[int32](14), + // OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + // Image: &armcomputefleet.VirtualHardDisk{ + // URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + // }, + // VhdContainers: []*string{ + // to.Ptr("tkzcwddtinkfpnfklatw"), + // }, + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + // { + // Name: to.Ptr("eogiykmdmeikswxmigjws"), + // Lun: to.Ptr[int32](14), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiskSizeGB: to.Ptr[int32](6), + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DiskIOPSReadWrite: to.Ptr[int64](27), + // DiskMBpsReadWrite: to.Ptr[int64](2), + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // }, + // }, + // NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + // HealthProbe: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + // }, + // NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + // { + // Name: to.Ptr("i"), + // Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + // Primary: to.Ptr(true), + // EnableAcceleratedNetworking: to.Ptr(true), + // DisableTCPStateTracking: to.Ptr(true), + // EnableFpga: to.Ptr(true), + // NetworkSecurityGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + // }, + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + // DNSServers: []*string{ + // to.Ptr("nxmmfolhclsesu"), + // }, + // }, + // IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + // { + // Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + // Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + // Subnet: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + // }, + // Primary: to.Ptr(true), + // PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + // Name: to.Ptr("fvpqf"), + // Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + // IdleTimeoutInMinutes: to.Ptr[int32](9), + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + // DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + // DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + // }, + // IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + // { + // IPTagType: to.Ptr("sddgsoemnzgqizale"), + // Tag: to.Ptr("wufmhrjsakbiaetyara"), + // }, + // }, + // PublicIPPrefix: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + // }, + // PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // }, + // SKU: &armcomputefleet.PublicIPAddressSKU{ + // Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + // Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + // }, + // }, + // PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + // }, + // }, + // LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + // }, + // }, + // }, + // }, + // }, + // EnableIPForwarding: to.Ptr(true), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + // AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + // }, + // }, + // }, + // NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + // }, + // SecurityProfile: &armcomputefleet.SecurityProfile{ + // UefiSettings: &armcomputefleet.UefiSettings{ + // SecureBootEnabled: to.Ptr(true), + // VTpmEnabled: to.Ptr(true), + // }, + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + // EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + // }, + // ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + // Enabled: to.Ptr(true), + // Mode: to.Ptr(armcomputefleet.ModeAudit), + // KeyIncarnationID: to.Ptr[int32](20), + // }, + // }, + // DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + // BootDiagnostics: &armcomputefleet.BootDiagnostics{ + // Enabled: to.Ptr(true), + // StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + // }, + // }, + // ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + // Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + // { + // Name: to.Ptr("bndxuxx"), + // Type: to.Ptr("cmeam"), + // Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + // ForceUpdateTag: to.Ptr("yhgxw"), + // Publisher: to.Ptr("kpxtirxjfprhs"), + // Type: to.Ptr("pgjilctjjwaa"), + // TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + // AutoUpgradeMinorVersion: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // Settings: map[string]any{ + // }, + // ProvisioningState: to.Ptr("Succeeded"), + // ProvisionAfterExtensions: []*string{ + // to.Ptr("nftzosroolbcwmpupujzqwqe"), + // }, + // SuppressFailures: to.Ptr(true), + // ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + // SecretURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"), + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // }, + // }, + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"), + // }, + // }, + // ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + // }, + // LicenseType: to.Ptr("v"), + // ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + // TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + // NotBeforeTimeout: to.Ptr("iljppmmw"), + // Enable: to.Ptr(true), + // }, + // OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + // NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + // Enable: to.Ptr(true), + // }, + // }, + // UserData: to.Ptr("s"), + // CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + // CapacityReservationGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + // }, + // }, + // ApplicationProfile: &armcomputefleet.ApplicationProfile{ + // GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + // { + // Tags: to.Ptr("eyrqjbib"), + // Order: to.Ptr[int32](5), + // PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + // TreatFailureAsDeploymentFailure: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // }, + // }, + // }, + // HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + // VMSizeProperties: &armcomputefleet.VMSizeProperties{ + // VCPUsAvailable: to.Ptr[int32](16), + // VCPUsPerCore: to.Ptr[int32](23), + // }, + // }, + // ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + // }, + // SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + // ID: to.Ptr("mubredelfbshboaxrsxiajihahaa"), + // ExcludeExtensions: []*string{ + // to.Ptr("{securityPostureVMExtensionName}"), + // }, + // IsOverridable: to.Ptr(true), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // ComputeAPIVersion: to.Ptr("2023-07-01"), + // PlatformFaultDomainCount: to.Ptr[int32](1), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-10T00:16:34.8590555+00:00"); return t}()), + // UniqueID: to.Ptr("a2f7fabd-bbc2-4a20-afe1-49fdb3885a28"), + // }, + // Zones: []*string{ + // to.Ptr("zone1"), + // to.Ptr("zone2"), + // }, + // Identity: &armcomputefleet.ManagedServiceIdentity{ + // PrincipalID: to.Ptr("4d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // TenantID: to.Ptr("5d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{ + // "key9851": &armcomputefleet.UserAssignedIdentity{ + // PrincipalID: to.Ptr("6d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // ClientID: to.Ptr("7d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // }, + // }, + // }, + // Plan: &armcomputefleet.Plan{ + // Name: to.Ptr("jwgrcrnrtfoxn"), + // Publisher: to.Ptr("iozjbiqqckqm"), + // Product: to.Ptr("cgopbyvdyqikahwyxfpzwaqk"), + // PromotionCode: to.Ptr("naglezezplcaruqogtxnuizslqnnbr"), + // Version: to.Ptr("wa"), + // }, + // Tags: map[string]*string{ + // "key3518": to.Ptr("luvrnuvsgdpbuofdskkcoqhfh"), + // }, + // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet"), + // Name: to.Ptr("testFleet"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets"), + // SystemData: &armcomputefleet.SystemData{ + // CreatedBy: to.Ptr("rowegentrpoajsv"), + // CreatedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // LastModifiedBy: to.Ptr("edwuayhhaoepxzisfaqjhmrxjq"), + // LastModifiedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_ListBySubscription.json +func ExampleFleetsClient_NewListBySubscriptionPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewFleetsClient().NewListBySubscriptionPager(nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armcomputefleet.FleetsClientListBySubscriptionResponse{ + // FleetListResult: armcomputefleet.FleetListResult{ + // Value: []*armcomputefleet.Fleet{ + // { + // Properties: &armcomputefleet.FleetProperties{ + // ProvisioningState: to.Ptr(armcomputefleet.ProvisioningStateCreating), + // SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // MaxPricePerVM: to.Ptr[float32](0.00865), + // EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + // AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + // Maintain: to.Ptr(true), + // }, + // RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + // }, + // VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + // { + // Name: to.Ptr("Standard_d1_v2"), + // Rank: to.Ptr[int32](19225), + // }, + // }, + // ComputeProfile: &armcomputefleet.ComputeProfile{ + // BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + // OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + // ComputerNamePrefix: to.Ptr("o"), + // AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + // WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + // ProvisionVMAgent: to.Ptr(true), + // EnableAutomaticUpdates: to.Ptr(true), + // TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + // AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + // { + // PassName: to.Ptr("OobeSystem"), + // ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + // SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + // }, + // }, + // PatchSettings: &armcomputefleet.PatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + // EnableHotpatching: to.Ptr(true), + // AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // WinRM: &armcomputefleet.WinRMConfiguration{ + // Listeners: []*armcomputefleet.WinRMListener{ + // { + // Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTP), + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // }, + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + // DisablePasswordAuthentication: to.Ptr(true), + // SSH: &armcomputefleet.SSHConfiguration{ + // PublicKeys: []*armcomputefleet.SSHPublicKey{ + // { + // Path: to.Ptr("kmqz"), + // KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + // }, + // }, + // }, + // ProvisionVMAgent: to.Ptr(true), + // PatchSettings: &armcomputefleet.LinuxPatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + // AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // Secrets: []*armcomputefleet.VaultSecretGroup{ + // { + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // VaultCertificates: []*armcomputefleet.VaultCertificate{ + // { + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + // }, + // }, + // }, + // }, + // AllowExtensionOperations: to.Ptr(true), + // RequireGuestProvisionSignal: to.Ptr(true), + // }, + // StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + // ImageReference: &armcomputefleet.ImageReference{ + // Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + // Offer: to.Ptr("isxgumkarlkomp"), + // SKU: to.Ptr("eojmppqcrnpmxirtp"), + // Version: to.Ptr("wvpcqefgtmqdgltiuz"), + // ExactVersion: to.Ptr("zjbntmiskjexlr"), + // SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + // CommunityGalleryImageID: to.Ptr("vlqe"), + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + // }, + // OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + // Name: to.Ptr("wfttw"), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + // Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + // Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + // }, + // DiskSizeGB: to.Ptr[int32](14), + // OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + // Image: &armcomputefleet.VirtualHardDisk{ + // URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + // }, + // VhdContainers: []*string{ + // to.Ptr("tkzcwddtinkfpnfklatw"), + // }, + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + // { + // Name: to.Ptr("eogiykmdmeikswxmigjws"), + // Lun: to.Ptr[int32](14), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiskSizeGB: to.Ptr[int32](6), + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DiskIOPSReadWrite: to.Ptr[int64](27), + // DiskMBpsReadWrite: to.Ptr[int64](2), + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // }, + // }, + // NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + // HealthProbe: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + // }, + // NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + // { + // Name: to.Ptr("i"), + // Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + // Primary: to.Ptr(true), + // EnableAcceleratedNetworking: to.Ptr(true), + // DisableTCPStateTracking: to.Ptr(true), + // EnableFpga: to.Ptr(true), + // NetworkSecurityGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + // }, + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + // DNSServers: []*string{ + // to.Ptr("nxmmfolhclsesu"), + // }, + // }, + // IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + // { + // Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + // Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + // Subnet: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + // }, + // Primary: to.Ptr(true), + // PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + // Name: to.Ptr("fvpqf"), + // Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + // IdleTimeoutInMinutes: to.Ptr[int32](9), + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + // DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + // DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + // }, + // IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + // { + // IPTagType: to.Ptr("sddgsoemnzgqizale"), + // Tag: to.Ptr("wufmhrjsakbiaetyara"), + // }, + // }, + // PublicIPPrefix: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + // }, + // PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // }, + // SKU: &armcomputefleet.PublicIPAddressSKU{ + // Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + // Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + // }, + // }, + // PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + // }, + // }, + // LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + // }, + // }, + // }, + // }, + // }, + // EnableIPForwarding: to.Ptr(true), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + // AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + // }, + // }, + // }, + // NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + // }, + // SecurityProfile: &armcomputefleet.SecurityProfile{ + // UefiSettings: &armcomputefleet.UefiSettings{ + // SecureBootEnabled: to.Ptr(true), + // VTpmEnabled: to.Ptr(true), + // }, + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + // EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + // }, + // ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + // Enabled: to.Ptr(true), + // Mode: to.Ptr(armcomputefleet.ModeAudit), + // KeyIncarnationID: to.Ptr[int32](20), + // }, + // }, + // DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + // BootDiagnostics: &armcomputefleet.BootDiagnostics{ + // Enabled: to.Ptr(true), + // StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + // }, + // }, + // ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + // Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + // { + // Name: to.Ptr("bndxuxx"), + // Type: to.Ptr("cmeam"), + // Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + // ForceUpdateTag: to.Ptr("yhgxw"), + // Publisher: to.Ptr("kpxtirxjfprhs"), + // Type: to.Ptr("pgjilctjjwaa"), + // TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + // AutoUpgradeMinorVersion: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // Settings: map[string]any{ + // }, + // ProvisioningState: to.Ptr("Succeeded"), + // ProvisionAfterExtensions: []*string{ + // to.Ptr("nftzosroolbcwmpupujzqwqe"), + // }, + // SuppressFailures: to.Ptr(true), + // ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + // SecretURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"), + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // }, + // }, + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"), + // }, + // }, + // ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + // }, + // LicenseType: to.Ptr("v"), + // ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + // TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + // NotBeforeTimeout: to.Ptr("iljppmmw"), + // Enable: to.Ptr(true), + // }, + // OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + // NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + // Enable: to.Ptr(true), + // }, + // }, + // UserData: to.Ptr("s"), + // CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + // CapacityReservationGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + // }, + // }, + // ApplicationProfile: &armcomputefleet.ApplicationProfile{ + // GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + // { + // Tags: to.Ptr("eyrqjbib"), + // Order: to.Ptr[int32](5), + // PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + // TreatFailureAsDeploymentFailure: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // }, + // }, + // }, + // HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + // VMSizeProperties: &armcomputefleet.VMSizeProperties{ + // VCPUsAvailable: to.Ptr[int32](16), + // VCPUsPerCore: to.Ptr[int32](23), + // }, + // }, + // ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + // }, + // SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + // ID: to.Ptr("mubredelfbshboaxrsxiajihahaa"), + // ExcludeExtensions: []*string{ + // to.Ptr("{securityPostureVMExtensionName}"), + // }, + // IsOverridable: to.Ptr(true), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // ComputeAPIVersion: to.Ptr("2023-07-01"), + // PlatformFaultDomainCount: to.Ptr[int32](1), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-10T00:16:34.8590555+00:00"); return t}()), + // UniqueID: to.Ptr("a2f7fabd-bbc2-4a20-afe1-49fdb3885a28"), + // }, + // Zones: []*string{ + // to.Ptr("zone1"), + // to.Ptr("zone2"), + // }, + // Identity: &armcomputefleet.ManagedServiceIdentity{ + // PrincipalID: to.Ptr("4d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // TenantID: to.Ptr("5d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{ + // "key9851": &armcomputefleet.UserAssignedIdentity{ + // PrincipalID: to.Ptr("6d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // ClientID: to.Ptr("7d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // }, + // }, + // }, + // Plan: &armcomputefleet.Plan{ + // Name: to.Ptr("jwgrcrnrtfoxn"), + // Publisher: to.Ptr("iozjbiqqckqm"), + // Product: to.Ptr("cgopbyvdyqikahwyxfpzwaqk"), + // PromotionCode: to.Ptr("naglezezplcaruqogtxnuizslqnnbr"), + // Version: to.Ptr("wa"), + // }, + // Tags: map[string]*string{ + // "key3518": to.Ptr("luvrnuvsgdpbuofdskkcoqhfh"), + // }, + // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet"), + // Name: to.Ptr("testFleet"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets"), + // SystemData: &armcomputefleet.SystemData{ + // CreatedBy: to.Ptr("rowegentrpoajsv"), + // CreatedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // LastModifiedBy: to.Ptr("edwuayhhaoepxzisfaqjhmrxjq"), + // LastModifiedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_ListVirtualMachineScaleSets.json +func ExampleFleetsClient_NewListVirtualMachineScaleSetsPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewFleetsClient().NewListVirtualMachineScaleSetsPager("rgazurefleet", "myFleet", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armcomputefleet.FleetsClientListVirtualMachineScaleSetsResponse{ + // VirtualMachineScaleSetListResult: armcomputefleet.VirtualMachineScaleSetListResult{ + // Value: []*armcomputefleet.VirtualMachineScaleSet{ + // { + // Name: to.Ptr("myVmss"), + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/myFleet/virtualMachineScaleSets/myVmss"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets/virtualMachineScaleSets"), + // OperationStatus: to.Ptr(armcomputefleet.ProvisioningStateCreating), + // Error: &armcomputefleet.APIError{ + // Details: []*armcomputefleet.APIErrorBase{ + // { + // Code: to.Ptr("gzhtOverconstrainedAllocationRequestyosk"), + // Target: to.Ptr("qfthabhrmndhfizfnrwpgxvnokpy"), + // Message: to.Ptr("Allocation Failed"), + // }, + // }, + // Innererror: &armcomputefleet.InnerError{ + // ExceptionType: to.Ptr("sfaomfpoaptnbxchrfskm"), + // ErrorDetail: to.Ptr("ihjwbwykq"), + // }, + // Code: to.Ptr("OverconstrainedAllocationRequest"), + // Target: to.Ptr("nhaj"), + // Message: to.Ptr("Allocation Failed"), + // }, + // }, + // }, + // }, + // } + } +} + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Fleets_Update.json +func ExampleFleetsClient_BeginUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("1DC2F28C-A625-4B0E-9748-9885A3C9E9EB", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewFleetsClient().BeginUpdate(ctx, "rgazurefleet", "testFleet", armcomputefleet.FleetUpdate{ + Identity: &armcomputefleet.ManagedServiceIdentityUpdate{ + Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{}, + }, + Tags: map[string]*string{}, + Properties: &armcomputefleet.FleetProperties{ + SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + Capacity: to.Ptr[int32](20), + MinCapacity: to.Ptr[int32](10), + MaxPricePerVM: to.Ptr[float32](0.00865), + EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + Maintain: to.Ptr(true), + }, + RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + Capacity: to.Ptr[int32](20), + MinCapacity: to.Ptr[int32](10), + AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + }, + VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + { + Name: to.Ptr("Standard_d1_v2"), + Rank: to.Ptr[int32](19225), + }, + }, + ComputeProfile: &armcomputefleet.ComputeProfile{ + BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + ComputerNamePrefix: to.Ptr("o"), + AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + AdminPassword: to.Ptr("adfbrdxpv"), + CustomData: to.Ptr("xjjib"), + WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + ProvisionVMAgent: to.Ptr(true), + EnableAutomaticUpdates: to.Ptr(true), + TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + { + PassName: to.Ptr("OobeSystem"), + ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + Content: to.Ptr("bubmqbxjkj"), + }, + }, + PatchSettings: &armcomputefleet.PatchSettings{ + PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + EnableHotpatching: to.Ptr(true), + AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + }, + }, + WinRM: &armcomputefleet.WinRMConfiguration{ + Listeners: []*armcomputefleet.WinRMListener{ + { + Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTP), + CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + }, + }, + }, + EnableVMAgentPlatformUpdates: to.Ptr(true), + }, + LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + DisablePasswordAuthentication: to.Ptr(true), + SSH: &armcomputefleet.SSHConfiguration{ + PublicKeys: []*armcomputefleet.SSHPublicKey{ + { + Path: to.Ptr("kmqz"), + KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + }, + }, + }, + ProvisionVMAgent: to.Ptr(true), + PatchSettings: &armcomputefleet.LinuxPatchSettings{ + PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + }, + }, + EnableVMAgentPlatformUpdates: to.Ptr(true), + }, + Secrets: []*armcomputefleet.VaultSecretGroup{ + { + SourceVault: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + }, + VaultCertificates: []*armcomputefleet.VaultCertificate{ + { + CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + }, + }, + }, + }, + AllowExtensionOperations: to.Ptr(true), + RequireGuestProvisionSignal: to.Ptr(true), + }, + StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + ImageReference: &armcomputefleet.ImageReference{ + Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + Offer: to.Ptr("isxgumkarlkomp"), + SKU: to.Ptr("eojmppqcrnpmxirtp"), + Version: to.Ptr("wvpcqefgtmqdgltiuz"), + SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + CommunityGalleryImageID: to.Ptr("vlqe"), + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + }, + OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + Name: to.Ptr("wfttw"), + Caching: to.Ptr(armcomputefleet.CachingTypesNone), + WriteAcceleratorEnabled: to.Ptr(true), + CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + }, + DiskSizeGB: to.Ptr[int32](14), + OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + Image: &armcomputefleet.VirtualHardDisk{ + URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + }, + VhdContainers: []*string{ + to.Ptr("tkzcwddtinkfpnfklatw"), + }, + ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + }, + }, + DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + }, + DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + { + Name: to.Ptr("eogiykmdmeikswxmigjws"), + Lun: to.Ptr[int32](14), + Caching: to.Ptr(armcomputefleet.CachingTypesNone), + WriteAcceleratorEnabled: to.Ptr(true), + CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + DiskSizeGB: to.Ptr[int32](6), + ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + }, + }, + DiskIOPSReadWrite: to.Ptr[int64](27), + DiskMBpsReadWrite: to.Ptr[int64](2), + DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + }, + }, + }, + NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + HealthProbe: &armcomputefleet.APIEntityReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + }, + NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + { + Name: to.Ptr("i"), + Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + Primary: to.Ptr(true), + EnableAcceleratedNetworking: to.Ptr(true), + DisableTCPStateTracking: to.Ptr(true), + EnableFpga: to.Ptr(true), + NetworkSecurityGroup: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + }, + DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + DNSServers: []*string{ + to.Ptr("nxmmfolhclsesu"), + }, + }, + IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + { + Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + Subnet: &armcomputefleet.APIEntityReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + }, + Primary: to.Ptr(true), + PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + Name: to.Ptr("fvpqf"), + Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + IdleTimeoutInMinutes: to.Ptr[int32](9), + DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + }, + IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + { + IPTagType: to.Ptr("sddgsoemnzgqizale"), + Tag: to.Ptr("wufmhrjsakbiaetyara"), + }, + }, + PublicIPPrefix: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + }, + PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + }, + SKU: &armcomputefleet.PublicIPAddressSKU{ + Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + }, + }, + PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + }, + }, + ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + }, + }, + LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + }, + }, + LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + { + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + }, + }, + }, + }, + }, + EnableIPForwarding: to.Ptr(true), + DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + }, + }, + }, + NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + }, + SecurityProfile: &armcomputefleet.SecurityProfile{ + UefiSettings: &armcomputefleet.UefiSettings{ + SecureBootEnabled: to.Ptr(true), + VTpmEnabled: to.Ptr(true), + }, + EncryptionAtHost: to.Ptr(true), + SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + }, + ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + Enabled: to.Ptr(true), + Mode: to.Ptr(armcomputefleet.ModeAudit), + KeyIncarnationID: to.Ptr[int32](20), + }, + }, + DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + BootDiagnostics: &armcomputefleet.BootDiagnostics{ + Enabled: to.Ptr(true), + StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + }, + }, + ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + { + Name: to.Ptr("bndxuxx"), + Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + ForceUpdateTag: to.Ptr("yhgxw"), + Publisher: to.Ptr("kpxtirxjfprhs"), + Type: to.Ptr("pgjilctjjwaa"), + TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + AutoUpgradeMinorVersion: to.Ptr(true), + EnableAutomaticUpgrade: to.Ptr(true), + Settings: map[string]any{}, + ProtectedSettings: map[string]any{}, + ProvisionAfterExtensions: []*string{ + to.Ptr("nftzosroolbcwmpupujzqwqe"), + }, + SuppressFailures: to.Ptr(true), + ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + SecretURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"), + SourceVault: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + }, + }, + }, + }, + }, + ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + }, + LicenseType: to.Ptr("v"), + ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + NotBeforeTimeout: to.Ptr("iljppmmw"), + Enable: to.Ptr(true), + }, + OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + Enable: to.Ptr(true), + }, + }, + UserData: to.Ptr("s"), + CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + CapacityReservationGroup: &armcomputefleet.SubResource{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + }, + }, + ApplicationProfile: &armcomputefleet.ApplicationProfile{ + GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + { + Tags: to.Ptr("eyrqjbib"), + Order: to.Ptr[int32](5), + PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + ConfigurationReference: to.Ptr("ulztmiavpojpbpbddgnuuiimxcpau"), + TreatFailureAsDeploymentFailure: to.Ptr(true), + EnableAutomaticUpgrade: to.Ptr(true), + }, + }, + }, + HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + VMSizeProperties: &armcomputefleet.VMSizeProperties{ + VCPUsAvailable: to.Ptr[int32](16), + VCPUsPerCore: to.Ptr[int32](23), + }, + }, + ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + }, + SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + ID: to.Ptr("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"), + ExcludeExtensions: []*string{ + to.Ptr("{securityPostureVMExtensionName}"), + }, + IsOverridable: to.Ptr(true), + }, + }, + ComputeAPIVersion: to.Ptr("2023-07-01"), + PlatformFaultDomainCount: to.Ptr[int32](1), + }, + }, + Plan: &armcomputefleet.ResourcePlanUpdate{ + Name: to.Ptr("jwgrcrnrtfoxn"), + Publisher: to.Ptr("iozjbiqqckqm"), + Product: to.Ptr("cgopbyvdyqikahwyxfpzwaqk"), + PromotionCode: to.Ptr("naglezezplcaruqogtxnuizslqnnbr"), + Version: to.Ptr("wa"), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armcomputefleet.FleetsClientUpdateResponse{ + // Fleet: &armcomputefleet.Fleet{ + // Properties: &armcomputefleet.FleetProperties{ + // SpotPriorityProfile: &armcomputefleet.SpotPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // MaxPricePerVM: to.Ptr[float32](0.00865), + // EvictionPolicy: to.Ptr(armcomputefleet.EvictionPolicyDelete), + // AllocationStrategy: to.Ptr(armcomputefleet.SpotAllocationStrategyPriceCapacityOptimized), + // Maintain: to.Ptr(true), + // }, + // RegularPriorityProfile: &armcomputefleet.RegularPriorityProfile{ + // Capacity: to.Ptr[int32](20), + // MinCapacity: to.Ptr[int32](10), + // AllocationStrategy: to.Ptr(armcomputefleet.RegularPriorityAllocationStrategyLowestPrice), + // }, + // VMSizesProfile: []*armcomputefleet.VMSizeProfile{ + // { + // Name: to.Ptr("Standard_d1_v2"), + // Rank: to.Ptr[int32](19225), + // }, + // }, + // ComputeProfile: &armcomputefleet.ComputeProfile{ + // BaseVirtualMachineProfile: &armcomputefleet.BaseVirtualMachineProfile{ + // OSProfile: &armcomputefleet.VirtualMachineScaleSetOSProfile{ + // ComputerNamePrefix: to.Ptr("o"), + // AdminUsername: to.Ptr("nrgzqciiaaxjrqldbmjbqkyhntp"), + // WindowsConfiguration: &armcomputefleet.WindowsConfiguration{ + // ProvisionVMAgent: to.Ptr(true), + // EnableAutomaticUpdates: to.Ptr(true), + // TimeZone: to.Ptr("hlyjiqcfksgrpjrct"), + // AdditionalUnattendContent: []*armcomputefleet.AdditionalUnattendContent{ + // { + // PassName: to.Ptr("OobeSystem"), + // ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"), + // SettingName: to.Ptr(armcomputefleet.SettingNamesAutoLogon), + // }, + // }, + // PatchSettings: &armcomputefleet.PatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.WindowsVMGuestPatchModeManual), + // EnableHotpatching: to.Ptr(true), + // AssessmentMode: to.Ptr(armcomputefleet.WindowsPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // WinRM: &armcomputefleet.WinRMConfiguration{ + // Listeners: []*armcomputefleet.WinRMListener{ + // { + // Protocol: to.Ptr(armcomputefleet.ProtocolTypesHTTP), + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // }, + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // LinuxConfiguration: &armcomputefleet.LinuxConfiguration{ + // DisablePasswordAuthentication: to.Ptr(true), + // SSH: &armcomputefleet.SSHConfiguration{ + // PublicKeys: []*armcomputefleet.SSHPublicKey{ + // { + // Path: to.Ptr("kmqz"), + // KeyData: to.Ptr("kivgsubusvpprwqaqpjcmhsv"), + // }, + // }, + // }, + // ProvisionVMAgent: to.Ptr(true), + // PatchSettings: &armcomputefleet.LinuxPatchSettings{ + // PatchMode: to.Ptr(armcomputefleet.LinuxVMGuestPatchModeImageDefault), + // AssessmentMode: to.Ptr(armcomputefleet.LinuxPatchAssessmentModeImageDefault), + // AutomaticByPlatformSettings: &armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformSettings{ + // RebootSetting: to.Ptr(armcomputefleet.LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown), + // BypassPlatformSafetyChecksOnUserSchedule: to.Ptr(true), + // }, + // }, + // EnableVMAgentPlatformUpdates: to.Ptr(true), + // }, + // Secrets: []*armcomputefleet.VaultSecretGroup{ + // { + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // VaultCertificates: []*armcomputefleet.VaultCertificate{ + // { + // CertificateURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/myCertName"), + // CertificateStore: to.Ptr("nlxrwavpzhueffxsshlun"), + // }, + // }, + // }, + // }, + // AllowExtensionOperations: to.Ptr(true), + // RequireGuestProvisionSignal: to.Ptr(true), + // }, + // StorageProfile: &armcomputefleet.VirtualMachineScaleSetStorageProfile{ + // ImageReference: &armcomputefleet.ImageReference{ + // Publisher: to.Ptr("mqxgwbiyjzmxavhbkd"), + // Offer: to.Ptr("isxgumkarlkomp"), + // SKU: to.Ptr("eojmppqcrnpmxirtp"), + // Version: to.Ptr("wvpcqefgtmqdgltiuz"), + // SharedGalleryImageID: to.Ptr("kmkgihoxwlawuuhcinfirktdwkmx"), + // CommunityGalleryImageID: to.Ptr("vlqe"), + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + // ExactVersion: to.Ptr("zjbntmiskjexlr"), + // }, + // OSDisk: &armcomputefleet.VirtualMachineScaleSetOSDisk{ + // Name: to.Ptr("wfttw"), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiffDiskSettings: &armcomputefleet.DiffDiskSettings{ + // Option: to.Ptr(armcomputefleet.DiffDiskOptionsLocal), + // Placement: to.Ptr(armcomputefleet.DiffDiskPlacementCacheDisk), + // }, + // DiskSizeGB: to.Ptr[int32](14), + // OSType: to.Ptr(armcomputefleet.OperatingSystemTypesWindows), + // Image: &armcomputefleet.VirtualHardDisk{ + // URI: to.Ptr("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + // }, + // VhdContainers: []*string{ + // to.Ptr("tkzcwddtinkfpnfklatw"), + // }, + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // DataDisks: []*armcomputefleet.VirtualMachineScaleSetDataDisk{ + // { + // Name: to.Ptr("eogiykmdmeikswxmigjws"), + // Lun: to.Ptr[int32](14), + // Caching: to.Ptr(armcomputefleet.CachingTypesNone), + // WriteAcceleratorEnabled: to.Ptr(true), + // CreateOption: to.Ptr(armcomputefleet.DiskCreateOptionTypesFromImage), + // DiskSizeGB: to.Ptr[int32](6), + // ManagedDisk: &armcomputefleet.VirtualMachineScaleSetManagedDiskParameters{ + // StorageAccountType: to.Ptr(armcomputefleet.StorageAccountTypesStandardLRS), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // SecurityProfile: &armcomputefleet.VMDiskSecurityProfile{ + // SecurityEncryptionType: to.Ptr(armcomputefleet.SecurityEncryptionTypesVMGuestStateOnly), + // DiskEncryptionSet: &armcomputefleet.DiskEncryptionSetParameters{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + // }, + // }, + // }, + // DiskIOPSReadWrite: to.Ptr[int64](27), + // DiskMBpsReadWrite: to.Ptr[int64](2), + // DeleteOption: to.Ptr(armcomputefleet.DiskDeleteOptionTypesDelete), + // }, + // }, + // }, + // NetworkProfile: &armcomputefleet.VirtualMachineScaleSetNetworkProfile{ + // HealthProbe: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + // }, + // NetworkInterfaceConfigurations: []*armcomputefleet.VirtualMachineScaleSetNetworkConfiguration{ + // { + // Name: to.Ptr("i"), + // Properties: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationProperties{ + // Primary: to.Ptr(true), + // EnableAcceleratedNetworking: to.Ptr(true), + // DisableTCPStateTracking: to.Ptr(true), + // EnableFpga: to.Ptr(true), + // NetworkSecurityGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), + // }, + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetNetworkConfigurationDNSSettings{ + // DNSServers: []*string{ + // to.Ptr("nxmmfolhclsesu"), + // }, + // }, + // IPConfigurations: []*armcomputefleet.VirtualMachineScaleSetIPConfiguration{ + // { + // Name: to.Ptr("oezqhkidfhyywlfzwuotilrpbqnjg"), + // Properties: &armcomputefleet.VirtualMachineScaleSetIPConfigurationProperties{ + // Subnet: &armcomputefleet.APIEntityReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), + // }, + // Primary: to.Ptr(true), + // PublicIPAddressConfiguration: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfiguration{ + // Name: to.Ptr("fvpqf"), + // Properties: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{ + // IdleTimeoutInMinutes: to.Ptr[int32](9), + // DNSSettings: &armcomputefleet.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{ + // DomainNameLabel: to.Ptr("ukrddzvmorpmfsczjwtbvp"), + // DomainNameLabelScope: to.Ptr(armcomputefleet.DomainNameLabelScopeTypesTenantReuse), + // }, + // IPTags: []*armcomputefleet.VirtualMachineScaleSetIPTag{ + // { + // IPTagType: to.Ptr("sddgsoemnzgqizale"), + // Tag: to.Ptr("wufmhrjsakbiaetyara"), + // }, + // }, + // PublicIPPrefix: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), + // }, + // PublicIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // }, + // SKU: &armcomputefleet.PublicIPAddressSKU{ + // Name: to.Ptr(armcomputefleet.PublicIPAddressSKUNameBasic), + // Tier: to.Ptr(armcomputefleet.PublicIPAddressSKUTierRegional), + // }, + // }, + // PrivateIPAddressVersion: to.Ptr(armcomputefleet.IPVersionIPv4), + // ApplicationGatewayBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // ApplicationSecurityGroups: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), + // }, + // }, + // LoadBalancerBackendAddressPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), + // }, + // }, + // LoadBalancerInboundNatPools: []*armcomputefleet.SubResource{ + // { + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), + // }, + // }, + // }, + // }, + // }, + // EnableIPForwarding: to.Ptr(true), + // DeleteOption: to.Ptr(armcomputefleet.DeleteOptionsDelete), + // AuxiliaryMode: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliaryModeNone), + // AuxiliarySKU: to.Ptr(armcomputefleet.NetworkInterfaceAuxiliarySKUNone), + // }, + // }, + // }, + // NetworkAPIVersion: to.Ptr(armcomputefleet.NetworkAPIVersionV20201101), + // }, + // SecurityProfile: &armcomputefleet.SecurityProfile{ + // UefiSettings: &armcomputefleet.UefiSettings{ + // SecureBootEnabled: to.Ptr(true), + // VTpmEnabled: to.Ptr(true), + // }, + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr(armcomputefleet.SecurityTypesTrustedLaunch), + // EncryptionIdentity: &armcomputefleet.EncryptionIdentity{ + // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + // }, + // ProxyAgentSettings: &armcomputefleet.ProxyAgentSettings{ + // Enabled: to.Ptr(true), + // Mode: to.Ptr(armcomputefleet.ModeAudit), + // KeyIncarnationID: to.Ptr[int32](20), + // }, + // }, + // DiagnosticsProfile: &armcomputefleet.DiagnosticsProfile{ + // BootDiagnostics: &armcomputefleet.BootDiagnostics{ + // Enabled: to.Ptr(true), + // StorageURI: to.Ptr("http://myStorageAccountName.blob.core.windows.net"), + // }, + // }, + // ExtensionProfile: &armcomputefleet.VirtualMachineScaleSetExtensionProfile{ + // Extensions: []*armcomputefleet.VirtualMachineScaleSetExtension{ + // { + // Name: to.Ptr("bndxuxx"), + // Properties: &armcomputefleet.VirtualMachineScaleSetExtensionProperties{ + // ForceUpdateTag: to.Ptr("yhgxw"), + // Publisher: to.Ptr("kpxtirxjfprhs"), + // Type: to.Ptr("pgjilctjjwaa"), + // TypeHandlerVersion: to.Ptr("zevivcoilxmbwlrihhhibq"), + // AutoUpgradeMinorVersion: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // ProvisionAfterExtensions: []*string{ + // to.Ptr("nftzosroolbcwmpupujzqwqe"), + // }, + // SuppressFailures: to.Ptr(true), + // ProtectedSettingsFromKeyVault: &armcomputefleet.KeyVaultSecretReference{ + // SecretURL: to.Ptr("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"), + // SourceVault: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), + // }, + // }, + // Settings: map[string]any{ + // }, + // ProvisioningState: to.Ptr("Succeeded"), + // }, + // Type: to.Ptr("cmeam"), + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"), + // }, + // }, + // ExtensionsTimeBudget: to.Ptr("mbhjahtdygwgyszdwjtvlvtgchdwil"), + // }, + // LicenseType: to.Ptr("v"), + // ScheduledEventsProfile: &armcomputefleet.ScheduledEventsProfile{ + // TerminateNotificationProfile: &armcomputefleet.TerminateNotificationProfile{ + // NotBeforeTimeout: to.Ptr("iljppmmw"), + // Enable: to.Ptr(true), + // }, + // OSImageNotificationProfile: &armcomputefleet.OSImageNotificationProfile{ + // NotBeforeTimeout: to.Ptr("olbpadmevekyczfokodtfprxti"), + // Enable: to.Ptr(true), + // }, + // }, + // UserData: to.Ptr("s"), + // CapacityReservation: &armcomputefleet.CapacityReservationProfile{ + // CapacityReservationGroup: &armcomputefleet.SubResource{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + // }, + // }, + // ApplicationProfile: &armcomputefleet.ApplicationProfile{ + // GalleryApplications: []*armcomputefleet.VMGalleryApplication{ + // { + // Tags: to.Ptr("eyrqjbib"), + // Order: to.Ptr[int32](5), + // PackageReferenceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}"), + // TreatFailureAsDeploymentFailure: to.Ptr(true), + // EnableAutomaticUpgrade: to.Ptr(true), + // }, + // }, + // }, + // HardwareProfile: &armcomputefleet.VirtualMachineScaleSetHardwareProfile{ + // VMSizeProperties: &armcomputefleet.VMSizeProperties{ + // VCPUsAvailable: to.Ptr[int32](16), + // VCPUsPerCore: to.Ptr[int32](23), + // }, + // }, + // ServiceArtifactReference: &armcomputefleet.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + // }, + // SecurityPostureReference: &armcomputefleet.SecurityPostureReference{ + // ID: to.Ptr("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"), + // ExcludeExtensions: []*string{ + // to.Ptr("{securityPostureVMExtensionName}"), + // }, + // IsOverridable: to.Ptr(true), + // }, + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // ComputeAPIVersion: to.Ptr("2023-07-01"), + // PlatformFaultDomainCount: to.Ptr[int32](1), + // }, + // ProvisioningState: to.Ptr(armcomputefleet.ProvisioningStateCreating), + // TimeCreated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-10T00:16:34.8590555+00:00"); return t}()), + // UniqueID: to.Ptr("a2f7fabd-bbc2-4a20-afe1-49fdb3885a28"), + // }, + // Zones: []*string{ + // to.Ptr("zone1"), + // to.Ptr("zone2"), + // }, + // Identity: &armcomputefleet.ManagedServiceIdentity{ + // Type: to.Ptr(armcomputefleet.ManagedServiceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armcomputefleet.UserAssignedIdentity{ + // }, + // PrincipalID: to.Ptr("4d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // TenantID: to.Ptr("5d508e5b-374b-4382-9a1c-01fb8b6cb37c"), + // }, + // Tags: map[string]*string{ + // }, + // Location: to.Ptr("westus"), + // Plan: &armcomputefleet.Plan{ + // Name: to.Ptr("uapfngmdekvpgjhomthtpxjfdmmll"), + // Publisher: to.Ptr("aqhles"), + // Product: to.Ptr("bfzbkdnbexmedxdc"), + // PromotionCode: to.Ptr("gspehogwfjxirz"), + // Version: to.Ptr("yza"), + // }, + // ID: to.Ptr("/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet"), + // Name: to.Ptr("testFleet"), + // Type: to.Ptr("Microsoft.AzureFleet/fleets"), + // SystemData: &armcomputefleet.SystemData{ + // CreatedBy: to.Ptr("rowegentrpoajsv"), + // CreatedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // LastModifiedBy: to.Ptr("edwuayhhaoepxzisfaqjhmrxjq"), + // LastModifiedByType: to.Ptr(armcomputefleet.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-04-29T21:51:44.043Z"); return t}()), + // }, + // }, + // } +} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/go.mod b/sdk/resourcemanager/computefleet/armcomputefleet/go.mod index 25682f2d21..43724ff7ef 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/go.mod +++ b/sdk/resourcemanager/computefleet/armcomputefleet/go.mod @@ -2,10 +2,20 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcom go 1.18 -require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 +require ( + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 +) require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect ) diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/go.sum b/sdk/resourcemanager/computefleet/armcomputefleet/go.sum index 917448a001..09d275cb9a 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/go.sum +++ b/sdk/resourcemanager/computefleet/armcomputefleet/go.sum @@ -1,12 +1,29 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/models.go b/sdk/resourcemanager/computefleet/armcomputefleet/models.go index ea1a4e47e6..caf2d6bf43 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 b84ea4b3cb..df1f633679 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 952cb88451..e6f217fbf1 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/operations_client_example_test.go b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go new file mode 100644 index 0000000000..ebaf90ea85 --- /dev/null +++ b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. + +package armcomputefleet_test + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" + "log" +) + +// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Operations_List.json +func ExampleOperationsClient_NewListPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcomputefleet.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewOperationsClient().NewListPager(nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armcomputefleet.OperationsClientListResponse{ + // OperationListResult: armcomputefleet.OperationListResult{ + // Value: []*armcomputefleet.Operation{ + // { + // Origin: to.Ptr(armcomputefleet.OriginUserSystem), + // Name: to.Ptr("Microsoft.AzureFleet/fleets/read"), + // IsDataAction: to.Ptr(false), + // Display: &armcomputefleet.OperationDisplay{ + // Provider: to.Ptr("Microsoft Azure Fleet"), + // Resource: to.Ptr("Fleets"), + // Operation: to.Ptr("Get Azure Fleet"), + // Description: to.Ptr("Get properties of Azure Fleet resource"), + // }, + // }, + // { + // Origin: to.Ptr(armcomputefleet.OriginUserSystem), + // Name: to.Ptr("Microsoft.AzureFleet/fleets/write"), + // IsDataAction: to.Ptr(false), + // Display: &armcomputefleet.OperationDisplay{ + // Provider: to.Ptr("Microsoft Azure Fleet"), + // Resource: to.Ptr("Fleets"), + // Operation: to.Ptr("Create or Update Azure Fleet"), + // Description: to.Ptr("Creates a new Azure Fleet resource or updates an existing one"), + // }, + // }, + // { + // Origin: to.Ptr(armcomputefleet.OriginUserSystem), + // Name: to.Ptr("Microsoft.AzureFleet/fleets/delete"), + // IsDataAction: to.Ptr(false), + // Display: &armcomputefleet.OperationDisplay{ + // Provider: to.Ptr("Microsoft Azure Fleet"), + // Resource: to.Ptr("Fleets"), + // Operation: to.Ptr("Delete Virtual Machine and Virtual Machine scale sets in a Azure Fleet resource"), + // Description: to.Ptr("Deletes all compute resources of Azure Fleet resource"), + // }, + // }, + // { + // Origin: to.Ptr(armcomputefleet.OriginUserSystem), + // Name: to.Ptr("Microsoft.AzureFleet/register/action"), + // IsDataAction: to.Ptr(false), + // Display: &armcomputefleet.OperationDisplay{ + // Provider: to.Ptr("Microsoft Azure Fleet"), + // Resource: to.Ptr("Subscription"), + // Operation: to.Ptr("Register subscription for Microsoft.AzureFleet"), + // Description: to.Ptr("Registers Subscription with Microsoft.AzureFleet resource provider"), + // }, + // }, + // { + // Origin: to.Ptr(armcomputefleet.OriginUserSystem), + // Name: to.Ptr("Microsoft.AzureFleet/unregister/action"), + // IsDataAction: to.Ptr(false), + // Display: &armcomputefleet.OperationDisplay{ + // Provider: to.Ptr("Microsoft Azure Fleet"), + // Resource: to.Ptr("Subscription"), + // Operation: to.Ptr("Unregister Subscription for Microsoft.AzureFleet"), + // Description: to.Ptr("Unregisters Subscription with Microsoft.AzureFleet resource provider"), + // }, + // }, + // }, + // }, + // } + } +} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml b/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml index f264786241..c8d950e137 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 +commit: c120171b3684d88562fa26ae7db5d22b7bfa95d8 repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: