diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md index d91bbac6cf58..cad0ccf42838 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md +++ b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md @@ -1,5 +1,27 @@ # Release History +## 2.0.0 (2025-08-19) +### Breaking Changes + +- `ManagedServiceIdentityTypeSystemAndUserAssigned` from enum `ManagedServiceIdentityType` has been removed +- Field `Name` of struct `VirtualMachineScaleSet` has been removed + +### Features Added + +- New value `ManagedServiceIdentityTypeSystemAssignedUserAssigned` added to enum type `ManagedServiceIdentityType` +- New enum type `CapacityType` with values `CapacityTypeVCPU`, `CapacityTypeVM` +- New enum type `FleetMode` with values `FleetModeInstance`, `FleetModeManaged` +- New enum type `VMOperationStatus` with values `VMOperationStatusCancelFailedStatusUnknown`, `VMOperationStatusCanceled`, `VMOperationStatusCreating`, `VMOperationStatusFailed`, `VMOperationStatusSucceeded` +- New enum type `ZoneDistributionStrategy` with values `ZoneDistributionStrategyBestEffortSingleZone`, `ZoneDistributionStrategyPrioritized` +- New function `*FleetsClient.BeginCancel(context.Context, string, string, *FleetsClientBeginCancelOptions) (*runtime.Poller[FleetsClientCancelResponse], error)` +- New function `*FleetsClient.NewListVirtualMachinesPager(string, string, *FleetsClientListVirtualMachinesOptions) *runtime.Pager[FleetsClientListVirtualMachinesResponse]` +- New struct `VirtualMachine` +- New struct `VirtualMachineListResult` +- New struct `ZoneAllocationPolicy` +- New struct `ZonePreference` +- New field `CapacityType`, `DisplayName`, `Mode`, `UpdatedBy`, `ZoneAllocationPolicy` in struct `FleetProperties` + + ## 1.0.0 (2024-10-22) ### Breaking Changes diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/README.md b/sdk/resourcemanager/computefleet/armcomputefleet/README.md index 92d31274c769..6ee68315561b 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/README.md +++ b/sdk/resourcemanager/computefleet/armcomputefleet/README.md @@ -18,7 +18,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve Install the Azure Compute Fleet module: ```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2 ``` ## Authorization diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/constants.go b/sdk/resourcemanager/computefleet/armcomputefleet/constants.go index 9a5b1d23be3c..4a9e266aa0c3 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/constants.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/constants.go @@ -4,11 +4,6 @@ package armcomputefleet -const ( - moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" - moduleVersion = "v1.0.0" -) - // AcceleratorManufacturer - Accelerator manufacturers supported by Azure VMs. type AcceleratorManufacturer string @@ -126,6 +121,27 @@ func PossibleCachingTypesValues() []CachingTypes { } } +// CapacityType - Capacity types for Compute Fleet. +type CapacityType string + +const ( + // CapacityTypeVCPU - VCpu is the capacity type for Compute Fleet where Fleet capacity is provisioned in terms of VCpus. + // If VCpu capacity is not exactly divisible by VCpu count in VMSizes, Fleet capacity in VCpus will be overprovisioned by + // default. + CapacityTypeVCPU CapacityType = "VCpu" + // CapacityTypeVM - Default. VM is the default capacity type for Compute Fleet where Fleet capacity is provisioned in terms + // of VMs. + CapacityTypeVM CapacityType = "VM" +) + +// PossibleCapacityTypeValues returns the possible values for the CapacityType const type. +func PossibleCapacityTypeValues() []CapacityType { + return []CapacityType{ + CapacityTypeVCPU, + CapacityTypeVM, + } +} + // CreatedByType - The kind of entity that created the resource. type CreatedByType string @@ -188,9 +204,9 @@ func PossibleDiffDiskOptionsValues() []DiffDiskOptions { // resource disk space for Ephemeral OS disk provisioning. For more information on // Ephemeral OS disk size requirements, please refer Ephemeral OS disk size // requirements for Windows VM at -// https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements +// https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements // and Linux VM at -// https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements +// https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements // Minimum api-version for NvmeDisk: 2024-03-01. type DiffDiskPlacement string @@ -215,10 +231,10 @@ func PossibleDiffDiskPlacementValues() []DiffDiskPlacement { // DiskControllerTypes - Specifies the disk controller type configured for the VM and // VirtualMachineScaleSet. This property is only supported for virtual machines // whose operating system disk and VM sku supports Generation 2 -// (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please +// (https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please // check the HyperVGenerations capability returned as part of VM sku capabilities // in the response of Microsoft.Compute SKUs api for the region contains V2 -// (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more +// (https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more // information about Disk Controller Types supported please refer to // https://aka.ms/azure-diskcontrollertypes. type DiskControllerTypes string @@ -336,6 +352,24 @@ func PossibleEvictionPolicyValues() []EvictionPolicy { } } +// FleetMode - Modes for Compute Fleet. +type FleetMode string + +const ( + // FleetModeInstance - Instance mode for Compute Fleet will directly provision VM instances. + FleetModeInstance FleetMode = "Instance" + // FleetModeManaged - Default. Managed is the default mode for Compute Fleet where VMs are provisioned via VMSS. + FleetModeManaged FleetMode = "Managed" +) + +// PossibleFleetModeValues returns the possible values for the FleetMode const type. +func PossibleFleetModeValues() []FleetMode { + return []FleetMode{ + FleetModeInstance, + FleetModeManaged, + } +} + // IPVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the // specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible // values are: 'IPv4' and 'IPv6'. @@ -449,10 +483,10 @@ type ManagedServiceIdentityType string const ( // ManagedServiceIdentityTypeNone - No managed identity. ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" - // ManagedServiceIdentityTypeSystemAndUserAssigned - System and user assigned managed identity. - ManagedServiceIdentityTypeSystemAndUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" // ManagedServiceIdentityTypeSystemAssigned - System assigned managed identity. ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + // ManagedServiceIdentityTypeSystemAssignedUserAssigned - System and user assigned managed identity. + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" // ManagedServiceIdentityTypeUserAssigned - User assigned managed identity. ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" ) @@ -461,8 +495,8 @@ const ( func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { return []ManagedServiceIdentityType{ ManagedServiceIdentityTypeNone, - ManagedServiceIdentityTypeSystemAndUserAssigned, ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, ManagedServiceIdentityTypeUserAssigned, } } @@ -799,9 +833,9 @@ func PossibleSpotAllocationStrategyValues() []SpotAllocationStrategy { // zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant // storage. For more information regarding disks supported for Windows Virtual // Machines, refer to -// https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for +// https://learn.microsoft.com/azure/virtual-machines/windows/disks-types and, for // Linux Virtual Machines, refer to -// https://docs.microsoft.com/azure/virtual-machines/linux/disks-types +// https://learn.microsoft.com/azure/virtual-machines/linux/disks-types type StorageAccountTypes string const ( @@ -903,6 +937,36 @@ func PossibleVMCategoryValues() []VMCategory { } } +// VMOperationStatus - Virtual Machine operation status values. +type VMOperationStatus string + +const ( + // VMOperationStatusCancelFailedStatusUnknown - Indicates that the cancellation request could not be applied because the virtual + // machine had already been created. + VMOperationStatusCancelFailedStatusUnknown VMOperationStatus = "CancelFailedStatusUnknown" + // VMOperationStatusCanceled - Indicates that the cancellation request was successful because the virtual machine had not + // been created yet. + VMOperationStatusCanceled VMOperationStatus = "Canceled" + // VMOperationStatusCreating - Indicates that the virtual machine is either in the process of being created or is scheduled + // to be created. + VMOperationStatusCreating VMOperationStatus = "Creating" + // VMOperationStatusFailed - Indicates that the virtual machine operation failed. + VMOperationStatusFailed VMOperationStatus = "Failed" + // VMOperationStatusSucceeded - Indicates that the virtual machine operation completed successfully. + VMOperationStatusSucceeded VMOperationStatus = "Succeeded" +) + +// PossibleVMOperationStatusValues returns the possible values for the VMOperationStatus const type. +func PossibleVMOperationStatusValues() []VMOperationStatus { + return []VMOperationStatus{ + VMOperationStatusCancelFailedStatusUnknown, + VMOperationStatusCanceled, + VMOperationStatusCreating, + VMOperationStatusFailed, + VMOperationStatusSucceeded, + } +} + // WindowsPatchAssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine. type WindowsPatchAssessmentMode string @@ -974,3 +1038,24 @@ func PossibleWindowsVMGuestPatchModeValues() []WindowsVMGuestPatchMode { WindowsVMGuestPatchModeManual, } } + +// ZoneDistributionStrategy - Distribution strategies for Compute Fleet zone allocation policy. +type ZoneDistributionStrategy string + +const ( + // ZoneDistributionStrategyBestEffortSingleZone - Default. Compute Fleet allocates all Fleet capacity within a single zone + // based on best effort. + // If capacity is not available, Compute Fleet can allocate capacity in different zones. + ZoneDistributionStrategyBestEffortSingleZone ZoneDistributionStrategy = "BestEffortSingleZone" + // ZoneDistributionStrategyPrioritized - Compute Fleet allocates capacity based on zone preferences. + // Higher priority zones are filled first before allocating to lower priority zones. + ZoneDistributionStrategyPrioritized ZoneDistributionStrategy = "Prioritized" +) + +// PossibleZoneDistributionStrategyValues returns the possible values for the ZoneDistributionStrategy const type. +func PossibleZoneDistributionStrategyValues() []ZoneDistributionStrategy { + return []ZoneDistributionStrategy{ + ZoneDistributionStrategyBestEffortSingleZone, + ZoneDistributionStrategyPrioritized, + } +} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go index 50095603add1..297e81bb5245 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2" "net/http" "net/url" "regexp" @@ -20,12 +20,16 @@ import ( // FleetsServer is a fake server for instances of the armcomputefleet.FleetsClient type. type FleetsServer struct { + // BeginCancel is the fake for method FleetsClient.BeginCancel + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginCancel func(ctx context.Context, resourceGroupName string, fleetName string, options *armcomputefleet.FleetsClientBeginCancelOptions) (resp azfake.PollerResponder[armcomputefleet.FleetsClientCancelResponse], errResp azfake.ErrorResponder) + // BeginCreateOrUpdate is the fake for method FleetsClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, fleetName string, resource armcomputefleet.Fleet, options *armcomputefleet.FleetsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcomputefleet.FleetsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) // BeginDelete is the fake for method FleetsClient.BeginDelete - // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginDelete func(ctx context.Context, resourceGroupName string, fleetName string, options *armcomputefleet.FleetsClientBeginDeleteOptions) (resp azfake.PollerResponder[armcomputefleet.FleetsClientDeleteResponse], errResp azfake.ErrorResponder) // Get is the fake for method FleetsClient.Get @@ -44,6 +48,10 @@ type FleetsServer struct { // HTTP status codes to indicate success: http.StatusOK NewListVirtualMachineScaleSetsPager func(resourceGroupName string, name string, options *armcomputefleet.FleetsClientListVirtualMachineScaleSetsOptions) (resp azfake.PagerResponder[armcomputefleet.FleetsClientListVirtualMachineScaleSetsResponse]) + // NewListVirtualMachinesPager is the fake for method FleetsClient.NewListVirtualMachinesPager + // HTTP status codes to indicate success: http.StatusOK + NewListVirtualMachinesPager func(resourceGroupName string, name string, options *armcomputefleet.FleetsClientListVirtualMachinesOptions) (resp azfake.PagerResponder[armcomputefleet.FleetsClientListVirtualMachinesResponse]) + // BeginUpdate is the fake for method FleetsClient.BeginUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginUpdate func(ctx context.Context, resourceGroupName string, fleetName string, properties armcomputefleet.FleetUpdate, options *armcomputefleet.FleetsClientBeginUpdateOptions) (resp azfake.PollerResponder[armcomputefleet.FleetsClientUpdateResponse], errResp azfake.ErrorResponder) @@ -55,11 +63,13 @@ type FleetsServer struct { func NewFleetsServerTransport(srv *FleetsServer) *FleetsServerTransport { return &FleetsServerTransport{ srv: srv, + beginCancel: newTracker[azfake.PollerResponder[armcomputefleet.FleetsClientCancelResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcomputefleet.FleetsClientCreateOrUpdateResponse]](), beginDelete: newTracker[azfake.PollerResponder[armcomputefleet.FleetsClientDeleteResponse]](), newListByResourceGroupPager: newTracker[azfake.PagerResponder[armcomputefleet.FleetsClientListByResourceGroupResponse]](), newListBySubscriptionPager: newTracker[azfake.PagerResponder[armcomputefleet.FleetsClientListBySubscriptionResponse]](), newListVirtualMachineScaleSetsPager: newTracker[azfake.PagerResponder[armcomputefleet.FleetsClientListVirtualMachineScaleSetsResponse]](), + newListVirtualMachinesPager: newTracker[azfake.PagerResponder[armcomputefleet.FleetsClientListVirtualMachinesResponse]](), beginUpdate: newTracker[azfake.PollerResponder[armcomputefleet.FleetsClientUpdateResponse]](), } } @@ -68,11 +78,13 @@ func NewFleetsServerTransport(srv *FleetsServer) *FleetsServerTransport { // Don't use this type directly, use NewFleetsServerTransport instead. type FleetsServerTransport struct { srv *FleetsServer + beginCancel *tracker[azfake.PollerResponder[armcomputefleet.FleetsClientCancelResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armcomputefleet.FleetsClientCreateOrUpdateResponse]] beginDelete *tracker[azfake.PollerResponder[armcomputefleet.FleetsClientDeleteResponse]] newListByResourceGroupPager *tracker[azfake.PagerResponder[armcomputefleet.FleetsClientListByResourceGroupResponse]] newListBySubscriptionPager *tracker[azfake.PagerResponder[armcomputefleet.FleetsClientListBySubscriptionResponse]] newListVirtualMachineScaleSetsPager *tracker[azfake.PagerResponder[armcomputefleet.FleetsClientListVirtualMachineScaleSetsResponse]] + newListVirtualMachinesPager *tracker[azfake.PagerResponder[armcomputefleet.FleetsClientListVirtualMachinesResponse]] beginUpdate *tracker[azfake.PollerResponder[armcomputefleet.FleetsClientUpdateResponse]] } @@ -88,29 +100,96 @@ func (f *FleetsServerTransport) Do(req *http.Request) (*http.Response, error) { } func (f *FleetsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error - - switch method { - case "FleetsClient.BeginCreateOrUpdate": - resp, err = f.dispatchBeginCreateOrUpdate(req) - case "FleetsClient.BeginDelete": - resp, err = f.dispatchBeginDelete(req) - case "FleetsClient.Get": - resp, err = f.dispatchGet(req) - case "FleetsClient.NewListByResourceGroupPager": - resp, err = f.dispatchNewListByResourceGroupPager(req) - case "FleetsClient.NewListBySubscriptionPager": - resp, err = f.dispatchNewListBySubscriptionPager(req) - case "FleetsClient.NewListVirtualMachineScaleSetsPager": - resp, err = f.dispatchNewListVirtualMachineScaleSetsPager(req) - case "FleetsClient.BeginUpdate": - resp, err = f.dispatchBeginUpdate(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } - - return resp, err + resultChan := make(chan result) + defer close(resultChan) + + go func() { + var intercepted bool + var res result + if fleetsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = fleetsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "FleetsClient.BeginCancel": + res.resp, res.err = f.dispatchBeginCancel(req) + case "FleetsClient.BeginCreateOrUpdate": + res.resp, res.err = f.dispatchBeginCreateOrUpdate(req) + case "FleetsClient.BeginDelete": + res.resp, res.err = f.dispatchBeginDelete(req) + case "FleetsClient.Get": + res.resp, res.err = f.dispatchGet(req) + case "FleetsClient.NewListByResourceGroupPager": + res.resp, res.err = f.dispatchNewListByResourceGroupPager(req) + case "FleetsClient.NewListBySubscriptionPager": + res.resp, res.err = f.dispatchNewListBySubscriptionPager(req) + case "FleetsClient.NewListVirtualMachineScaleSetsPager": + res.resp, res.err = f.dispatchNewListVirtualMachineScaleSetsPager(req) + case "FleetsClient.NewListVirtualMachinesPager": + res.resp, res.err = f.dispatchNewListVirtualMachinesPager(req) + case "FleetsClient.BeginUpdate": + res.resp, res.err = f.dispatchBeginUpdate(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() + + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } +} + +func (f *FleetsServerTransport) dispatchBeginCancel(req *http.Request) (*http.Response, error) { + if f.srv.BeginCancel == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCancel not implemented")} + } + beginCancel := f.beginCancel.get(req) + if beginCancel == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + fleetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("fleetName")]) + if err != nil { + return nil, err + } + respr, errRespr := f.srv.BeginCancel(req.Context(), resourceGroupNameParam, fleetNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCancel = &respr + f.beginCancel.add(req, beginCancel) + } + + resp, err := server.PollerResponderNext(beginCancel, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + f.beginCancel.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCancel) { + f.beginCancel.remove(req) + } + + return resp, nil } func (f *FleetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { @@ -122,7 +201,7 @@ func (f *FleetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) ( const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armcomputefleet.Fleet](req) @@ -170,7 +249,7 @@ func (f *FleetsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -194,9 +273,9 @@ func (f *FleetsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re return nil, err } - if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { f.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } if !server.PollerResponderMore(beginDelete) { f.beginDelete.remove(req) @@ -212,7 +291,7 @@ func (f *FleetsServerTransport) dispatchGet(req *http.Request) (*http.Response, const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -247,7 +326,7 @@ func (f *FleetsServerTransport) dispatchNewListByResourceGroupPager(req *http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -284,7 +363,7 @@ func (f *FleetsServerTransport) dispatchNewListBySubscriptionPager(req *http.Req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := f.srv.NewListBySubscriptionPager(nil) @@ -317,7 +396,7 @@ func (f *FleetsServerTransport) dispatchNewListVirtualMachineScaleSetsPager(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachineScaleSets` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -349,6 +428,65 @@ func (f *FleetsServerTransport) dispatchNewListVirtualMachineScaleSetsPager(req return resp, nil } +func (f *FleetsServerTransport) dispatchNewListVirtualMachinesPager(req *http.Request) (*http.Response, error) { + if f.srv.NewListVirtualMachinesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListVirtualMachinesPager not implemented")} + } + newListVirtualMachinesPager := f.newListVirtualMachinesPager.get(req) + if newListVirtualMachinesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + skiptokenUnescaped, err := url.QueryUnescape(qp.Get("$skiptoken")) + if err != nil { + return nil, err + } + skiptokenParam := getOptional(skiptokenUnescaped) + var options *armcomputefleet.FleetsClientListVirtualMachinesOptions + if filterParam != nil || skiptokenParam != nil { + options = &armcomputefleet.FleetsClientListVirtualMachinesOptions{ + Filter: filterParam, + Skiptoken: skiptokenParam, + } + } + resp := f.srv.NewListVirtualMachinesPager(resourceGroupNameParam, nameParam, options) + newListVirtualMachinesPager = &resp + f.newListVirtualMachinesPager.add(req, newListVirtualMachinesPager) + server.PagerResponderInjectNextLinks(newListVirtualMachinesPager, req, func(page *armcomputefleet.FleetsClientListVirtualMachinesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListVirtualMachinesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListVirtualMachinesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListVirtualMachinesPager) { + f.newListVirtualMachinesPager.remove(req) + } + return resp, nil +} + func (f *FleetsServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { if f.srv.BeginUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} @@ -358,7 +496,7 @@ func (f *FleetsServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.AzureFleet/fleets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armcomputefleet.FleetUpdate](req) @@ -396,3 +534,9 @@ func (f *FleetsServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Re return resp, nil } + +// set this to conditionally intercept incoming requests to FleetsServerTransport +var fleetsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go index 56a8f624f5f3..d768e4760998 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go @@ -7,9 +7,15 @@ package fake import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "net/http" + "reflect" "sync" ) +type result struct { + resp *http.Response + err error +} + type nonRetriableError struct { error } @@ -27,6 +33,13 @@ func contains[T comparable](s []T, v T) bool { return false } +func getOptional[T any](v T) *T { + if reflect.ValueOf(v).IsZero() { + return nil + } + return &v +} + func newTracker[T any]() *tracker[T] { return &tracker[T]{ items: map[string]*T{}, diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go index a86d89fb4a63..1ca70f29e52a 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go @@ -11,7 +11,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2" "net/http" ) @@ -51,17 +51,36 @@ func (o *OperationsServerTransport) Do(req *http.Request) (*http.Response, error } func (o *OperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "OperationsClient.NewListPager": - resp, err = o.dispatchNewListPager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if operationsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = operationsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "OperationsClient.NewListPager": + res.resp, res.err = o.dispatchNewListPager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { @@ -90,3 +109,9 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht } return resp, nil } + +// set this to conditionally intercept incoming requests to OperationsServerTransport +var operationsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/time_rfc3339.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/time_rfc3339.go deleted file mode 100644 index 87ee11e83b32..000000000000 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/time_rfc3339.go +++ /dev/null @@ -1,109 +0,0 @@ -// 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 fake - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) - -const ( - utcDateTime = "2006-01-02T15:04:05.999999999" - utcDateTimeJSON = `"` + utcDateTime + `"` - utcDateTimeNoT = "2006-01-02 15:04:05.999999999" - utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` - dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` - dateTimeJSON = `"` + time.RFC3339Nano + `"` - dateTimeJSONNoT = `"` + dateTimeNoT + `"` -) - -type dateTimeRFC3339 time.Time - -func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t dateTimeRFC3339) MarshalText() ([]byte, error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - tzOffset := tzOffsetRegex.Match(data) - hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") - var layout string - if tzOffset && hasT { - layout = dateTimeJSON - } else if tzOffset { - layout = dateTimeJSONNoT - } else if hasT { - layout = utcDateTimeJSON - } else { - layout = utcDateTimeJSONNoT - } - return t.Parse(layout, string(data)) -} - -func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - if len(data) == 0 { - return nil - } - tzOffset := tzOffsetRegex.Match(data) - hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") - var layout string - if tzOffset && hasT { - layout = time.RFC3339Nano - } else if tzOffset { - layout = dateTimeNoT - } else if hasT { - layout = utcDateTime - } else { - layout = utcDateTimeNoT - } - return t.Parse(layout, string(data)) -} - -func (t *dateTimeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = dateTimeRFC3339(p) - return err -} - -func (t dateTimeRFC3339) String() string { - return time.Time(t).Format(time.RFC3339Nano) -} - -func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*dateTimeRFC3339)(t) -} - -func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || string(data) == "null" { - return nil - } - var aux dateTimeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go index 2fd16b96db29..797071ce2125 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client.go @@ -39,10 +39,84 @@ func NewFleetsClient(subscriptionID string, credential azcore.TokenCredential, o return client, nil } +// BeginCancel - Cancels an instance Fleet creation that is in progress. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-08-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - fleetName - The name of the Compute Fleet +// - options - FleetsClientBeginCancelOptions contains the optional parameters for the FleetsClient.BeginCancel method. +func (client *FleetsClient) BeginCancel(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientBeginCancelOptions) (*runtime.Poller[FleetsClientCancelResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.cancel(ctx, resourceGroupName, fleetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FleetsClientCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FleetsClientCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Cancel - Cancels an instance Fleet creation that is in progress. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-08-01 +func (client *FleetsClient) cancel(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientBeginCancelOptions) (*http.Response, error) { + var err error + const operationName = "FleetsClient.BeginCancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, fleetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *FleetsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, fleetName string, _ *FleetsClientBeginCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}/cancel" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if fleetName == "" { + return nil, errors.New("parameter fleetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fleetName}", url.PathEscape(fleetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-08-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + // BeginCreateOrUpdate - Create a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-11-01 +// Generated from API version 2025-08-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 +143,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-11-01 +// Generated from API version 2025-08-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 +185,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -124,7 +198,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-11-01 +// Generated from API version 2025-08-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 +222,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-11-01 +// Generated from API version 2025-08-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,16 +264,15 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Get a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-11-01 +// Generated from API version 2025-08-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 +318,7 @@ func (client *FleetsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +335,7 @@ func (client *FleetsClient) getHandleResponse(resp *http.Response) (FleetsClient // NewListByResourceGroupPager - List Fleet resources by resource group // -// Generated from API version 2024-11-01 +// Generated from API version 2025-08-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 +378,7 @@ func (client *FleetsClient) listByResourceGroupCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +395,7 @@ func (client *FleetsClient) listByResourceGroupHandleResponse(resp *http.Respons // NewListBySubscriptionPager - List Fleet resources by subscription ID // -// Generated from API version 2024-11-01 +// Generated from API version 2025-08-01 // - options - FleetsClientListBySubscriptionOptions contains the optional parameters for the FleetsClient.NewListBySubscriptionPager // method. func (client *FleetsClient) NewListBySubscriptionPager(options *FleetsClientListBySubscriptionOptions) *runtime.Pager[FleetsClientListBySubscriptionResponse] { @@ -360,7 +433,7 @@ func (client *FleetsClient) listBySubscriptionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,7 +450,7 @@ func (client *FleetsClient) listBySubscriptionHandleResponse(resp *http.Response // NewListVirtualMachineScaleSetsPager - List VirtualMachineScaleSet resources by Fleet // -// Generated from API version 2024-11-01 +// Generated from API version 2025-08-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 +498,7 @@ func (client *FleetsClient) listVirtualMachineScaleSetsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -440,10 +513,81 @@ func (client *FleetsClient) listVirtualMachineScaleSetsHandleResponse(resp *http return result, nil } +// NewListVirtualMachinesPager - List VirtualMachine resources of an instance Fleet. +// +// Generated from API version 2025-08-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Fleet +// - options - FleetsClientListVirtualMachinesOptions contains the optional parameters for the FleetsClient.NewListVirtualMachinesPager +// method. +func (client *FleetsClient) NewListVirtualMachinesPager(resourceGroupName string, name string, options *FleetsClientListVirtualMachinesOptions) *runtime.Pager[FleetsClientListVirtualMachinesResponse] { + return runtime.NewPager(runtime.PagingHandler[FleetsClientListVirtualMachinesResponse]{ + More: func(page FleetsClientListVirtualMachinesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FleetsClientListVirtualMachinesResponse) (FleetsClientListVirtualMachinesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FleetsClient.NewListVirtualMachinesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachinesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return FleetsClientListVirtualMachinesResponse{}, err + } + return client.listVirtualMachinesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listVirtualMachinesCreateRequest creates the ListVirtualMachines request. +func (client *FleetsClient) listVirtualMachinesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *FleetsClientListVirtualMachinesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachines" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skiptoken != nil { + reqQP.Set("$skiptoken", *options.Skiptoken) + } + reqQP.Set("api-version", "2025-08-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVirtualMachinesHandleResponse handles the ListVirtualMachines response. +func (client *FleetsClient) listVirtualMachinesHandleResponse(resp *http.Response) (FleetsClientListVirtualMachinesResponse, error) { + result := FleetsClientListVirtualMachinesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineListResult); err != nil { + return FleetsClientListVirtualMachinesResponse{}, err + } + return result, nil +} + // BeginUpdate - Update a Fleet // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-11-01 +// Generated from API version 2025-08-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 +612,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-11-01 +// Generated from API version 2025-08-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 +654,7 @@ func (client *FleetsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-11-01") + reqQP.Set("api-version", "2025-08-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 deleted file mode 100644 index 1499fe058820..000000000000 --- a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go +++ /dev/null @@ -1,3114 +0,0 @@ -// 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: 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: 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: 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: 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: 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: 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: 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: 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 cb3bfffa9f94..9a8999a0da53 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/go.mod +++ b/sdk/resourcemanager/computefleet/armcomputefleet/go.mod @@ -1,21 +1,11 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2 go 1.23.0 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2 require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.2 // 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.40.0 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/text v0.28.0 // indirect ) diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/go.sum b/sdk/resourcemanager/computefleet/armcomputefleet/go.sum index 49e874cd7954..5ee719a8759b 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/go.sum +++ b/sdk/resourcemanager/computefleet/armcomputefleet/go.sum @@ -1,45 +1,16 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 h1:Wc1ml6QlJs2BHQ/9Bqu1jiyggbsSjramq2oUmp5WeIo= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 h1:B+blDbyVIG3WaikNxPnhPiJ1MThR03b3vKGtER95TP4= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1/go.mod h1:JdM5psgjfBf5fo2uWOZhflPWyDBZ/O/CNAH9CtsuZE4= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= -github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= -github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= -github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2 h1:Hr5FTipp7SL07o2FvoVOX9HRiRH3CR3Mj8pxqCcdD5A= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2/go.mod h1:QyVsSSN64v5TGltphKLQ2sQxe4OBQg0J1eKRcVBnfgE= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/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/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= -github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= -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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= -github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/models.go b/sdk/resourcemanager/computefleet/armcomputefleet/models.go index caf2d6bf4392..736bd911bcbc 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/models.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/models.go @@ -117,9 +117,9 @@ type BaseVirtualMachineProfile struct { // Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS // (for SUSE)

For more information, see [Azure Hybrid Use Benefit for // Windows - // Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) + // Server](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) //

[Azure Hybrid Use Benefit for Linux - // Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) + // Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) //

Minimum api-version: 2015-06-15 LicenseType *string @@ -229,8 +229,8 @@ type DiffDiskSettings struct { // values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: // **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** // is used. Refer to the VM size documentation for Windows VM at - // https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at - // https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM + // https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at + // https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM // sizes exposes a cache disk. Placement *DiffDiskPlacement } @@ -256,9 +256,6 @@ type Fleet struct { // REQUIRED; The geo-location where the resource lives Location *string - // READ-ONLY; The name of the Compute Fleet - Name *string - // The managed service identities assigned to this resource. Identity *ManagedServiceIdentity @@ -277,6 +274,9 @@ type Fleet struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string + // READ-ONLY; The name of the resource + Name *string + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData @@ -304,15 +304,32 @@ type FleetProperties struct { // Represents the configuration for additional locations where Fleet resources may be deployed. AdditionalLocationsProfile *AdditionalLocationsProfile + // Specifies capacity type for Fleet Regular and Spot priority profiles. + // capacityType is an immutable property. Once set during Fleet creation, it cannot be updated. + // Specifying different capacity type for Fleet Regular and Spot priority profiles is not allowed. + CapacityType *CapacityType + + // Specifies the display name a Compute Fleet test v2. + DisplayName *string + + // Mode of the Fleet. + Mode *FleetMode + // Configuration Options for Regular instances in Compute Fleet. RegularPriorityProfile *RegularPriorityProfile // Configuration Options for Spot instances in Compute Fleet. SpotPriorityProfile *SpotPriorityProfile + // Specifies the updated by a Compute Fleet test v2. + UpdatedBy *string + // Attribute based Fleet. VMAttributes *VMAttributes + // Zone Allocation Policy for Fleet. + ZoneAllocationPolicy *ZoneAllocationPolicy + // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState @@ -403,7 +420,7 @@ type KeyVaultSecretReference struct { // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. For a // list of supported Linux distributions, see [Linux on Azure-Endorsed -// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). +// Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros). type LinuxConfiguration struct { // Specifies whether password authentication should be disabled. DisablePasswordAuthentication *bool @@ -507,14 +524,16 @@ type OSImageNotificationProfile struct { NotBeforeTimeout *string } -// Operation - Details of a REST API operation, returned from the Resource Provider Operations API +// Operation - REST API Operation +// +// Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { - // Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - ActionType *ActionType - - // READ-ONLY; Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay + // READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + ActionType *ActionType + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure // Resource Manager/control-plane operations. IsDataAction *bool @@ -679,7 +698,7 @@ type SSHPublicKey struct { // SSH public key certificate used to authenticate with the VM through ssh. The // key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, // see [Create SSH keys on Linux and Mac for Linux VMs in - // Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + // Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). KeyData *string // Specifies the full path on the created VM where ssh public key is stored. If @@ -908,6 +927,7 @@ type VMAttributes struct { LocalStorageInGiB *VMAttributeMinMaxDouble // Specifies whether the VMSize supporting local storage should be used to build Fleet or not. + // Included - Default if not specified as most Azure VMs support local storage. 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. @@ -991,14 +1011,14 @@ type VMSizeProperties struct { // specified in the request body the default behavior is to set it to the value of // vCPUs available for that VM size exposed in api response of [List all available // virtual machine sizes in a - // region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). + // region](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list). VCPUsAvailable *int32 // Specifies the vCPU to physical core ratio. When this property is not specified // in the request body the default behavior is set to the value of vCPUsPerCore // for the VM Size exposed in api response of [List all available virtual machine // sizes in a - // region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). + // region](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list). // **Setting this property to 1 also means that hyper-threading is disabled.** VCPUsPerCore *int32 } @@ -1018,16 +1038,16 @@ type VaultCertificate struct { // This is the URL of a certificate that has been uploaded to Key Vault as a // secret. For adding a secret to the Key Vault, see [Add a key or secret to the // key - // vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + // vault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add). // In this case, your certificate needs to be It is the Base64 encoding of the // following JSON Object which is encoded in UTF-8:

{
// "data":"",
"dataType":"pfx",
// "password":""
}
To install certificates on a virtual // machine it is recommended to use the [Azure Key Vault virtual machine extension // for - // Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) + // Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) // or the [Azure Key Vault virtual machine extension for - // Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + // Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). CertificateURL *string } @@ -1047,15 +1067,37 @@ type VirtualHardDisk struct { URI *string } +// VirtualMachine - An instant Fleet's virtual machine. +type VirtualMachine struct { + // READ-ONLY; The compute RP resource id of the virtual machine. subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName} + ID *string + + // READ-ONLY; This represents the operationStatus of the virtual machine in response to the last operation that was performed + // on it by Azure Fleet resource. + OperationStatus *VMOperationStatus + + // READ-ONLY; Error information when `operationStatus` is `Failed`. + Error *APIError + + // READ-ONLY; Type of the virtual machine + Type *string +} + +// VirtualMachineListResult - The response of a virtual machine list operation. +type VirtualMachineListResult struct { + // REQUIRED; The Virtual Machine items on this page. + Value []*VirtualMachine + + // The link to the next page of items. + NextLink *string +} + // VirtualMachineScaleSet - An AzureFleet's virtualMachineScaleSet type VirtualMachineScaleSet struct { // READ-ONLY; The compute RP resource id of the virtualMachineScaleSet // "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}" ID *string - // READ-ONLY; The name of the virtualMachineScaleSet - Name *string - // READ-ONLY; This represents the operationStatus of the VMSS in response to the last operation that was performed on it by // Azure Fleet resource. OperationStatus *ProvisioningState @@ -1419,10 +1461,10 @@ type VirtualMachineScaleSetOSProfile struct { // "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", // "Password22", "iloveyou!"

For resetting the password, see [How to // reset the Remote Desktop service or its login password in a Windows - // VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) + // VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) //

For resetting root password, see [Manage users, SSH, and check or // repair disks on Azure Linux VMs using the VMAccess - // Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + // Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) AdminPassword *string // Specifies the name of the administrator account.

**Windows-only @@ -1448,12 +1490,12 @@ type VirtualMachineScaleSetOSProfile struct { // is decoded to a binary array that is saved as a file on the Virtual Machine. // The maximum length of the binary array is 65535 bytes. For using cloud-init for // your VM, see [Using cloud-init to customize a Linux VM during - // creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) + // creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init) CustomData *string // Specifies the Linux operating system settings on the virtual machine. For a // list of supported Linux distributions, see [Linux on Azure-Endorsed - // Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + // Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros). LinuxConfiguration *LinuxConfiguration // Optional property which must either be set to True or omitted. @@ -1462,9 +1504,9 @@ type VirtualMachineScaleSetOSProfile struct { // Specifies set of certificates that should be installed onto the virtual // machines in the scale set. To install certificates on a virtual machine it is // recommended to use the [Azure Key Vault virtual machine extension for - // Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) + // Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) // or the [Azure Key Vault virtual machine extension for - // Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + // Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). Secrets []*VaultSecretGroup // Specifies Windows operating system settings on the virtual machine. @@ -1531,7 +1573,7 @@ type VirtualMachineScaleSetStorageProfile struct { // Specifies the parameters that are used to add data disks to the virtual // machines in the scale set. For more information about disks, see [About disks // and VHDs for Azure virtual - // machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + // machines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview). DataDisks []*VirtualMachineScaleSetDataDisk // Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01 @@ -1546,7 +1588,7 @@ type VirtualMachineScaleSetStorageProfile struct { // Specifies information about the operating system disk used by the virtual // machines in the scale set. For more information about disks, see [About disks // and VHDs for Azure virtual - // machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + // machines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview). OSDisk *VirtualMachineScaleSetOSDisk } @@ -1561,16 +1603,16 @@ type WinRMListener struct { // This is the URL of a certificate that has been uploaded to Key Vault as a // secret. For adding a secret to the Key Vault, see [Add a key or secret to the // key - // vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + // vault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add). // In this case, your certificate needs to be the Base64 encoding of the following // JSON Object which is encoded in UTF-8:

{
// "data":"",
"dataType":"pfx",
// "password":""
}
To install certificates on a virtual // machine it is recommended to use the [Azure Key Vault virtual machine extension // for - // Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) + // Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) // or the [Azure Key Vault virtual machine extension for - // Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + // Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). CertificateURL *string // Specifies the protocol of WinRM listener. Possible values are: **http,** @@ -1604,9 +1646,9 @@ type WindowsConfiguration struct { // Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". // Possible values can be - // [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) + // [TimeZoneInfo.Id](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) // value from time zones returned by - // [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + // [TimeZoneInfo.GetSystemTimeZones](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). TimeZone *string // Specifies the Windows Remote Management listeners. This enables remote Windows @@ -1624,3 +1666,23 @@ type WindowsVMGuestPatchAutomaticByPlatformSettings struct { // operations. RebootSetting *WindowsVMGuestPatchAutomaticByPlatformRebootSetting } + +// ZoneAllocationPolicy for Compute Fleet. +type ZoneAllocationPolicy struct { + // REQUIRED; Distribution strategy used for zone allocation policy. + DistributionStrategy *ZoneDistributionStrategy + + // Zone preferences, required when zone distribution strategy is Prioritized. + ZonePreferences []*ZonePreference +} + +// ZonePreference - Zone preferences for Compute Fleet zone allocation policy. +type ZonePreference struct { + // REQUIRED; Name of the zone. + Zone *string + + // The rank of the zone. This is used with 'Prioritized' ZoneDistributionStrategy. + // The lower the number, the higher the priority, starting with 0. + // 0 is the highest rank. If not specified, defaults to lowest rank. + Rank *int32 +} diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go b/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go index df1f6336792d..5a41b49c4e12 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/models_serde.go @@ -634,14 +634,19 @@ func (f *FleetListResult) UnmarshalJSON(data []byte) error { func (f FleetProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "additionalLocationsProfile", f.AdditionalLocationsProfile) + populate(objectMap, "capacityType", f.CapacityType) populate(objectMap, "computeProfile", f.ComputeProfile) + populate(objectMap, "displayName", f.DisplayName) + populate(objectMap, "mode", f.Mode) 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, "updatedBy", f.UpdatedBy) populate(objectMap, "vmAttributes", f.VMAttributes) populate(objectMap, "vmSizesProfile", f.VMSizesProfile) + populate(objectMap, "zoneAllocationPolicy", f.ZoneAllocationPolicy) return json.Marshal(objectMap) } @@ -657,9 +662,18 @@ func (f *FleetProperties) UnmarshalJSON(data []byte) error { case "additionalLocationsProfile": err = unpopulate(val, "AdditionalLocationsProfile", &f.AdditionalLocationsProfile) delete(rawMsg, key) + case "capacityType": + err = unpopulate(val, "CapacityType", &f.CapacityType) + delete(rawMsg, key) case "computeProfile": err = unpopulate(val, "ComputeProfile", &f.ComputeProfile) delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &f.DisplayName) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &f.Mode) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) delete(rawMsg, key) @@ -675,12 +689,18 @@ func (f *FleetProperties) UnmarshalJSON(data []byte) error { case "uniqueId": err = unpopulate(val, "UniqueID", &f.UniqueID) delete(rawMsg, key) + case "updatedBy": + err = unpopulate(val, "UpdatedBy", &f.UpdatedBy) + 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) + case "zoneAllocationPolicy": + err = unpopulate(val, "ZoneAllocationPolicy", &f.ZoneAllocationPolicy) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -2227,12 +2247,81 @@ func (v *VirtualHardDisk) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type VirtualMachine. +func (v VirtualMachine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", v.Error) + populate(objectMap, "id", v.ID) + populate(objectMap, "operationStatus", v.OperationStatus) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine. +func (v *VirtualMachine) 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 "error": + err = unpopulate(val, "Error", &v.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "operationStatus": + err = unpopulate(val, "OperationStatus", &v.OperationStatus) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + 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 VirtualMachineListResult. +func (v VirtualMachineListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineListResult. +func (v *VirtualMachineListResult) 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 "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + 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 VirtualMachineScaleSet. func (v VirtualMachineScaleSet) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "error", v.Error) populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) populate(objectMap, "operationStatus", v.OperationStatus) populate(objectMap, "type", v.Type) return json.Marshal(objectMap) @@ -2253,9 +2342,6 @@ func (v *VirtualMachineScaleSet) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &v.ID) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) case "operationStatus": err = unpopulate(val, "OperationStatus", &v.OperationStatus) delete(rawMsg, key) @@ -3262,6 +3348,68 @@ func (w *WindowsVMGuestPatchAutomaticByPlatformSettings) UnmarshalJSON(data []by return nil } +// MarshalJSON implements the json.Marshaller interface for type ZoneAllocationPolicy. +func (z ZoneAllocationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "distributionStrategy", z.DistributionStrategy) + populate(objectMap, "zonePreferences", z.ZonePreferences) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ZoneAllocationPolicy. +func (z *ZoneAllocationPolicy) 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", z, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributionStrategy": + err = unpopulate(val, "DistributionStrategy", &z.DistributionStrategy) + delete(rawMsg, key) + case "zonePreferences": + err = unpopulate(val, "ZonePreferences", &z.ZonePreferences) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", z, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ZonePreference. +func (z ZonePreference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rank", z.Rank) + populate(objectMap, "zone", z.Zone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ZonePreference. +func (z *ZonePreference) 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", z, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rank": + err = unpopulate(val, "Rank", &z.Rank) + delete(rawMsg, key) + case "zone": + err = unpopulate(val, "Zone", &z.Zone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", z, err) + } + } + return nil +} + func populate(m map[string]any, k string, v any) { if v == nil { return diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/operations_client.go b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client.go index e6f217fbf10e..2389af4773b6 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-11-01 +// Generated from API version 2025-08-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-11-01") + reqQP.Set("api-version", "2025-08-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 deleted file mode 100644 index 9ba1df570e27..000000000000 --- a/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// 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: 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/options.go b/sdk/resourcemanager/computefleet/armcomputefleet/options.go index 570e7a366870..8850e57ea1fd 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/options.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/options.go @@ -4,6 +4,12 @@ package armcomputefleet +// FleetsClientBeginCancelOptions contains the optional parameters for the FleetsClient.BeginCancel method. +type FleetsClientBeginCancelOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + // FleetsClientBeginCreateOrUpdateOptions contains the optional parameters for the FleetsClient.BeginCreateOrUpdate method. type FleetsClientBeginCreateOrUpdateOptions struct { // Resumes the long-running operation from the provided token. @@ -45,6 +51,16 @@ type FleetsClientListVirtualMachineScaleSetsOptions struct { // placeholder for future optional parameters } +// FleetsClientListVirtualMachinesOptions contains the optional parameters for the FleetsClient.NewListVirtualMachinesPager +// method. +type FleetsClientListVirtualMachinesOptions struct { + // Filter expression to filter the virtual machines. + Filter *string + + // Skip token for pagination. Uses the token from a previous response to fetch the next page of results. + Skiptoken *string +} + // OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/responses.go b/sdk/resourcemanager/computefleet/armcomputefleet/responses.go index 1c1710c975e3..6d3ff331d149 100644 --- a/sdk/resourcemanager/computefleet/armcomputefleet/responses.go +++ b/sdk/resourcemanager/computefleet/armcomputefleet/responses.go @@ -4,6 +4,11 @@ package armcomputefleet +// FleetsClientCancelResponse contains the response from method FleetsClient.BeginCancel. +type FleetsClientCancelResponse struct { + // placeholder for future response values +} + // FleetsClientCreateOrUpdateResponse contains the response from method FleetsClient.BeginCreateOrUpdate. type FleetsClientCreateOrUpdateResponse struct { // An Compute Fleet resource @@ -39,6 +44,12 @@ type FleetsClientListVirtualMachineScaleSetsResponse struct { VirtualMachineScaleSetListResult } +// FleetsClientListVirtualMachinesResponse contains the response from method FleetsClient.NewListVirtualMachinesPager. +type FleetsClientListVirtualMachinesResponse struct { + // The response of a virtual machine list operation. + VirtualMachineListResult +} + // FleetsClientUpdateResponse contains the response from method FleetsClient.BeginUpdate. type FleetsClientUpdateResponse struct { // An Compute Fleet resource diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/testdata/_metadata.json b/sdk/resourcemanager/computefleet/armcomputefleet/testdata/_metadata.json new file mode 100644 index 000000000000..faad0588121e --- /dev/null +++ b/sdk/resourcemanager/computefleet/armcomputefleet/testdata/_metadata.json @@ -0,0 +1,4 @@ +{ + "apiVersion": "2025-08-01", + "emitterVersion": "0.8.0" +} \ No newline at end of file diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml b/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml index c8d950e137b2..6689d3cd32a7 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: c120171b3684d88562fa26ae7db5d22b7bfa95d8 +commit: f8b97c303b60d480a110027b2442ceeb03b9d022 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/version.go b/sdk/resourcemanager/computefleet/armcomputefleet/version.go new file mode 100644 index 000000000000..0453806463f5 --- /dev/null +++ b/sdk/resourcemanager/computefleet/armcomputefleet/version.go @@ -0,0 +1,10 @@ +// 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. + +package armcomputefleet + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet" + moduleVersion = "v2.0.0" +)