[Release] sdk/resourcemanager/computefleet/armcomputefleet/1.0.0 (#23629)

* [Release] sdk/resourcemanager/computefleet/armcomputefleet/1.0.0 generation from spec commit: c120171b3684d88562fa26ae7db5d22b7bfa95d8

* refine changelog
This commit is contained in:
Chenjie Shi 2024-10-22 15:34:23 +08:00 коммит произвёл GitHub
Родитель 16395d8b25
Коммит de1c93f661
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
11 изменённых файлов: 3863 добавлений и 26 удалений

Просмотреть файл

@ -1,5 +1,29 @@
# Release History
## 1.0.0 (2024-10-22)
### Breaking Changes
- `NetworkAPIVersion20201101` from enum `NetworkAPIVersion` has been renamed to `NetworkAPIVersionV20201101`
### Features Added
- New enum type `AcceleratorManufacturer` with values `AcceleratorManufacturerAMD`, `AcceleratorManufacturerNvidia`, `AcceleratorManufacturerXilinx`
- New enum type `AcceleratorType` with values `AcceleratorTypeFPGA`, `AcceleratorTypeGPU`
- New enum type `ArchitectureType` with values `ArchitectureTypeARM64`, `ArchitectureTypeX64`
- New enum type `CPUManufacturer` with values `CPUManufacturerAMD`, `CPUManufacturerAmpere`, `CPUManufacturerIntel`, `CPUManufacturerMicrosoft`
- New enum type `LocalStorageDiskType` with values `LocalStorageDiskTypeHDD`, `LocalStorageDiskTypeSSD`
- New enum type `VMAttributeSupport` with values `VMAttributeSupportExcluded`, `VMAttributeSupportIncluded`, `VMAttributeSupportRequired`
- New enum type `VMCategory` with values `VMCategoryComputeOptimized`, `VMCategoryFpgaAccelerated`, `VMCategoryGeneralPurpose`, `VMCategoryGpuAccelerated`, `VMCategoryHighPerformanceCompute`, `VMCategoryMemoryOptimized`, `VMCategoryStorageOptimized`
- New struct `AdditionalCapabilities`
- New struct `AdditionalLocationsProfile`
- New struct `LocationProfile`
- New struct `VMAttributeMinMaxDouble`
- New struct `VMAttributeMinMaxInteger`
- New struct `VMAttributes`
- New field `AdditionalVirtualMachineCapabilities` in struct `ComputeProfile`
- New field `AdditionalLocationsProfile`, `VMAttributes` in struct `FleetProperties`
## 0.1.0 (2024-07-26)
### Other Changes

Просмотреть файл

@ -6,9 +6,48 @@ package armcomputefleet
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
moduleVersion = "v0.1.0"
moduleVersion = "v1.0.0"
)
// AcceleratorManufacturer - Accelerator manufacturers supported by Azure VMs.
type AcceleratorManufacturer string
const (
// AcceleratorManufacturerAMD - AMD GpuType
AcceleratorManufacturerAMD AcceleratorManufacturer = "AMD"
// AcceleratorManufacturerNvidia - Nvidia GpuType
AcceleratorManufacturerNvidia AcceleratorManufacturer = "Nvidia"
// AcceleratorManufacturerXilinx - Xilinx GpuType
AcceleratorManufacturerXilinx AcceleratorManufacturer = "Xilinx"
)
// PossibleAcceleratorManufacturerValues returns the possible values for the AcceleratorManufacturer const type.
func PossibleAcceleratorManufacturerValues() []AcceleratorManufacturer {
return []AcceleratorManufacturer{
AcceleratorManufacturerAMD,
AcceleratorManufacturerNvidia,
AcceleratorManufacturerXilinx,
}
}
// AcceleratorType - Accelerator types supported by Azure VMs.
type AcceleratorType string
const (
// AcceleratorTypeFPGA - FPGA Accelerator
AcceleratorTypeFPGA AcceleratorType = "FPGA"
// AcceleratorTypeGPU - GPU Accelerator
AcceleratorTypeGPU AcceleratorType = "GPU"
)
// PossibleAcceleratorTypeValues returns the possible values for the AcceleratorType const type.
func PossibleAcceleratorTypeValues() []AcceleratorType {
return []AcceleratorType{
AcceleratorTypeFPGA,
AcceleratorTypeGPU,
}
}
// ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
type ActionType string
@ -24,6 +63,48 @@ func PossibleActionTypeValues() []ActionType {
}
}
// ArchitectureType - Architecture types supported by Azure VMs.
type ArchitectureType string
const (
// ArchitectureTypeARM64 - ARM64 Architecture
ArchitectureTypeARM64 ArchitectureType = "ARM64"
// ArchitectureTypeX64 - X64 Architecture
ArchitectureTypeX64 ArchitectureType = "X64"
)
// PossibleArchitectureTypeValues returns the possible values for the ArchitectureType const type.
func PossibleArchitectureTypeValues() []ArchitectureType {
return []ArchitectureType{
ArchitectureTypeARM64,
ArchitectureTypeX64,
}
}
// CPUManufacturer - Cpu Manufacturers supported by Azure VMs.
type CPUManufacturer string
const (
// CPUManufacturerAMD - AMD CPU.
CPUManufacturerAMD CPUManufacturer = "AMD"
// CPUManufacturerAmpere - Ampere CPU.
CPUManufacturerAmpere CPUManufacturer = "Ampere"
// CPUManufacturerIntel - Intel CPU.
CPUManufacturerIntel CPUManufacturer = "Intel"
// CPUManufacturerMicrosoft - Microsoft CPU.
CPUManufacturerMicrosoft CPUManufacturer = "Microsoft"
)
// PossibleCPUManufacturerValues returns the possible values for the CPUManufacturer const type.
func PossibleCPUManufacturerValues() []CPUManufacturer {
return []CPUManufacturer{
CPUManufacturerAMD,
CPUManufacturerAmpere,
CPUManufacturerIntel,
CPUManufacturerMicrosoft,
}
}
// CachingTypes - Specifies the caching requirements.
type CachingTypes string
@ -344,6 +425,24 @@ func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode {
}
}
// LocalStorageDiskType - Different kind of Local storage disk types supported by Azure VMs.
type LocalStorageDiskType string
const (
// LocalStorageDiskTypeHDD - HDD DiskType.
LocalStorageDiskTypeHDD LocalStorageDiskType = "HDD"
// LocalStorageDiskTypeSSD - SDD DiskType.
LocalStorageDiskTypeSSD LocalStorageDiskType = "SSD"
)
// PossibleLocalStorageDiskTypeValues returns the possible values for the LocalStorageDiskType const type.
func PossibleLocalStorageDiskTypeValues() []LocalStorageDiskType {
return []LocalStorageDiskType{
LocalStorageDiskTypeHDD,
LocalStorageDiskTypeSSD,
}
}
// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
type ManagedServiceIdentityType string
@ -395,14 +494,14 @@ func PossibleModeValues() []Mode {
type NetworkAPIVersion string
const (
// NetworkAPIVersion20201101 - Initial version supported. Later versions are supported as well.
NetworkAPIVersion20201101 NetworkAPIVersion = "2020-11-01"
// NetworkAPIVersionV20201101 - Initial version supported. Later versions are supported as well.
NetworkAPIVersionV20201101 NetworkAPIVersion = "2020-11-01"
)
// PossibleNetworkAPIVersionValues returns the possible values for the NetworkAPIVersion const type.
func PossibleNetworkAPIVersionValues() []NetworkAPIVersion {
return []NetworkAPIVersion{
NetworkAPIVersion20201101,
NetworkAPIVersionV20201101,
}
}
@ -735,6 +834,75 @@ func PossibleStorageAccountTypesValues() []StorageAccountTypes {
}
}
// VMAttributeSupport - VMSizes supported by Azure VMs. Included is a union of Excluded and Required.
type VMAttributeSupport string
const (
// VMAttributeSupportExcluded - All VMSizes having the feature support will be excluded.
VMAttributeSupportExcluded VMAttributeSupport = "Excluded"
// VMAttributeSupportIncluded - VMSizes that have the feature support and that do not have the feature support will be used.
// Included is a union of Excluded and Required.
VMAttributeSupportIncluded VMAttributeSupport = "Included"
// VMAttributeSupportRequired - Only the VMSizes having the feature support will be used.
VMAttributeSupportRequired VMAttributeSupport = "Required"
)
// PossibleVMAttributeSupportValues returns the possible values for the VMAttributeSupport const type.
func PossibleVMAttributeSupportValues() []VMAttributeSupport {
return []VMAttributeSupport{
VMAttributeSupportExcluded,
VMAttributeSupportIncluded,
VMAttributeSupportRequired,
}
}
// VMCategory - VMCategories defined for Azure VMs.
// See: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose
type VMCategory string
const (
// VMCategoryComputeOptimized - Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium
// traffic web servers, network appliances, batch processes, and application servers.
VMCategoryComputeOptimized VMCategory = "ComputeOptimized"
// VMCategoryFpgaAccelerated - FPGA optimized VM sizes are specialized virtual machines available with single or multiple
// FPGA.
// These sizes are designed for compute-intensive workloads. This article provides information about the number and type of
// FPGA, vCPUs, data disks, and NICs.
// Storage throughput and network bandwidth are also included for each size in this grouping.
VMCategoryFpgaAccelerated VMCategory = "FpgaAccelerated"
// VMCategoryGeneralPurpose - General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development,
// small to medium databases, and low to medium traffic web servers.
VMCategoryGeneralPurpose VMCategory = "GeneralPurpose"
// VMCategoryGpuAccelerated - GPU optimized VM sizes are specialized virtual machines available with single, multiple, or
// fractional GPUs.
// These sizes are designed for compute-intensive, graphics-intensive, and visualization workloads.
VMCategoryGpuAccelerated VMCategory = "GpuAccelerated"
// VMCategoryHighPerformanceCompute - Azure High Performance Compute VMs are optimized for various HPC workloads such as computational
// fluid dynamics, finite element analysis, frontend and backend EDA,
// rendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis.
VMCategoryHighPerformanceCompute VMCategory = "HighPerformanceCompute"
// VMCategoryMemoryOptimized - Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database
// servers, medium to large caches, and in-memory analytics.
VMCategoryMemoryOptimized VMCategory = "MemoryOptimized"
// VMCategoryStorageOptimized - Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal
// for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases.
// Examples include Cassandra, MongoDB, Cloudera, and Redis.
VMCategoryStorageOptimized VMCategory = "StorageOptimized"
)
// PossibleVMCategoryValues returns the possible values for the VMCategory const type.
func PossibleVMCategoryValues() []VMCategory {
return []VMCategory{
VMCategoryComputeOptimized,
VMCategoryFpgaAccelerated,
VMCategoryGeneralPurpose,
VMCategoryGpuAccelerated,
VMCategoryHighPerformanceCompute,
VMCategoryMemoryOptimized,
VMCategoryStorageOptimized,
}
}
// WindowsPatchAssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.
type WindowsPatchAssessmentMode string

Просмотреть файл

@ -42,7 +42,7 @@ func NewFleetsClient(subscriptionID string, credential azcore.TokenCredential, o
// BeginCreateOrUpdate - Create a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Compute Fleet
// - resource - Resource create parameters.
@ -69,7 +69,7 @@ func (client *FleetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGro
// CreateOrUpdate - Create a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
func (client *FleetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, resource Fleet, options *FleetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "FleetsClient.BeginCreateOrUpdate"
@ -111,7 +111,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
req.Raw().Header["Content-Type"] = []string{"application/json"}
@ -124,7 +124,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res
// BeginDelete - Delete a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Compute Fleet
// - options - FleetsClientBeginDeleteOptions contains the optional parameters for the FleetsClient.BeginDelete method.
@ -148,7 +148,7 @@ func (client *FleetsClient) BeginDelete(ctx context.Context, resourceGroupName s
// Delete - Delete a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
func (client *FleetsClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "FleetsClient.BeginDelete"
@ -190,7 +190,7 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -199,7 +199,7 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro
// Get - Get a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Compute Fleet
// - options - FleetsClientGetOptions contains the optional parameters for the FleetsClient.Get method.
@ -245,7 +245,7 @@ func (client *FleetsClient) getCreateRequest(ctx context.Context, resourceGroupN
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -262,7 +262,7 @@ func (client *FleetsClient) getHandleResponse(resp *http.Response) (FleetsClient
// NewListByResourceGroupPager - List Fleet resources by resource group
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - options - FleetsClientListByResourceGroupOptions contains the optional parameters for the FleetsClient.NewListByResourceGroupPager
// method.
@ -305,7 +305,7 @@ func (client *FleetsClient) listByResourceGroupCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -322,7 +322,7 @@ func (client *FleetsClient) listByResourceGroupHandleResponse(resp *http.Respons
// NewListBySubscriptionPager - List Fleet resources by subscription ID
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - options - FleetsClientListBySubscriptionOptions contains the optional parameters for the FleetsClient.NewListBySubscriptionPager
// method.
func (client *FleetsClient) NewListBySubscriptionPager(options *FleetsClientListBySubscriptionOptions) *runtime.Pager[FleetsClientListBySubscriptionResponse] {
@ -360,7 +360,7 @@ func (client *FleetsClient) listBySubscriptionCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -377,7 +377,7 @@ func (client *FleetsClient) listBySubscriptionHandleResponse(resp *http.Response
// NewListVirtualMachineScaleSetsPager - List VirtualMachineScaleSet resources by Fleet
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - name - The name of the Fleet
// - options - FleetsClientListVirtualMachineScaleSetsOptions contains the optional parameters for the FleetsClient.NewListVirtualMachineScaleSetsPager
@ -425,7 +425,7 @@ func (client *FleetsClient) listVirtualMachineScaleSetsCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -443,7 +443,7 @@ func (client *FleetsClient) listVirtualMachineScaleSetsHandleResponse(resp *http
// BeginUpdate - Update a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Compute Fleet
// - properties - The resource properties to be updated.
@ -468,7 +468,7 @@ func (client *FleetsClient) BeginUpdate(ctx context.Context, resourceGroupName s
// Update - Update a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
func (client *FleetsClient) update(ctx context.Context, resourceGroupName string, fleetName string, properties FleetUpdate, options *FleetsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "FleetsClient.BeginUpdate"
@ -510,7 +510,7 @@ func (client *FleetsClient) updateCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
req.Raw().Header["Content-Type"] = []string{"application/json"}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2,10 +2,20 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcom
go 1.18
require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
)
require (
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
)

Просмотреть файл

@ -1,12 +1,29 @@
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

Просмотреть файл

@ -43,6 +43,24 @@ type APIErrorBase struct {
Target *string
}
// AdditionalCapabilities for VM.
type AdditionalCapabilities struct {
// The flag that enables or disables hibernation capability on the VM.
HibernationEnabled *bool
// The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account
// type on the VM or VMSS.
// Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only
// if this property is enabled.
UltraSSDEnabled *bool
}
// AdditionalLocationsProfile - Represents the configuration for additional locations where Fleet resources may be deployed.
type AdditionalLocationsProfile struct {
// REQUIRED; The list of location profiles.
LocationProfiles []*LocationProfile
}
// AdditionalUnattendContent - Specifies additional XML formatted information that can be included in the
// Unattend.xml file, which is used by Windows Setup. Contents are defined by
// setting name, component name, and the pass in which the content is applied.
@ -172,6 +190,12 @@ type ComputeProfile struct {
// REQUIRED; Base Virtual Machine Profile Properties to be specified according to "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile"
BaseVirtualMachineProfile *BaseVirtualMachineProfile
// Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled.
// ultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs.
// hibernationEnabled: Enables the hibernation capability on the VMSS VMs.
// Default value is null if not specified. This property cannot be updated once set.
AdditionalVirtualMachineCapabilities *AdditionalCapabilities
// Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and Virtual Machines.
// The default value will be the latest supported computeApiVersion by Compute Fleet.
ComputeAPIVersion *string
@ -277,12 +301,18 @@ type FleetProperties struct {
// REQUIRED; List of VM sizes supported for Compute Fleet
VMSizesProfile []*VMSizeProfile
// Represents the configuration for additional locations where Fleet resources may be deployed.
AdditionalLocationsProfile *AdditionalLocationsProfile
// Configuration Options for Regular instances in Compute Fleet.
RegularPriorityProfile *RegularPriorityProfile
// Configuration Options for Spot instances in Compute Fleet.
SpotPriorityProfile *SpotPriorityProfile
// Attribute based Fleet.
VMAttributes *VMAttributes
// READ-ONLY; The status of the last operation.
ProvisioningState *ProvisioningState
@ -428,6 +458,18 @@ type LinuxVMGuestPatchAutomaticByPlatformSettings struct {
RebootSetting *LinuxVMGuestPatchAutomaticByPlatformRebootSetting
}
// LocationProfile - Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride
// (optional).
type LocationProfile struct {
// REQUIRED; The ARM location name of the additional region. If LocationProfile is specified, then location is required.
Location *string
// An override for computeProfile.baseVirtualMachineProfile specific to this region.
// This override is merged with the base virtual machine profile to define the final virtual machine profile for the resources
// deployed in this location.
VirtualMachineProfileOverride *BaseVirtualMachineProfile
}
// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
type ManagedServiceIdentity struct {
// REQUIRED; The type of managed identity assigned to this resource.
@ -793,6 +835,104 @@ type UserAssignedIdentity struct {
PrincipalID *string
}
// VMAttributeMinMaxDouble - VMAttributes using double values.
type VMAttributeMinMaxDouble struct {
// Maximum value. Double.MaxValue(1.7976931348623157E+308)
Max *float64
// Minimum value. default 0. Double.MinValue()
Min *float64
}
// VMAttributeMinMaxInteger - While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295
// (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes.
type VMAttributeMinMaxInteger struct {
// Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.
Max *int32
// Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.
Min *int32
}
// VMAttributes that will be used to filter VMSizes which will be used to build Fleet.
type VMAttributes struct {
// REQUIRED; The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or
// Max is required if specified.
MemoryInGiB *VMAttributeMinMaxDouble
// REQUIRED; The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min
// or Max is required if specified.
VCPUCount *VMAttributeMinMaxInteger
// The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified.
// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute.
// If acceleratorSupport is "Excluded", this VMAttribute can not be used.
AcceleratorCount *VMAttributeMinMaxInteger
// The accelerator manufacturers specified as a list.
// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute.
// If acceleratorSupport is "Excluded", this VMAttribute can not be used.
AcceleratorManufacturers []*AcceleratorManufacturer
// Specifies whether the VMSize supporting accelerator should be used to build Fleet or not.
// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute.
// If acceleratorSupport is "Excluded", this VMAttribute can not be used.
AcceleratorSupport *VMAttributeSupport
// The accelerator types specified as a list. acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute.
// If acceleratorSupport is "Excluded", this VMAttribute can not be used.
AcceleratorTypes []*AcceleratorType
// The VM architecture types specified as a list. Optional parameter.
ArchitectureTypes []*ArchitectureType
// Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not.
BurstableSupport *VMAttributeSupport
// The VM CPU manufacturers specified as a list. Optional parameter.
CPUManufacturers []*CPUManufacturer
// The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.
DataDiskCount *VMAttributeMinMaxInteger
// Specifies which VMSizes should be excluded while building Fleet. Optional parameter.
ExcludedVMSizes []*string
// The local storage disk types specified as a list. LocalStorageSupport should be set to "Included" or "Required" to use
// this VMAttribute.
// If localStorageSupport is "Excluded", this VMAttribute can not be used.
LocalStorageDiskTypes []*LocalStorageDiskType
// LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute.
// If localStorageSupport is "Excluded", this VMAttribute can not be used.
LocalStorageInGiB *VMAttributeMinMaxDouble
// Specifies whether the VMSize supporting local storage should be used to build Fleet or not.
LocalStorageSupport *VMAttributeSupport
// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified.
MemoryInGiBPerVCpu *VMAttributeMinMaxDouble
// The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if
// specified.
NetworkBandwidthInMbps *VMAttributeMinMaxDouble
// The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.
NetworkInterfaceCount *VMAttributeMinMaxInteger
// The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter.
// Either Min or Max is required if specified.
// rdmaSupport should be set to "Included" or "Required" to use this VMAttribute.
// If rdmaSupport is "Excluded", this VMAttribute can not be used.
RdmaNetworkInterfaceCount *VMAttributeMinMaxInteger
// Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not.
RdmaSupport *VMAttributeSupport
// The VM category specified as a list. Optional parameter.
VMCategories []*VMCategory
}
// VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. **Note:** It can
// only be set for Confidential VMs.
type VMDiskSecurityProfile struct {

Просмотреть файл

@ -116,6 +116,64 @@ func (a *APIErrorBase) UnmarshalJSON(data []byte) error {
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AdditionalCapabilities.
func (a AdditionalCapabilities) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "hibernationEnabled", a.HibernationEnabled)
populate(objectMap, "ultraSSDEnabled", a.UltraSSDEnabled)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalCapabilities.
func (a *AdditionalCapabilities) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "hibernationEnabled":
err = unpopulate(val, "HibernationEnabled", &a.HibernationEnabled)
delete(rawMsg, key)
case "ultraSSDEnabled":
err = unpopulate(val, "UltraSSDEnabled", &a.UltraSSDEnabled)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AdditionalLocationsProfile.
func (a AdditionalLocationsProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "locationProfiles", a.LocationProfiles)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalLocationsProfile.
func (a *AdditionalLocationsProfile) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "locationProfiles":
err = unpopulate(val, "LocationProfiles", &a.LocationProfiles)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AdditionalUnattendContent.
func (a AdditionalUnattendContent) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@ -330,6 +388,7 @@ func (c *CapacityReservationProfile) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type ComputeProfile.
func (c ComputeProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "additionalVirtualMachineCapabilities", c.AdditionalVirtualMachineCapabilities)
populate(objectMap, "baseVirtualMachineProfile", c.BaseVirtualMachineProfile)
populate(objectMap, "computeApiVersion", c.ComputeAPIVersion)
populate(objectMap, "platformFaultDomainCount", c.PlatformFaultDomainCount)
@ -345,6 +404,9 @@ func (c *ComputeProfile) UnmarshalJSON(data []byte) error {
for key, val := range rawMsg {
var err error
switch key {
case "additionalVirtualMachineCapabilities":
err = unpopulate(val, "AdditionalVirtualMachineCapabilities", &c.AdditionalVirtualMachineCapabilities)
delete(rawMsg, key)
case "baseVirtualMachineProfile":
err = unpopulate(val, "BaseVirtualMachineProfile", &c.BaseVirtualMachineProfile)
delete(rawMsg, key)
@ -571,12 +633,14 @@ func (f *FleetListResult) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type FleetProperties.
func (f FleetProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "additionalLocationsProfile", f.AdditionalLocationsProfile)
populate(objectMap, "computeProfile", f.ComputeProfile)
populate(objectMap, "provisioningState", f.ProvisioningState)
populate(objectMap, "regularPriorityProfile", f.RegularPriorityProfile)
populate(objectMap, "spotPriorityProfile", f.SpotPriorityProfile)
populateDateTimeRFC3339(objectMap, "timeCreated", f.TimeCreated)
populate(objectMap, "uniqueId", f.UniqueID)
populate(objectMap, "vmAttributes", f.VMAttributes)
populate(objectMap, "vmSizesProfile", f.VMSizesProfile)
return json.Marshal(objectMap)
}
@ -590,6 +654,9 @@ func (f *FleetProperties) UnmarshalJSON(data []byte) error {
for key, val := range rawMsg {
var err error
switch key {
case "additionalLocationsProfile":
err = unpopulate(val, "AdditionalLocationsProfile", &f.AdditionalLocationsProfile)
delete(rawMsg, key)
case "computeProfile":
err = unpopulate(val, "ComputeProfile", &f.ComputeProfile)
delete(rawMsg, key)
@ -608,6 +675,9 @@ func (f *FleetProperties) UnmarshalJSON(data []byte) error {
case "uniqueId":
err = unpopulate(val, "UniqueID", &f.UniqueID)
delete(rawMsg, key)
case "vmAttributes":
err = unpopulate(val, "VMAttributes", &f.VMAttributes)
delete(rawMsg, key)
case "vmSizesProfile":
err = unpopulate(val, "VMSizesProfile", &f.VMSizesProfile)
delete(rawMsg, key)
@ -884,6 +954,37 @@ func (l *LinuxVMGuestPatchAutomaticByPlatformSettings) UnmarshalJSON(data []byte
return nil
}
// MarshalJSON implements the json.Marshaller interface for type LocationProfile.
func (l LocationProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "location", l.Location)
populate(objectMap, "virtualMachineProfileOverride", l.VirtualMachineProfileOverride)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type LocationProfile.
func (l *LocationProfile) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", l, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "location":
err = unpopulate(val, "Location", &l.Location)
delete(rawMsg, key)
case "virtualMachineProfileOverride":
err = unpopulate(val, "VirtualMachineProfileOverride", &l.VirtualMachineProfileOverride)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", l, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@ -1732,6 +1833,171 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error {
return nil
}
// MarshalJSON implements the json.Marshaller interface for type VMAttributeMinMaxDouble.
func (v VMAttributeMinMaxDouble) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "max", v.Max)
populate(objectMap, "min", v.Min)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type VMAttributeMinMaxDouble.
func (v *VMAttributeMinMaxDouble) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "max":
err = unpopulate(val, "Max", &v.Max)
delete(rawMsg, key)
case "min":
err = unpopulate(val, "Min", &v.Min)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type VMAttributeMinMaxInteger.
func (v VMAttributeMinMaxInteger) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "max", v.Max)
populate(objectMap, "min", v.Min)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type VMAttributeMinMaxInteger.
func (v *VMAttributeMinMaxInteger) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "max":
err = unpopulate(val, "Max", &v.Max)
delete(rawMsg, key)
case "min":
err = unpopulate(val, "Min", &v.Min)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type VMAttributes.
func (v VMAttributes) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "acceleratorCount", v.AcceleratorCount)
populate(objectMap, "acceleratorManufacturers", v.AcceleratorManufacturers)
populate(objectMap, "acceleratorSupport", v.AcceleratorSupport)
populate(objectMap, "acceleratorTypes", v.AcceleratorTypes)
populate(objectMap, "architectureTypes", v.ArchitectureTypes)
populate(objectMap, "burstableSupport", v.BurstableSupport)
populate(objectMap, "cpuManufacturers", v.CPUManufacturers)
populate(objectMap, "dataDiskCount", v.DataDiskCount)
populate(objectMap, "excludedVMSizes", v.ExcludedVMSizes)
populate(objectMap, "localStorageDiskTypes", v.LocalStorageDiskTypes)
populate(objectMap, "localStorageInGiB", v.LocalStorageInGiB)
populate(objectMap, "localStorageSupport", v.LocalStorageSupport)
populate(objectMap, "memoryInGiB", v.MemoryInGiB)
populate(objectMap, "memoryInGiBPerVCpu", v.MemoryInGiBPerVCpu)
populate(objectMap, "networkBandwidthInMbps", v.NetworkBandwidthInMbps)
populate(objectMap, "networkInterfaceCount", v.NetworkInterfaceCount)
populate(objectMap, "rdmaNetworkInterfaceCount", v.RdmaNetworkInterfaceCount)
populate(objectMap, "rdmaSupport", v.RdmaSupport)
populate(objectMap, "vCpuCount", v.VCPUCount)
populate(objectMap, "vmCategories", v.VMCategories)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type VMAttributes.
func (v *VMAttributes) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "acceleratorCount":
err = unpopulate(val, "AcceleratorCount", &v.AcceleratorCount)
delete(rawMsg, key)
case "acceleratorManufacturers":
err = unpopulate(val, "AcceleratorManufacturers", &v.AcceleratorManufacturers)
delete(rawMsg, key)
case "acceleratorSupport":
err = unpopulate(val, "AcceleratorSupport", &v.AcceleratorSupport)
delete(rawMsg, key)
case "acceleratorTypes":
err = unpopulate(val, "AcceleratorTypes", &v.AcceleratorTypes)
delete(rawMsg, key)
case "architectureTypes":
err = unpopulate(val, "ArchitectureTypes", &v.ArchitectureTypes)
delete(rawMsg, key)
case "burstableSupport":
err = unpopulate(val, "BurstableSupport", &v.BurstableSupport)
delete(rawMsg, key)
case "cpuManufacturers":
err = unpopulate(val, "CPUManufacturers", &v.CPUManufacturers)
delete(rawMsg, key)
case "dataDiskCount":
err = unpopulate(val, "DataDiskCount", &v.DataDiskCount)
delete(rawMsg, key)
case "excludedVMSizes":
err = unpopulate(val, "ExcludedVMSizes", &v.ExcludedVMSizes)
delete(rawMsg, key)
case "localStorageDiskTypes":
err = unpopulate(val, "LocalStorageDiskTypes", &v.LocalStorageDiskTypes)
delete(rawMsg, key)
case "localStorageInGiB":
err = unpopulate(val, "LocalStorageInGiB", &v.LocalStorageInGiB)
delete(rawMsg, key)
case "localStorageSupport":
err = unpopulate(val, "LocalStorageSupport", &v.LocalStorageSupport)
delete(rawMsg, key)
case "memoryInGiB":
err = unpopulate(val, "MemoryInGiB", &v.MemoryInGiB)
delete(rawMsg, key)
case "memoryInGiBPerVCpu":
err = unpopulate(val, "MemoryInGiBPerVCpu", &v.MemoryInGiBPerVCpu)
delete(rawMsg, key)
case "networkBandwidthInMbps":
err = unpopulate(val, "NetworkBandwidthInMbps", &v.NetworkBandwidthInMbps)
delete(rawMsg, key)
case "networkInterfaceCount":
err = unpopulate(val, "NetworkInterfaceCount", &v.NetworkInterfaceCount)
delete(rawMsg, key)
case "rdmaNetworkInterfaceCount":
err = unpopulate(val, "RdmaNetworkInterfaceCount", &v.RdmaNetworkInterfaceCount)
delete(rawMsg, key)
case "rdmaSupport":
err = unpopulate(val, "RdmaSupport", &v.RdmaSupport)
delete(rawMsg, key)
case "vCpuCount":
err = unpopulate(val, "VCPUCount", &v.VCPUCount)
delete(rawMsg, key)
case "vmCategories":
err = unpopulate(val, "VMCategories", &v.VMCategories)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type VMDiskSecurityProfile.
func (v VMDiskSecurityProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)

Просмотреть файл

@ -35,7 +35,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO
// NewListPager - List the operations for the provider
//
// Generated from API version 2024-05-01-preview
// Generated from API version 2024-11-01
// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{
@ -68,7 +68,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-01-preview")
reqQP.Set("api-version", "2024-11-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

Просмотреть файл

@ -0,0 +1,98 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armcomputefleet_test
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
"log"
)
// Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/TempTypeSpecFiles/AzureFleet.Management/examples/2024-11-01/Operations_List.json
func ExampleOperationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcomputefleet.NewClientFactory("<subscriptionID>", 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"),
// },
// },
// },
// },
// }
}
}

Просмотреть файл

@ -1,4 +1,4 @@
directory: specification/azurefleet/AzureFleet.Management
commit: aa23ddc02b2b1c5a34c56a49d83b77c0a1aaa614
commit: c120171b3684d88562fa26ae7db5d22b7bfa95d8
repo: Azure/azure-rest-api-specs
additionalDirectories:
additionalDirectories: