armcompute

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2022 License: MIT Imports: 18 Imported by: 84

README

Azure Compute Module for Go

PkgGoDev

The armcompute module provides operations for working with Azure Compute.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Compute module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Compute. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Compute modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armcompute.NewLogAnalyticsClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armcompute.NewLogAnalyticsClient(<subscription ID>, cred, &options)

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Compute label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIEntityReference

type APIEntityReference struct {
	// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/…
	ID *string `json:"id,omitempty"`
}

APIEntityReference - The API entity reference.

type APIError

type APIError struct {
	// The error code.
	Code *string `json:"code,omitempty"`

	// The Api error details
	Details []*APIErrorBase `json:"details,omitempty"`

	// The Api inner error
	Innererror *InnerError `json:"innererror,omitempty"`

	// The error message.
	Message *string `json:"message,omitempty"`

	// The target of the particular error.
	Target *string `json:"target,omitempty"`
}

APIError - Api error.

func (APIError) MarshalJSON

func (a APIError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIError.

type APIErrorBase

type APIErrorBase struct {
	// The error code.
	Code *string `json:"code,omitempty"`

	// The error message.
	Message *string `json:"message,omitempty"`

	// The target of the particular error.
	Target *string `json:"target,omitempty"`
}

APIErrorBase - Api error base.

type AccessLevel

type AccessLevel string
const (
	AccessLevelNone  AccessLevel = "None"
	AccessLevelRead  AccessLevel = "Read"
	AccessLevelWrite AccessLevel = "Write"
)

func PossibleAccessLevelValues

func PossibleAccessLevelValues() []AccessLevel

PossibleAccessLevelValues returns the possible values for the AccessLevel const type.

type AccessURI

type AccessURI struct {
	// READ-ONLY; A SAS uri for accessing a disk.
	AccessSAS *string `json:"accessSAS,omitempty" azure:"ro"`

	// READ-ONLY; A SAS uri for accessing a VM guest state.
	SecurityDataAccessSAS *string `json:"securityDataAccessSAS,omitempty" azure:"ro"`
}

AccessURI - A disk access SAS uri.

type AdditionalCapabilities

type AdditionalCapabilities struct {
	// The flag that enables or disables hibernation capability on the VM.
	HibernationEnabled *bool `json:"hibernationEnabled,omitempty"`

	// The flag that enables or disables a capability to have one or more managed data disks with UltraSSDLRS storage account
	// type on the VM or VMSS. Managed disks with storage account type UltraSSDLRS can
	// be added to a virtual machine or virtual machine scale set only if this property is enabled.
	UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
}

AdditionalCapabilities - Enables or disables a capability on the virtual machine or virtual machine scale set.

type AdditionalUnattendContent

type AdditionalUnattendContent struct {
	// The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
	ComponentName *string `json:"componentName,omitempty"`

	// Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML
	// must be less than 4KB and must include the root element for the setting or
	// feature that is being inserted.
	Content *string `json:"content,omitempty"`

	// The pass name. Currently, the only allowable value is OobeSystem.
	PassName *string `json:"passName,omitempty"`

	// Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
	SettingName *SettingNames `json:"settingName,omitempty"`
}

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.

type AggregatedReplicationState

type AggregatedReplicationState string

AggregatedReplicationState - This is the aggregated replication status based on all the regional replication status flags.

const (
	AggregatedReplicationStateCompleted  AggregatedReplicationState = "Completed"
	AggregatedReplicationStateFailed     AggregatedReplicationState = "Failed"
	AggregatedReplicationStateInProgress AggregatedReplicationState = "InProgress"
	AggregatedReplicationStateUnknown    AggregatedReplicationState = "Unknown"
)

func PossibleAggregatedReplicationStateValues

func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState

PossibleAggregatedReplicationStateValues returns the possible values for the AggregatedReplicationState const type.

type ApplicationProfile

type ApplicationProfile struct {
	// Specifies the gallery applications that should be made available to the VM/VMSS
	GalleryApplications []*VMGalleryApplication `json:"galleryApplications,omitempty"`
}

ApplicationProfile - Contains the list of gallery applications that should be made available to the VM/VMSS

func (ApplicationProfile) MarshalJSON

func (a ApplicationProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationProfile.

type Architecture added in v0.4.0

type Architecture string

Architecture - The architecture of the image. Applicable to OS disks only.

const (
	ArchitectureArm64 Architecture = "Arm64"
	ArchitectureX64   Architecture = "x64"
)

func PossibleArchitectureValues added in v0.4.0

func PossibleArchitectureValues() []Architecture

PossibleArchitectureValues returns the possible values for the Architecture const type.

type ArchitectureTypes added in v0.4.0

type ArchitectureTypes string

ArchitectureTypes - Specifies the Architecture Type

const (
	ArchitectureTypesArm64 ArchitectureTypes = "Arm64"
	ArchitectureTypesX64   ArchitectureTypes = "x64"
)

func PossibleArchitectureTypesValues added in v0.4.0

func PossibleArchitectureTypesValues() []ArchitectureTypes

PossibleArchitectureTypesValues returns the possible values for the ArchitectureTypes const type.

type AutomaticOSUpgradePolicy

type AutomaticOSUpgradePolicy struct {
	// Whether OS image rollback feature should be disabled. Default value is false.
	DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`

	// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer
	// version of the OS image becomes available. Default value is false.
	// If this is set to true for Windows based scale sets, enableAutomaticUpdates
	// [https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet]
	// is automatically set to false and cannot be set to true.
	EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`

	// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade
	// will fallback to the default policy if no policy is defined on the VMSS.
	UseRollingUpgradePolicy *bool `json:"useRollingUpgradePolicy,omitempty"`
}

AutomaticOSUpgradePolicy - The configuration parameters used for performing automatic OS upgrade.

type AutomaticOSUpgradeProperties

type AutomaticOSUpgradeProperties struct {
	// REQUIRED; Specifies whether automatic OS upgrade is supported on the image.
	AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
}

AutomaticOSUpgradeProperties - Describes automatic OS upgrade properties on the image.

type AutomaticRepairsPolicy

type AutomaticRepairsPolicy struct {
	// Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
	Enabled *bool `json:"enabled,omitempty"`

	// The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the
	// state change has completed. This helps avoid premature or accidental repairs.
	// The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which
	// is also the default value. The maximum allowed grace period is 90 minutes
	// (PT90M).
	GracePeriod *string `json:"gracePeriod,omitempty"`

	// Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale
	// set. Default value is replace.
	RepairAction *RepairAction `json:"repairAction,omitempty"`
}

AutomaticRepairsPolicy - Specifies the configuration parameters for automatic repairs on the virtual machine scale set.

type AvailabilitySet

type AvailabilitySet struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The instance view of a resource.
	Properties *AvailabilitySetProperties `json:"properties,omitempty"`

	// Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use
	// 'Aligned' for virtual machines with managed disks and 'Classic' for virtual
	// machines with unmanaged disks. Default value is 'Classic'.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview]. For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates] Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

func (AvailabilitySet) MarshalJSON

func (a AvailabilitySet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailabilitySet.

type AvailabilitySetListResult

type AvailabilitySetListResult struct {
	// REQUIRED; The list of availability sets
	Value []*AvailabilitySet `json:"value,omitempty"`

	// The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
	NextLink *string `json:"nextLink,omitempty"`
}

AvailabilitySetListResult - The List Availability Set operation response.

type AvailabilitySetProperties

type AvailabilitySetProperties struct {
	// Fault Domain count.
	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`

	// Update Domain count.
	PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`

	// Specifies information about the proximity placement group that the availability set should be assigned to.
	// Minimum api-version: 2018-04-01.
	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`

	// A list of references to all virtual machines in the availability set.
	VirtualMachines []*SubResource `json:"virtualMachines,omitempty"`

	// READ-ONLY; The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty" azure:"ro"`
}

AvailabilitySetProperties - The instance view of a resource.

func (AvailabilitySetProperties) MarshalJSON

func (a AvailabilitySetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailabilitySetProperties.

type AvailabilitySetSKUTypes

type AvailabilitySetSKUTypes string

AvailabilitySetSKUTypes - Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.

const (
	AvailabilitySetSKUTypesAligned AvailabilitySetSKUTypes = "Aligned"
	AvailabilitySetSKUTypesClassic AvailabilitySetSKUTypes = "Classic"
)

func PossibleAvailabilitySetSKUTypesValues

func PossibleAvailabilitySetSKUTypesValues() []AvailabilitySetSKUTypes

PossibleAvailabilitySetSKUTypesValues returns the possible values for the AvailabilitySetSKUTypes const type.

type AvailabilitySetUpdate

type AvailabilitySetUpdate struct {
	// The instance view of a resource.
	Properties *AvailabilitySetProperties `json:"properties,omitempty"`

	// Sku of the availability set
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

AvailabilitySetUpdate - Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated.

func (AvailabilitySetUpdate) MarshalJSON

func (a AvailabilitySetUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailabilitySetUpdate.

type AvailabilitySetsClient

type AvailabilitySetsClient struct {
	// contains filtered or unexported fields
}

AvailabilitySetsClient contains the methods for the AvailabilitySets group. Don't use this type directly, use NewAvailabilitySetsClient() instead.

func NewAvailabilitySetsClient

func NewAvailabilitySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailabilitySetsClient, error)

NewAvailabilitySetsClient creates a new instance of AvailabilitySetsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AvailabilitySetsClient) CreateOrUpdate

func (client *AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet, options *AvailabilitySetsClientCreateOrUpdateOptions) (AvailabilitySetsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update an availability set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. availabilitySetName - The name of the availability set. parameters - Parameters supplied to the Create Availability Set operation. options - AvailabilitySetsClientCreateOrUpdateOptions contains the optional parameters for the AvailabilitySetsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySet_Create.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroup",
		"myAvailabilitySet",
		armcompute.AvailabilitySet{
			Location: to.Ptr("westus"),
			Properties: &armcompute.AvailabilitySetProperties{
				PlatformFaultDomainCount:  to.Ptr[int32](2),
				PlatformUpdateDomainCount: to.Ptr[int32](20),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AvailabilitySetsClient) Delete

func (client *AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientDeleteOptions) (AvailabilitySetsClientDeleteResponse, error)

Delete - Delete an availability set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. availabilitySetName - The name of the availability set. options - AvailabilitySetsClientDeleteOptions contains the optional parameters for the AvailabilitySetsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySets_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AvailabilitySetsClient) Get

func (client *AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientGetOptions) (AvailabilitySetsClientGetResponse, error)

Get - Retrieves information about an availability set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. availabilitySetName - The name of the availability set. options - AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySets_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rgcompute",
		"aaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AvailabilitySetsClient) NewListAvailableSizesPager added in v0.7.0

func (client *AvailabilitySetsClient) NewListAvailableSizesPager(resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientListAvailableSizesOptions) *runtime.Pager[AvailabilitySetsClientListAvailableSizesResponse]

NewListAvailableSizesPager - Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. availabilitySetName - The name of the availability set. options - AvailabilitySetsClientListAvailableSizesOptions contains the optional parameters for the AvailabilitySetsClient.ListAvailableSizes method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySets_ListAvailableSizes_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAvailableSizesPager("rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AvailabilitySetsClient) NewListBySubscriptionPager added in v0.7.0

NewListBySubscriptionPager - Lists all availability sets in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySet_ListBySubscription.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(&armcompute.AvailabilitySetsClientListBySubscriptionOptions{Expand: to.Ptr("virtualMachines\\$ref")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AvailabilitySetsClient) NewListPager added in v0.7.0

NewListPager - Lists all availability sets in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - AvailabilitySetsClientListOptions contains the optional parameters for the AvailabilitySetsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySets_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rgcompute",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AvailabilitySetsClient) Update

func (client *AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate, options *AvailabilitySetsClientUpdateOptions) (AvailabilitySetsClientUpdateResponse, error)

Update - Update an availability set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. availabilitySetName - The name of the availability set. parameters - Parameters supplied to the Update Availability Set operation. options - AvailabilitySetsClientUpdateOptions contains the optional parameters for the AvailabilitySetsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/availabilitySetExamples/AvailabilitySets_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewAvailabilitySetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaa",
		armcompute.AvailabilitySetUpdate{
			Tags: map[string]*string{
				"key2574": to.Ptr("aaaaaaaa"),
			},
			Properties: &armcompute.AvailabilitySetProperties{
				PlatformFaultDomainCount:  to.Ptr[int32](2),
				PlatformUpdateDomainCount: to.Ptr[int32](20),
				ProximityPlacementGroup: &armcompute.SubResource{
					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
				},
				VirtualMachines: []*armcompute.SubResource{
					{
						ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
					}},
			},
			SKU: &armcompute.SKU{
				Name:     to.Ptr("DSv3-Type1"),
				Capacity: to.Ptr[int64](7),
				Tier:     to.Ptr("aaa"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AvailabilitySetsClientCreateOrUpdateOptions added in v0.3.0

type AvailabilitySetsClientCreateOrUpdateOptions struct {
}

AvailabilitySetsClientCreateOrUpdateOptions contains the optional parameters for the AvailabilitySetsClient.CreateOrUpdate method.

type AvailabilitySetsClientCreateOrUpdateResponse added in v0.3.0

type AvailabilitySetsClientCreateOrUpdateResponse struct {
	AvailabilitySet
}

AvailabilitySetsClientCreateOrUpdateResponse contains the response from method AvailabilitySetsClient.CreateOrUpdate.

type AvailabilitySetsClientDeleteOptions added in v0.3.0

type AvailabilitySetsClientDeleteOptions struct {
}

AvailabilitySetsClientDeleteOptions contains the optional parameters for the AvailabilitySetsClient.Delete method.

type AvailabilitySetsClientDeleteResponse added in v0.3.0

type AvailabilitySetsClientDeleteResponse struct {
}

AvailabilitySetsClientDeleteResponse contains the response from method AvailabilitySetsClient.Delete.

type AvailabilitySetsClientGetOptions added in v0.3.0

type AvailabilitySetsClientGetOptions struct {
}

AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.

type AvailabilitySetsClientGetResponse added in v0.3.0

type AvailabilitySetsClientGetResponse struct {
	AvailabilitySet
}

AvailabilitySetsClientGetResponse contains the response from method AvailabilitySetsClient.Get.

type AvailabilitySetsClientListAvailableSizesOptions added in v0.3.0

type AvailabilitySetsClientListAvailableSizesOptions struct {
}

AvailabilitySetsClientListAvailableSizesOptions contains the optional parameters for the AvailabilitySetsClient.ListAvailableSizes method.

type AvailabilitySetsClientListAvailableSizesResponse added in v0.3.0

type AvailabilitySetsClientListAvailableSizesResponse struct {
	VirtualMachineSizeListResult
}

AvailabilitySetsClientListAvailableSizesResponse contains the response from method AvailabilitySetsClient.ListAvailableSizes.

type AvailabilitySetsClientListBySubscriptionOptions added in v0.3.0

type AvailabilitySetsClientListBySubscriptionOptions struct {
	// The expand expression to apply to the operation. Allowed values are 'instanceView'.
	Expand *string
}

AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.ListBySubscription method.

type AvailabilitySetsClientListBySubscriptionResponse added in v0.3.0

type AvailabilitySetsClientListBySubscriptionResponse struct {
	AvailabilitySetListResult
}

AvailabilitySetsClientListBySubscriptionResponse contains the response from method AvailabilitySetsClient.ListBySubscription.

type AvailabilitySetsClientListOptions added in v0.3.0

type AvailabilitySetsClientListOptions struct {
}

AvailabilitySetsClientListOptions contains the optional parameters for the AvailabilitySetsClient.List method.

type AvailabilitySetsClientListResponse added in v0.3.0

type AvailabilitySetsClientListResponse struct {
	AvailabilitySetListResult
}

AvailabilitySetsClientListResponse contains the response from method AvailabilitySetsClient.List.

type AvailabilitySetsClientUpdateOptions added in v0.3.0

type AvailabilitySetsClientUpdateOptions struct {
}

AvailabilitySetsClientUpdateOptions contains the optional parameters for the AvailabilitySetsClient.Update method.

type AvailabilitySetsClientUpdateResponse added in v0.3.0

type AvailabilitySetsClientUpdateResponse struct {
	AvailabilitySet
}

AvailabilitySetsClientUpdateResponse contains the response from method AvailabilitySetsClient.Update.

type AvailablePatchSummary

type AvailablePatchSummary struct {
	// READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
	// logs.
	AssessmentActivityID *string `json:"assessmentActivityId,omitempty" azure:"ro"`

	// READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
	Error *APIError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the operation began.
	LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"`

	// READ-ONLY; The number of all available patches excluding critical and security.
	OtherPatchCount *int32 `json:"otherPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete
	// installation but the reboot has not yet occurred.
	RebootPending *bool `json:"rebootPending,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the operation began.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
	// At that point it will become "Unknown", "Failed", "Succeeded", or
	// "CompletedWithWarnings."
	Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"`
}

AvailablePatchSummary - Describes the properties of an virtual machine instance view for available patch summary.

func (AvailablePatchSummary) MarshalJSON

func (a AvailablePatchSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailablePatchSummary.

func (*AvailablePatchSummary) UnmarshalJSON

func (a *AvailablePatchSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePatchSummary.

type BillingProfile

type BillingProfile struct {
	// Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.
	// This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time
	// of create/update of Azure Spot VM/VMSS and the operation will only succeed if
	// the maxPrice is greater than the current Azure Spot price.
	// The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice
	// after creation of VM/VMSS.
	// Possible values are:
	// - Any decimal value greater than zero. Example: 0.01538
	// -1 – indicates default price to be up-to on-demand.
	// You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the
	// default max price is -1 if it is not provided by you.
	// Minimum api-version: 2019-03-01.
	MaxPrice *float64 `json:"maxPrice,omitempty"`
}

BillingProfile - Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.

type BootDiagnostics

type BootDiagnostics struct {
	// Whether boot diagnostics should be enabled on the Virtual Machine.
	Enabled *bool `json:"enabled,omitempty"`

	// Uri of the storage account to use for placing the console output and screenshot.
	// If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
	StorageURI *string `json:"storageUri,omitempty"`
}

BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.

type BootDiagnosticsInstanceView

type BootDiagnosticsInstanceView struct {
	// READ-ONLY; The console screenshot blob URI.
	// NOTE: This will not be set if boot diagnostics is currently enabled with managed storage.
	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty" azure:"ro"`

	// READ-ONLY; The serial console log blob Uri.
	// NOTE: This will not be set if boot diagnostics is currently enabled with managed storage.
	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty" azure:"ro"`

	// READ-ONLY; The boot diagnostics status information for the VM.
	// NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
	Status *InstanceViewStatus `json:"status,omitempty" azure:"ro"`
}

BootDiagnosticsInstanceView - The instance view of a virtual machine boot diagnostics.

type CachingTypes

type CachingTypes string

CachingTypes - Specifies the caching requirements. Possible values are: None ReadOnly ReadWrite Default: None for Standard storage. ReadOnly for Premium storage

const (
	CachingTypesNone      CachingTypes = "None"
	CachingTypesReadOnly  CachingTypes = "ReadOnly"
	CachingTypesReadWrite CachingTypes = "ReadWrite"
)

func PossibleCachingTypesValues

func PossibleCachingTypesValues() []CachingTypes

PossibleCachingTypesValues returns the possible values for the CachingTypes const type.

type CapacityReservation

type CapacityReservation struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// REQUIRED; SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently
	// VM Skus with the capability called 'CapacityReservationSupported' set to true are
	// supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list)
	// for supported values.
	SKU *SKU `json:"sku,omitempty"`

	// Properties of the Capacity reservation.
	Properties *CapacityReservationProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the
	// list of zones specified during the capacity reservation group creation. The zone
	// can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided,
	// enforces VM/VMSS using this capacity reservation to be in same zone.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CapacityReservation - Specifies information about the capacity reservation.

func (CapacityReservation) MarshalJSON

func (c CapacityReservation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservation.

type CapacityReservationGroup

type CapacityReservationGroup struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// capacity reservation group Properties.
	Properties *CapacityReservationGroupProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided,
	// the group supports only regional resources in the region. If provided,
	// enforces each capacity reservation in the group to be in one of the zones.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CapacityReservationGroup - Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.

func (CapacityReservationGroup) MarshalJSON

func (c CapacityReservationGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroup.

type CapacityReservationGroupInstanceView

type CapacityReservationGroupInstanceView struct {
	// READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group.
	CapacityReservations []*CapacityReservationInstanceViewWithName `json:"capacityReservations,omitempty" azure:"ro"`
}

func (CapacityReservationGroupInstanceView) MarshalJSON

func (c CapacityReservationGroupInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupInstanceView.

type CapacityReservationGroupInstanceViewTypes

type CapacityReservationGroupInstanceViewTypes string
const (
	CapacityReservationGroupInstanceViewTypesInstanceView CapacityReservationGroupInstanceViewTypes = "instanceView"
)

func PossibleCapacityReservationGroupInstanceViewTypesValues

func PossibleCapacityReservationGroupInstanceViewTypesValues() []CapacityReservationGroupInstanceViewTypes

PossibleCapacityReservationGroupInstanceViewTypesValues returns the possible values for the CapacityReservationGroupInstanceViewTypes const type.

type CapacityReservationGroupListResult

type CapacityReservationGroupListResult struct {
	// REQUIRED; The list of capacity reservation groups
	Value []*CapacityReservationGroup `json:"value,omitempty"`

	// The URI to fetch the next page of capacity reservation groups. Call ListNext() with this URI to fetch the next page of
	// capacity reservation groups.
	NextLink *string `json:"nextLink,omitempty"`
}

CapacityReservationGroupListResult - The List capacity reservation group with resource group response.

type CapacityReservationGroupProperties

type CapacityReservationGroupProperties struct {
	// READ-ONLY; A list of all capacity reservation resource ids that belong to capacity reservation group.
	CapacityReservations []*SubResourceReadOnly `json:"capacityReservations,omitempty" azure:"ro"`

	// READ-ONLY; The capacity reservation group instance view which has the list of instance views for all the capacity reservations
	// that belong to the capacity reservation group.
	InstanceView *CapacityReservationGroupInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; A list of references to all virtual machines associated to the capacity reservation group.
	VirtualMachinesAssociated []*SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty" azure:"ro"`
}

CapacityReservationGroupProperties - capacity reservation group Properties.

func (CapacityReservationGroupProperties) MarshalJSON

func (c CapacityReservationGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupProperties.

type CapacityReservationGroupUpdate

type CapacityReservationGroupUpdate struct {
	// capacity reservation group Properties.
	Properties *CapacityReservationGroupProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

CapacityReservationGroupUpdate - Specifies information about the capacity reservation group. Only tags can be updated.

func (CapacityReservationGroupUpdate) MarshalJSON

func (c CapacityReservationGroupUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupUpdate.

type CapacityReservationGroupsClient

type CapacityReservationGroupsClient struct {
	// contains filtered or unexported fields
}

CapacityReservationGroupsClient contains the methods for the CapacityReservationGroups group. Don't use this type directly, use NewCapacityReservationGroupsClient() instead.

func NewCapacityReservationGroupsClient

func NewCapacityReservationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacityReservationGroupsClient, error)

NewCapacityReservationGroupsClient creates a new instance of CapacityReservationGroupsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CapacityReservationGroupsClient) CreateOrUpdate

CreateOrUpdate - The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. parameters - Parameters supplied to the Create capacity reservation Group. options - CapacityReservationGroupsClientCreateOrUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroup",
		"myCapacityReservationGroup",
		armcompute.CapacityReservationGroup{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"department": to.Ptr("finance"),
			},
			Zones: []*string{
				to.Ptr("1"),
				to.Ptr("2")},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CapacityReservationGroupsClient) Delete

Delete - The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. options - CapacityReservationGroupsClientDeleteOptions contains the optional parameters for the CapacityReservationGroupsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservationGroup_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rgcompute",
		"a",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*CapacityReservationGroupsClient) Get

Get - The operation that retrieves information about a capacity reservation group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. options - CapacityReservationGroupsClientGetOptions contains the optional parameters for the CapacityReservationGroupsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservationGroup_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationGroupsClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myCapacityReservationGroup",
		&armcompute.CapacityReservationGroupsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CapacityReservationGroupsClient) NewListByResourceGroupPager added in v0.7.0

NewListByResourceGroupPager - Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - CapacityReservationGroupsClientListByResourceGroupOptions contains the optional parameters for the CapacityReservationGroupsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservationGroup_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		&armcompute.CapacityReservationGroupsClientListByResourceGroupOptions{Expand: to.Ptr(armcompute.ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef)})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*CapacityReservationGroupsClient) NewListBySubscriptionPager added in v0.7.0

NewListBySubscriptionPager - Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - CapacityReservationGroupsClientListBySubscriptionOptions contains the optional parameters for the CapacityReservationGroupsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservationGroup_ListBySubscription.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(&armcompute.CapacityReservationGroupsClientListBySubscriptionOptions{Expand: to.Ptr(armcompute.ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef)})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*CapacityReservationGroupsClient) Update

Update - The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. parameters - Parameters supplied to the Update capacity reservation Group operation. options - CapacityReservationGroupsClientUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservationGroup_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaa",
		armcompute.CapacityReservationGroupUpdate{
			Tags: map[string]*string{
				"key5355": to.Ptr("aaa"),
			},
			Properties: &armcompute.CapacityReservationGroupProperties{
				InstanceView: &armcompute.CapacityReservationGroupInstanceView{},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type CapacityReservationGroupsClientCreateOrUpdateOptions added in v0.3.0

type CapacityReservationGroupsClientCreateOrUpdateOptions struct {
}

CapacityReservationGroupsClientCreateOrUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.CreateOrUpdate method.

type CapacityReservationGroupsClientCreateOrUpdateResponse added in v0.3.0

type CapacityReservationGroupsClientCreateOrUpdateResponse struct {
	CapacityReservationGroup
}

CapacityReservationGroupsClientCreateOrUpdateResponse contains the response from method CapacityReservationGroupsClient.CreateOrUpdate.

type CapacityReservationGroupsClientDeleteOptions added in v0.3.0

type CapacityReservationGroupsClientDeleteOptions struct {
}

CapacityReservationGroupsClientDeleteOptions contains the optional parameters for the CapacityReservationGroupsClient.Delete method.

type CapacityReservationGroupsClientDeleteResponse added in v0.3.0

type CapacityReservationGroupsClientDeleteResponse struct {
}

CapacityReservationGroupsClientDeleteResponse contains the response from method CapacityReservationGroupsClient.Delete.

type CapacityReservationGroupsClientGetOptions added in v0.3.0

type CapacityReservationGroupsClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity
	// reservations under the capacity reservation group which is a snapshot of the
	// runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
	Expand *CapacityReservationGroupInstanceViewTypes
}

CapacityReservationGroupsClientGetOptions contains the optional parameters for the CapacityReservationGroupsClient.Get method.

type CapacityReservationGroupsClientGetResponse added in v0.3.0

type CapacityReservationGroupsClientGetResponse struct {
	CapacityReservationGroup
}

CapacityReservationGroupsClientGetResponse contains the response from method CapacityReservationGroupsClient.Get.

type CapacityReservationGroupsClientListByResourceGroupOptions added in v0.3.0

type CapacityReservationGroupsClientListByResourceGroupOptions struct {
	// The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet
	// VM Instance or both resource Ids which are associated to capacity
	// reservation group in the response.
	Expand *ExpandTypesForGetCapacityReservationGroups
}

CapacityReservationGroupsClientListByResourceGroupOptions contains the optional parameters for the CapacityReservationGroupsClient.ListByResourceGroup method.

type CapacityReservationGroupsClientListByResourceGroupResponse added in v0.3.0

type CapacityReservationGroupsClientListByResourceGroupResponse struct {
	CapacityReservationGroupListResult
}

CapacityReservationGroupsClientListByResourceGroupResponse contains the response from method CapacityReservationGroupsClient.ListByResourceGroup.

type CapacityReservationGroupsClientListBySubscriptionOptions added in v0.3.0

type CapacityReservationGroupsClientListBySubscriptionOptions struct {
	// The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet
	// VM Instance or both resource Ids which are associated to capacity
	// reservation group in the response.
	Expand *ExpandTypesForGetCapacityReservationGroups
}

CapacityReservationGroupsClientListBySubscriptionOptions contains the optional parameters for the CapacityReservationGroupsClient.ListBySubscription method.

type CapacityReservationGroupsClientListBySubscriptionResponse added in v0.3.0

type CapacityReservationGroupsClientListBySubscriptionResponse struct {
	CapacityReservationGroupListResult
}

CapacityReservationGroupsClientListBySubscriptionResponse contains the response from method CapacityReservationGroupsClient.ListBySubscription.

type CapacityReservationGroupsClientUpdateOptions added in v0.3.0

type CapacityReservationGroupsClientUpdateOptions struct {
}

CapacityReservationGroupsClientUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.Update method.

type CapacityReservationGroupsClientUpdateResponse added in v0.3.0

type CapacityReservationGroupsClientUpdateResponse struct {
	CapacityReservationGroup
}

CapacityReservationGroupsClientUpdateResponse contains the response from method CapacityReservationGroupsClient.Update.

type CapacityReservationInstanceView

type CapacityReservationInstanceView struct {
	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// Unutilized capacity of the capacity reservation.
	UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"`
}

CapacityReservationInstanceView - The instance view of a capacity reservation that provides as snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.

func (CapacityReservationInstanceView) MarshalJSON

func (c CapacityReservationInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationInstanceView.

type CapacityReservationInstanceViewTypes

type CapacityReservationInstanceViewTypes string
const (
	CapacityReservationInstanceViewTypesInstanceView CapacityReservationInstanceViewTypes = "instanceView"
)

func PossibleCapacityReservationInstanceViewTypesValues

func PossibleCapacityReservationInstanceViewTypesValues() []CapacityReservationInstanceViewTypes

PossibleCapacityReservationInstanceViewTypesValues returns the possible values for the CapacityReservationInstanceViewTypes const type.

type CapacityReservationInstanceViewWithName

type CapacityReservationInstanceViewWithName struct {
	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// Unutilized capacity of the capacity reservation.
	UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"`

	// READ-ONLY; The name of the capacity reservation.
	Name *string `json:"name,omitempty" azure:"ro"`
}

CapacityReservationInstanceViewWithName - The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the response to the instance view of a capacity reservation group.

func (CapacityReservationInstanceViewWithName) MarshalJSON

func (c CapacityReservationInstanceViewWithName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationInstanceViewWithName.

type CapacityReservationListResult

type CapacityReservationListResult struct {
	// REQUIRED; The list of capacity reservations
	Value []*CapacityReservation `json:"value,omitempty"`

	// The URI to fetch the next page of capacity reservations. Call ListNext() with this URI to fetch the next page of capacity
	// reservations.
	NextLink *string `json:"nextLink,omitempty"`
}

CapacityReservationListResult - The list capacity reservation operation response.

type CapacityReservationProfile

type CapacityReservationProfile struct {
	// Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset
	// vm instances provided enough capacity has been reserved. Please refer to
	// https://aka.ms/CapacityReservation for more details.
	CapacityReservationGroup *SubResource `json:"capacityReservationGroup,omitempty"`
}

CapacityReservationProfile - The parameters of a capacity reservation Profile.

type CapacityReservationProperties

type CapacityReservationProperties struct {
	// READ-ONLY; The Capacity reservation instance view.
	InstanceView *CapacityReservationInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The date time when the capacity reservation was last updated.
	ProvisioningTime *time.Time `json:"provisioningTime,omitempty" azure:"ro"`

	// READ-ONLY; A unique id generated and assigned to the capacity reservation by the platform which does not change throughout
	// the lifetime of the resource.
	ReservationID *string `json:"reservationId,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the time at which the Capacity Reservation resource was created.
	// Minimum api-version: 2022-03-01.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`

	// READ-ONLY; A list of all virtual machine resource ids that are associated with the capacity reservation.
	VirtualMachinesAssociated []*SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty" azure:"ro"`
}

CapacityReservationProperties - Properties of the Capacity reservation.

func (CapacityReservationProperties) MarshalJSON

func (c CapacityReservationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationProperties.

func (*CapacityReservationProperties) UnmarshalJSON

func (c *CapacityReservationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationProperties.

type CapacityReservationUpdate

type CapacityReservationUpdate struct {
	// Properties of the Capacity reservation.
	Properties *CapacityReservationProperties `json:"properties,omitempty"`

	// SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM
	// Skus with the capability called 'CapacityReservationSupported' set to true are
	// supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list)
	// for supported values.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

CapacityReservationUpdate - Specifies information about the capacity reservation. Only tags and sku.capacity can be updated.

func (CapacityReservationUpdate) MarshalJSON

func (c CapacityReservationUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationUpdate.

type CapacityReservationUtilization

type CapacityReservationUtilization struct {
	// READ-ONLY; A list of all virtual machines resource ids allocated against the capacity reservation.
	VirtualMachinesAllocated []*SubResourceReadOnly `json:"virtualMachinesAllocated,omitempty" azure:"ro"`
}

CapacityReservationUtilization - Represents the capacity reservation utilization in terms of resources allocated.

func (CapacityReservationUtilization) MarshalJSON

func (c CapacityReservationUtilization) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacityReservationUtilization.

type CapacityReservationsClient

type CapacityReservationsClient struct {
	// contains filtered or unexported fields
}

CapacityReservationsClient contains the methods for the CapacityReservations group. Don't use this type directly, use NewCapacityReservationsClient() instead.

func NewCapacityReservationsClient

func NewCapacityReservationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacityReservationsClient, error)

NewCapacityReservationsClient creates a new instance of CapacityReservationsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CapacityReservationsClient) BeginCreateOrUpdate

func (client *CapacityReservationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation, options *CapacityReservationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CapacityReservationsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. capacityReservationName - The name of the capacity reservation. parameters - Parameters supplied to the Create capacity reservation. options - CapacityReservationsClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservation_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myCapacityReservationGroup",
		"myCapacityReservation",
		armcompute.CapacityReservation{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"department": to.Ptr("HR"),
			},
			SKU: &armcompute.SKU{
				Name:     to.Ptr("Standard_DS1_v2"),
				Capacity: to.Ptr[int64](4),
			},
			Zones: []*string{
				to.Ptr("1")},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CapacityReservationsClient) BeginDelete

func (client *CapacityReservationsClient) BeginDelete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientBeginDeleteOptions) (*runtime.Poller[CapacityReservationsClientDeleteResponse], error)

BeginDelete - The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. capacityReservationName - The name of the capacity reservation. options - CapacityReservationsClientBeginDeleteOptions contains the optional parameters for the CapacityReservationsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservation_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*CapacityReservationsClient) BeginUpdate

func (client *CapacityReservationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate, options *CapacityReservationsClientBeginUpdateOptions) (*runtime.Poller[CapacityReservationsClientUpdateResponse], error)

BeginUpdate - The operation to update a capacity reservation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. capacityReservationName - The name of the capacity reservation. parameters - Parameters supplied to the Update capacity reservation operation. options - CapacityReservationsClientBeginUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservation_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"rgcompute",
		"aaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaa",
		armcompute.CapacityReservationUpdate{
			Tags: map[string]*string{
				"key4974": to.Ptr("aaaaaaaaaaaaaaaa"),
			},
			Properties: &armcompute.CapacityReservationProperties{
				InstanceView: &armcompute.CapacityReservationInstanceView{
					Statuses: []*armcompute.InstanceViewStatus{
						{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						}},
					UtilizationInfo: &armcompute.CapacityReservationUtilization{},
				},
			},
			SKU: &armcompute.SKU{
				Name:     to.Ptr("DSv3-Type1"),
				Capacity: to.Ptr[int64](7),
				Tier:     to.Ptr("aaa"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CapacityReservationsClient) Get

func (client *CapacityReservationsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientGetOptions) (CapacityReservationsClientGetResponse, error)

Get - The operation that retrieves information about the capacity reservation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. capacityReservationName - The name of the capacity reservation. options - CapacityReservationsClientGetOptions contains the optional parameters for the CapacityReservationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservation_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationsClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myCapacityReservationGroup",
		"myCapacityReservation",
		&armcompute.CapacityReservationsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CapacityReservationsClient) NewListByCapacityReservationGroupPager added in v0.7.0

func (client *CapacityReservationsClient) NewListByCapacityReservationGroupPager(resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationsClientListByCapacityReservationGroupOptions) *runtime.Pager[CapacityReservationsClientListByCapacityReservationGroupResponse]

NewListByCapacityReservationGroupPager - Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. capacityReservationGroupName - The name of the capacity reservation group. options - CapacityReservationsClientListByCapacityReservationGroupOptions contains the optional parameters for the CapacityReservationsClient.ListByCapacityReservationGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/capacityReservationExamples/CapacityReservation_ListByReservationGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCapacityReservationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByCapacityReservationGroupPager("myResourceGroup",
		"myCapacityReservationGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CapacityReservationsClientBeginCreateOrUpdateOptions added in v0.3.0

type CapacityReservationsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacityReservationsClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginCreateOrUpdate method.

type CapacityReservationsClientBeginDeleteOptions added in v0.3.0

type CapacityReservationsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacityReservationsClientBeginDeleteOptions contains the optional parameters for the CapacityReservationsClient.BeginDelete method.

type CapacityReservationsClientBeginUpdateOptions added in v0.3.0

type CapacityReservationsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacityReservationsClientBeginUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginUpdate method.

type CapacityReservationsClientCreateOrUpdateResponse added in v0.3.0

type CapacityReservationsClientCreateOrUpdateResponse struct {
	CapacityReservation
}

CapacityReservationsClientCreateOrUpdateResponse contains the response from method CapacityReservationsClient.CreateOrUpdate.

type CapacityReservationsClientDeleteResponse added in v0.3.0

type CapacityReservationsClientDeleteResponse struct {
}

CapacityReservationsClientDeleteResponse contains the response from method CapacityReservationsClient.Delete.

type CapacityReservationsClientGetOptions added in v0.3.0

type CapacityReservationsClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity
	// reservation that is managed by the platform and can change outside of
	// control plane operations.
	Expand *CapacityReservationInstanceViewTypes
}

CapacityReservationsClientGetOptions contains the optional parameters for the CapacityReservationsClient.Get method.

type CapacityReservationsClientGetResponse added in v0.3.0

type CapacityReservationsClientGetResponse struct {
	CapacityReservation
}

CapacityReservationsClientGetResponse contains the response from method CapacityReservationsClient.Get.

type CapacityReservationsClientListByCapacityReservationGroupOptions added in v0.3.0

type CapacityReservationsClientListByCapacityReservationGroupOptions struct {
}

CapacityReservationsClientListByCapacityReservationGroupOptions contains the optional parameters for the CapacityReservationsClient.ListByCapacityReservationGroup method.

type CapacityReservationsClientListByCapacityReservationGroupResponse added in v0.3.0

type CapacityReservationsClientListByCapacityReservationGroupResponse struct {
	CapacityReservationListResult
}

CapacityReservationsClientListByCapacityReservationGroupResponse contains the response from method CapacityReservationsClient.ListByCapacityReservationGroup.

type CapacityReservationsClientUpdateResponse added in v0.3.0

type CapacityReservationsClientUpdateResponse struct {
	CapacityReservation
}

CapacityReservationsClientUpdateResponse contains the response from method CapacityReservationsClient.Update.

type CloudError

type CloudError struct {
	// Api error.
	Error *APIError `json:"error,omitempty"`
}

CloudError - An error response from the Compute service.

type CloudService

type CloudService struct {
	// REQUIRED; Resource location.
	Location *string `json:"location,omitempty"`

	// Cloud service properties
	Properties *CloudServiceProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

CloudService - Describes the cloud service.

func (CloudService) MarshalJSON

func (c CloudService) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudService.

type CloudServiceExtensionProfile

type CloudServiceExtensionProfile struct {
	// List of extensions for the cloud service.
	Extensions []*Extension `json:"extensions,omitempty"`
}

CloudServiceExtensionProfile - Describes a cloud service extension profile.

func (CloudServiceExtensionProfile) MarshalJSON

func (c CloudServiceExtensionProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceExtensionProfile.

type CloudServiceExtensionProperties

type CloudServiceExtensionProperties struct {
	// Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become
	// available.
	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`

	// Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension
	// without changing any of the public or protected settings. If forceUpdateTag is
	// not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor
	// any of public or protected settings change, extension would flow to the role
	// instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not
	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`

	// Protected settings for the extension which are encrypted before sent to the role instance.
	ProtectedSettings             *string                              `json:"protectedSettings,omitempty"`
	ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference `json:"protectedSettingsFromKeyVault,omitempty"`

	// The name of the extension handler publisher.
	Publisher *string `json:"publisher,omitempty"`

	// Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied
	// to all roles in the cloud service.
	RolesAppliedTo []*string `json:"rolesAppliedTo,omitempty"`

	// Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension
	// (like RDP), this is the XML setting for the extension.
	Settings *string `json:"settings,omitempty"`

	// Specifies the type of the extension.
	Type *string `json:"type,omitempty"`

	// Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an
	// asterisk (*) is used as the value, the latest version of the extension is used.
	// If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor
	// version of the specified major version is selected. If a major version number
	// and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified,
	// an auto-upgrade is performed on the role instance.
	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

CloudServiceExtensionProperties - Extension Properties.

func (CloudServiceExtensionProperties) MarshalJSON

func (c CloudServiceExtensionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceExtensionProperties.

type CloudServiceInstanceView

type CloudServiceInstanceView struct {
	// Instance view statuses.
	RoleInstance *InstanceViewStatusesSummary `json:"roleInstance,omitempty"`

	// READ-ONLY; Specifies a list of unique identifiers generated internally for the cloud service.
	// NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
	PrivateIDs []*string `json:"privateIds,omitempty" azure:"ro"`

	// READ-ONLY; The version of the SDK that was used to generate the package for the cloud service.
	SdkVersion *string `json:"sdkVersion,omitempty" azure:"ro"`

	// READ-ONLY
	Statuses []*ResourceInstanceViewStatus `json:"statuses,omitempty" azure:"ro"`
}

CloudServiceInstanceView - InstanceView of CloudService as a whole

type CloudServiceListResult

type CloudServiceListResult struct {
	// REQUIRED
	Value    []*CloudService `json:"value,omitempty"`
	NextLink *string         `json:"nextLink,omitempty"`
}

type CloudServiceNetworkProfile

type CloudServiceNetworkProfile struct {
	// List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a
	// Public Load Balancer and an Internal Load Balancer.
	LoadBalancerConfigurations []*LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"`

	// The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap.
	// This property cannot be updated once it is set. The swappable cloud service
	// referred by this id must be present otherwise an error will be thrown.
	SwappableCloudService *SubResource `json:"swappableCloudService,omitempty"`
}

CloudServiceNetworkProfile - Network Profile for the cloud service.

func (CloudServiceNetworkProfile) MarshalJSON

func (c CloudServiceNetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceNetworkProfile.

type CloudServiceOperatingSystemsClient

type CloudServiceOperatingSystemsClient struct {
	// contains filtered or unexported fields
}

CloudServiceOperatingSystemsClient contains the methods for the CloudServiceOperatingSystems group. Don't use this type directly, use NewCloudServiceOperatingSystemsClient() instead.

func NewCloudServiceOperatingSystemsClient

func NewCloudServiceOperatingSystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceOperatingSystemsClient, error)

NewCloudServiceOperatingSystemsClient creates a new instance of CloudServiceOperatingSystemsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CloudServiceOperatingSystemsClient) GetOSFamily

GetOSFamily - Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 location - Name of the location that the OS family pertains to. osFamilyName - Name of the OS family. options - CloudServiceOperatingSystemsClientGetOSFamilyOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSFamily method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceOSFamily.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceOperatingSystemsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetOSFamily(ctx,
		"westus2",
		"3",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServiceOperatingSystemsClient) GetOSVersion

GetOSVersion - Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 location - Name of the location that the OS version pertains to. osVersionName - Name of the OS version. options - CloudServiceOperatingSystemsClientGetOSVersionOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSVersion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceOSVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceOperatingSystemsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetOSVersion(ctx,
		"westus2",
		"WA-GUEST-OS-3.90_202010-02",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServiceOperatingSystemsClient) NewListOSFamiliesPager added in v0.7.0

NewListOSFamiliesPager - Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 location - Name of the location that the OS families pertain to. options - CloudServiceOperatingSystemsClientListOSFamiliesOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.ListOSFamilies method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServiceOSFamilies.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceOperatingSystemsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListOSFamiliesPager("westus2",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*CloudServiceOperatingSystemsClient) NewListOSVersionsPager added in v0.7.0

NewListOSVersionsPager - Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 location - Name of the location that the OS versions pertain to. options - CloudServiceOperatingSystemsClientListOSVersionsOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.ListOSVersions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServiceOSVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceOperatingSystemsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListOSVersionsPager("westus2",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CloudServiceOperatingSystemsClientGetOSFamilyOptions added in v0.3.0

type CloudServiceOperatingSystemsClientGetOSFamilyOptions struct {
}

CloudServiceOperatingSystemsClientGetOSFamilyOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSFamily method.

type CloudServiceOperatingSystemsClientGetOSFamilyResponse added in v0.3.0

type CloudServiceOperatingSystemsClientGetOSFamilyResponse struct {
	OSFamily
}

CloudServiceOperatingSystemsClientGetOSFamilyResponse contains the response from method CloudServiceOperatingSystemsClient.GetOSFamily.

type CloudServiceOperatingSystemsClientGetOSVersionOptions added in v0.3.0

type CloudServiceOperatingSystemsClientGetOSVersionOptions struct {
}

CloudServiceOperatingSystemsClientGetOSVersionOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSVersion method.

type CloudServiceOperatingSystemsClientGetOSVersionResponse added in v0.3.0

type CloudServiceOperatingSystemsClientGetOSVersionResponse struct {
	OSVersion
}

CloudServiceOperatingSystemsClientGetOSVersionResponse contains the response from method CloudServiceOperatingSystemsClient.GetOSVersion.

type CloudServiceOperatingSystemsClientListOSFamiliesOptions added in v0.3.0

type CloudServiceOperatingSystemsClientListOSFamiliesOptions struct {
}

CloudServiceOperatingSystemsClientListOSFamiliesOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.ListOSFamilies method.

type CloudServiceOperatingSystemsClientListOSFamiliesResponse added in v0.3.0

type CloudServiceOperatingSystemsClientListOSFamiliesResponse struct {
	OSFamilyListResult
}

CloudServiceOperatingSystemsClientListOSFamiliesResponse contains the response from method CloudServiceOperatingSystemsClient.ListOSFamilies.

type CloudServiceOperatingSystemsClientListOSVersionsOptions added in v0.3.0

type CloudServiceOperatingSystemsClientListOSVersionsOptions struct {
}

CloudServiceOperatingSystemsClientListOSVersionsOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.ListOSVersions method.

type CloudServiceOperatingSystemsClientListOSVersionsResponse added in v0.3.0

type CloudServiceOperatingSystemsClientListOSVersionsResponse struct {
	OSVersionListResult
}

CloudServiceOperatingSystemsClientListOSVersionsResponse contains the response from method CloudServiceOperatingSystemsClient.ListOSVersions.

type CloudServiceOsProfile

type CloudServiceOsProfile struct {
	// Specifies set of certificates that should be installed onto the role instances.
	Secrets []*CloudServiceVaultSecretGroup `json:"secrets,omitempty"`
}

CloudServiceOsProfile - Describes the OS profile for the cloud service.

func (CloudServiceOsProfile) MarshalJSON

func (c CloudServiceOsProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceOsProfile.

type CloudServiceProperties

type CloudServiceProperties struct {
	// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override
	// the role instance count and vm size specified in the .cscfg and .csdef
	// respectively. The default value is false.
	AllowModelOverride *bool `json:"allowModelOverride,omitempty"`

	// Specifies the XML service configuration (.cscfg) for the cloud service.
	Configuration *string `json:"configuration,omitempty"`

	// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can
	// be Shared Access Signature (SAS) URI from any storage account. This is a
	// write-only property and is not returned in GET calls.
	ConfigurationURL *string `json:"configurationUrl,omitempty"`

	// Describes a cloud service extension profile.
	ExtensionProfile *CloudServiceExtensionProfile `json:"extensionProfile,omitempty"`

	// Network Profile for the cloud service.
	NetworkProfile *CloudServiceNetworkProfile `json:"networkProfile,omitempty"`

	// Describes the OS profile for the cloud service.
	OSProfile *CloudServiceOsProfile `json:"osProfile,omitempty"`

	// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be
	// Shared Access Signature (SAS) URI from any storage account. This is a write-only
	// property and is not returned in GET calls.
	PackageURL *string `json:"packageUrl,omitempty"`

	// Describes the role profile for the cloud service.
	RoleProfile *CloudServiceRoleProfile `json:"roleProfile,omitempty"`

	// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is true. If
	// false, the service model is still deployed, but the code is not run immediately.
	// Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service
	// still incurs charges, even if it is poweredoff.
	StartCloudService *bool `json:"startCloudService,omitempty"`

	// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates
	// can be initiated manually in each update domain or initiated automatically in
	// all update domains. Possible Values are
	// Auto
	// Manual
	// Simultaneous
	// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If
	// set to Auto, the update is automatically applied to each update domain in
	// sequence.
	UpgradeMode *CloudServiceUpgradeMode `json:"upgradeMode,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The unique identifier for the cloud service.
	UniqueID *string `json:"uniqueId,omitempty" azure:"ro"`
}

CloudServiceProperties - Cloud service properties

type CloudServiceRole

type CloudServiceRole struct {
	Properties *CloudServiceRoleProperties `json:"properties,omitempty"`

	// Describes the cloud service role sku.
	SKU *CloudServiceRoleSKU `json:"sku,omitempty"`

	// READ-ONLY; Resource id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CloudServiceRole - Describes a role of the cloud service.

type CloudServiceRoleInstancesClient

type CloudServiceRoleInstancesClient struct {
	// contains filtered or unexported fields
}

CloudServiceRoleInstancesClient contains the methods for the CloudServiceRoleInstances group. Don't use this type directly, use NewCloudServiceRoleInstancesClient() instead.

func NewCloudServiceRoleInstancesClient

func NewCloudServiceRoleInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceRoleInstancesClient, error)

NewCloudServiceRoleInstancesClient creates a new instance of CloudServiceRoleInstancesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CloudServiceRoleInstancesClient) BeginDelete

BeginDelete - Deletes a role instance from a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientBeginDeleteOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/DeleteCloudServiceRoleInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"{roleInstance-name}",
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServiceRoleInstancesClient) BeginRebuild

BeginRebuild - The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientBeginRebuildOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRebuild method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/RebuildCloudServiceRoleInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRebuild(ctx,
		"{roleInstance-name}",
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServiceRoleInstancesClient) BeginReimage

BeginReimage - The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientBeginReimageOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginReimage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ReimageCloudServiceRoleInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimage(ctx,
		"{roleInstance-name}",
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServiceRoleInstancesClient) BeginRestart

BeginRestart - The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientBeginRestartOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRestart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/RestartCloudServiceRoleInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx,
		"{roleInstance-name}",
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServiceRoleInstancesClient) Get

func (client *CloudServiceRoleInstancesClient) Get(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetOptions) (CloudServiceRoleInstancesClientGetResponse, error)

Get - Gets a role instance from a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientGetOptions contains the optional parameters for the CloudServiceRoleInstancesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceRoleInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"{roleInstance-name}",
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServiceRoleInstancesClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServiceRoleInstancesClient) GetInstanceView

GetInstanceView - Retrieves information about the run-time state of a role instance in a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientGetInstanceViewOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetInstanceView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetInstanceViewOfCloudServiceRoleInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetInstanceView(ctx,
		"{roleInstance-name}",
		"ConstosoRG",
		"{cs-name}",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServiceRoleInstancesClient) GetRemoteDesktopFile

GetRemoteDesktopFile - Gets a remote desktop file for a role instance in a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleInstanceName - Name of the role instance. options - CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetRemoteDesktopFile method.

func (*CloudServiceRoleInstancesClient) NewListPager added in v0.7.0

NewListPager - Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 options - CloudServiceRoleInstancesClientListOptions contains the optional parameters for the CloudServiceRoleInstancesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServiceRolesInstances.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRoleInstancesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServiceRoleInstancesClientListOptions{Expand: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CloudServiceRoleInstancesClientBeginDeleteOptions added in v0.3.0

type CloudServiceRoleInstancesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServiceRoleInstancesClientBeginDeleteOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginDelete method.

type CloudServiceRoleInstancesClientBeginRebuildOptions added in v0.3.0

type CloudServiceRoleInstancesClientBeginRebuildOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServiceRoleInstancesClientBeginRebuildOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRebuild method.

type CloudServiceRoleInstancesClientBeginReimageOptions added in v0.3.0

type CloudServiceRoleInstancesClientBeginReimageOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServiceRoleInstancesClientBeginReimageOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginReimage method.

type CloudServiceRoleInstancesClientBeginRestartOptions added in v0.3.0

type CloudServiceRoleInstancesClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServiceRoleInstancesClientBeginRestartOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRestart method.

type CloudServiceRoleInstancesClientDeleteResponse added in v0.3.0

type CloudServiceRoleInstancesClientDeleteResponse struct {
}

CloudServiceRoleInstancesClientDeleteResponse contains the response from method CloudServiceRoleInstancesClient.Delete.

type CloudServiceRoleInstancesClientGetInstanceViewOptions added in v0.3.0

type CloudServiceRoleInstancesClientGetInstanceViewOptions struct {
}

CloudServiceRoleInstancesClientGetInstanceViewOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetInstanceView method.

type CloudServiceRoleInstancesClientGetInstanceViewResponse added in v0.3.0

type CloudServiceRoleInstancesClientGetInstanceViewResponse struct {
	RoleInstanceView
}

CloudServiceRoleInstancesClientGetInstanceViewResponse contains the response from method CloudServiceRoleInstancesClient.GetInstanceView.

type CloudServiceRoleInstancesClientGetOptions added in v0.3.0

type CloudServiceRoleInstancesClientGetOptions struct {
	// The expand expression to apply to the operation. 'UserData' is not supported for cloud services.
	Expand *InstanceViewTypes
}

CloudServiceRoleInstancesClientGetOptions contains the optional parameters for the CloudServiceRoleInstancesClient.Get method.

type CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions added in v0.3.0

type CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions struct {
}

CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetRemoteDesktopFile method.

type CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse added in v0.3.0

type CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse struct {
	// Body contains the streaming response.
	Body io.ReadCloser
}

CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse contains the response from method CloudServiceRoleInstancesClient.GetRemoteDesktopFile.

type CloudServiceRoleInstancesClientGetResponse added in v0.3.0

type CloudServiceRoleInstancesClientGetResponse struct {
	RoleInstance
}

CloudServiceRoleInstancesClientGetResponse contains the response from method CloudServiceRoleInstancesClient.Get.

type CloudServiceRoleInstancesClientListOptions added in v0.3.0

type CloudServiceRoleInstancesClientListOptions struct {
	// The expand expression to apply to the operation. 'UserData' is not supported for cloud services.
	Expand *InstanceViewTypes
}

CloudServiceRoleInstancesClientListOptions contains the optional parameters for the CloudServiceRoleInstancesClient.List method.

type CloudServiceRoleInstancesClientListResponse added in v0.3.0

type CloudServiceRoleInstancesClientListResponse struct {
	RoleInstanceListResult
}

CloudServiceRoleInstancesClientListResponse contains the response from method CloudServiceRoleInstancesClient.List.

type CloudServiceRoleInstancesClientRebuildResponse added in v0.3.0

type CloudServiceRoleInstancesClientRebuildResponse struct {
}

CloudServiceRoleInstancesClientRebuildResponse contains the response from method CloudServiceRoleInstancesClient.Rebuild.

type CloudServiceRoleInstancesClientReimageResponse added in v0.3.0

type CloudServiceRoleInstancesClientReimageResponse struct {
}

CloudServiceRoleInstancesClientReimageResponse contains the response from method CloudServiceRoleInstancesClient.Reimage.

type CloudServiceRoleInstancesClientRestartResponse added in v0.3.0

type CloudServiceRoleInstancesClientRestartResponse struct {
}

CloudServiceRoleInstancesClientRestartResponse contains the response from method CloudServiceRoleInstancesClient.Restart.

type CloudServiceRoleListResult

type CloudServiceRoleListResult struct {
	// REQUIRED
	Value    []*CloudServiceRole `json:"value,omitempty"`
	NextLink *string             `json:"nextLink,omitempty"`
}

type CloudServiceRoleProfile

type CloudServiceRoleProfile struct {
	// List of roles for the cloud service.
	Roles []*CloudServiceRoleProfileProperties `json:"roles,omitempty"`
}

CloudServiceRoleProfile - Describes the role profile for the cloud service.

func (CloudServiceRoleProfile) MarshalJSON

func (c CloudServiceRoleProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleProfile.

type CloudServiceRoleProfileProperties

type CloudServiceRoleProfileProperties struct {
	// Resource name.
	Name *string `json:"name,omitempty"`

	// Describes the cloud service role sku.
	SKU *CloudServiceRoleSKU `json:"sku,omitempty"`
}

CloudServiceRoleProfileProperties - Describes the role properties.

type CloudServiceRoleProperties

type CloudServiceRoleProperties struct {
	// READ-ONLY; Specifies the ID which uniquely identifies a cloud service role.
	UniqueID *string `json:"uniqueId,omitempty" azure:"ro"`
}

type CloudServiceRoleSKU

type CloudServiceRoleSKU struct {
	// Specifies the number of role instances in the cloud service.
	Capacity *int64 `json:"capacity,omitempty"`

	// The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete
	// and recreate the cloud service or move back to the old sku.
	Name *string `json:"name,omitempty"`

	// Specifies the tier of the cloud service. Possible Values are
	// Standard
	// Basic
	Tier *string `json:"tier,omitempty"`
}

CloudServiceRoleSKU - Describes the cloud service role sku.

type CloudServiceRolesClient

type CloudServiceRolesClient struct {
	// contains filtered or unexported fields
}

CloudServiceRolesClient contains the methods for the CloudServiceRoles group. Don't use this type directly, use NewCloudServiceRolesClient() instead.

func NewCloudServiceRolesClient

func NewCloudServiceRolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceRolesClient, error)

NewCloudServiceRolesClient creates a new instance of CloudServiceRolesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CloudServiceRolesClient) Get

func (client *CloudServiceRolesClient) Get(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRolesClientGetOptions) (CloudServiceRolesClientGetResponse, error)

Get - Gets a role from a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 roleName - Name of the role. options - CloudServiceRolesClientGetOptions contains the optional parameters for the CloudServiceRolesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceRole.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRolesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"{role-name}",
		"ConstosoRG",
		"{cs-name}",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServiceRolesClient) NewListPager added in v0.7.0

func (client *CloudServiceRolesClient) NewListPager(resourceGroupName string, cloudServiceName string, options *CloudServiceRolesClientListOptions) *runtime.Pager[CloudServiceRolesClientListResponse]

NewListPager - Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 options - CloudServiceRolesClientListOptions contains the optional parameters for the CloudServiceRolesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServiceRoles.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServiceRolesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("ConstosoRG",
		"{cs-name}",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CloudServiceRolesClientGetOptions added in v0.3.0

type CloudServiceRolesClientGetOptions struct {
}

CloudServiceRolesClientGetOptions contains the optional parameters for the CloudServiceRolesClient.Get method.

type CloudServiceRolesClientGetResponse added in v0.3.0

type CloudServiceRolesClientGetResponse struct {
	CloudServiceRole
}

CloudServiceRolesClientGetResponse contains the response from method CloudServiceRolesClient.Get.

type CloudServiceRolesClientListOptions added in v0.3.0

type CloudServiceRolesClientListOptions struct {
}

CloudServiceRolesClientListOptions contains the optional parameters for the CloudServiceRolesClient.List method.

type CloudServiceRolesClientListResponse added in v0.3.0

type CloudServiceRolesClientListResponse struct {
	CloudServiceRoleListResult
}

CloudServiceRolesClientListResponse contains the response from method CloudServiceRolesClient.List.

type CloudServiceUpdate

type CloudServiceUpdate struct {
	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

func (CloudServiceUpdate) MarshalJSON

func (c CloudServiceUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceUpdate.

type CloudServiceUpgradeMode

type CloudServiceUpgradeMode string

CloudServiceUpgradeMode - Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are Auto Manual Simultaneous If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence.

const (
	CloudServiceUpgradeModeAuto         CloudServiceUpgradeMode = "Auto"
	CloudServiceUpgradeModeManual       CloudServiceUpgradeMode = "Manual"
	CloudServiceUpgradeModeSimultaneous CloudServiceUpgradeMode = "Simultaneous"
)

func PossibleCloudServiceUpgradeModeValues

func PossibleCloudServiceUpgradeModeValues() []CloudServiceUpgradeMode

PossibleCloudServiceUpgradeModeValues returns the possible values for the CloudServiceUpgradeMode const type.

type CloudServiceVaultAndSecretReference

type CloudServiceVaultAndSecretReference struct {
	SecretURL   *string      `json:"secretUrl,omitempty"`
	SourceVault *SubResource `json:"sourceVault,omitempty"`
}

type CloudServiceVaultCertificate

type CloudServiceVaultCertificate struct {
	// This is the URL of a certificate that has been uploaded to Key Vault as a secret.
	CertificateURL *string `json:"certificateUrl,omitempty"`
}

CloudServiceVaultCertificate - Describes a single certificate reference in a Key Vault, and where the certificate should reside on the role instance.

type CloudServiceVaultSecretGroup

type CloudServiceVaultSecretGroup struct {
	// The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
	SourceVault *SubResource `json:"sourceVault,omitempty"`

	// The list of key vault references in SourceVault which contain certificates.
	VaultCertificates []*CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"`
}

CloudServiceVaultSecretGroup - Describes a set of certificates which are all in the same Key Vault.

func (CloudServiceVaultSecretGroup) MarshalJSON

func (c CloudServiceVaultSecretGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceVaultSecretGroup.

type CloudServicesClient

type CloudServicesClient struct {
	// contains filtered or unexported fields
}

CloudServicesClient contains the methods for the CloudServices group. Don't use this type directly, use NewCloudServicesClient() instead.

func NewCloudServicesClient

func NewCloudServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesClient, error)

NewCloudServicesClient creates a new instance of CloudServicesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CloudServicesClient) BeginCreateOrUpdate

func (client *CloudServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CloudServicesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a cloud service. Please note some properties can be set only during cloud service creation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudServicesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateCloudServiceWithMultiRole.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServicesClientBeginCreateOrUpdateOptions{Parameters: &armcompute.CloudService{
			Location: to.Ptr("westus"),
			Properties: &armcompute.CloudServiceProperties{
				Configuration: to.Ptr("{ServiceConfiguration}"),
				NetworkProfile: &armcompute.CloudServiceNetworkProfile{
					LoadBalancerConfigurations: []*armcompute.LoadBalancerConfiguration{
						{
							Name: to.Ptr("contosolb"),
							Properties: &armcompute.LoadBalancerConfigurationProperties{
								FrontendIPConfigurations: []*armcompute.LoadBalancerFrontendIPConfiguration{
									{
										Name: to.Ptr("contosofe"),
										Properties: &armcompute.LoadBalancerFrontendIPConfigurationProperties{
											PublicIPAddress: &armcompute.SubResource{
												ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip"),
											},
										},
									}},
							},
						}},
				},
				PackageURL: to.Ptr("{PackageUrl}"),
				RoleProfile: &armcompute.CloudServiceRoleProfile{
					Roles: []*armcompute.CloudServiceRoleProfileProperties{
						{
							Name: to.Ptr("ContosoFrontend"),
							SKU: &armcompute.CloudServiceRoleSKU{
								Name:     to.Ptr("Standard_D1_v2"),
								Capacity: to.Ptr[int64](1),
								Tier:     to.Ptr("Standard"),
							},
						},
						{
							Name: to.Ptr("ContosoBackend"),
							SKU: &armcompute.CloudServiceRoleSKU{
								Name:     to.Ptr("Standard_D1_v2"),
								Capacity: to.Ptr[int64](1),
								Tier:     to.Ptr("Standard"),
							},
						}},
				},
				UpgradeMode: to.Ptr(armcompute.CloudServiceUpgradeModeAuto),
			},
		},
		})
	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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServicesClient) BeginDelete

func (client *CloudServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteOptions) (*runtime.Poller[CloudServicesClientDeleteResponse], error)

BeginDelete - Deletes a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginDeleteOptions contains the optional parameters for the CloudServicesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/DeleteCloudService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServicesClient) BeginDeleteInstances

func (client *CloudServicesClient) BeginDeleteInstances(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteInstancesOptions) (*runtime.Poller[CloudServicesClientDeleteInstancesResponse], error)

BeginDeleteInstances - Deletes role instances in a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginDeleteInstancesOptions contains the optional parameters for the CloudServicesClient.BeginDeleteInstances method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/DeleteCloudServiceRoleInstances.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeleteInstances(ctx,
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServicesClientBeginDeleteInstancesOptions{Parameters: &armcompute.RoleInstances{
			RoleInstances: []*string{
				to.Ptr("ContosoFrontend_IN_0"),
				to.Ptr("ContosoBackend_IN_1")},
		},
		})
	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)
	}
}
Output:

func (*CloudServicesClient) BeginPowerOff

func (client *CloudServicesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginPowerOffOptions) (*runtime.Poller[CloudServicesClientPowerOffResponse], error)

BeginPowerOff - Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginPowerOffOptions contains the optional parameters for the CloudServicesClient.BeginPowerOff method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/PowerOffCloudService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPowerOff(ctx,
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServicesClient) BeginRebuild

func (client *CloudServicesClient) BeginRebuild(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRebuildOptions) (*runtime.Poller[CloudServicesClientRebuildResponse], error)

BeginRebuild - Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginRebuildOptions contains the optional parameters for the CloudServicesClient.BeginRebuild method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/RebuildCloudServiceRoleInstances.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRebuild(ctx,
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServicesClientBeginRebuildOptions{Parameters: &armcompute.RoleInstances{
			RoleInstances: []*string{
				to.Ptr("ContosoFrontend_IN_0"),
				to.Ptr("ContosoBackend_IN_1")},
		},
		})
	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)
	}
}
Output:

func (*CloudServicesClient) BeginReimage

func (client *CloudServicesClient) BeginReimage(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginReimageOptions) (*runtime.Poller[CloudServicesClientReimageResponse], error)

BeginReimage - Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginReimageOptions contains the optional parameters for the CloudServicesClient.BeginReimage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ReimageCloudServiceRoleInstances.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimage(ctx,
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServicesClientBeginReimageOptions{Parameters: &armcompute.RoleInstances{
			RoleInstances: []*string{
				to.Ptr("ContosoFrontend_IN_0"),
				to.Ptr("ContosoBackend_IN_1")},
		},
		})
	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)
	}
}
Output:

func (*CloudServicesClient) BeginRestart

func (client *CloudServicesClient) BeginRestart(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRestartOptions) (*runtime.Poller[CloudServicesClientRestartResponse], error)

BeginRestart - Restarts one or more role instances in a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginRestartOptions contains the optional parameters for the CloudServicesClient.BeginRestart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/RestartCloudServiceRoleInstances.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx,
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServicesClientBeginRestartOptions{Parameters: &armcompute.RoleInstances{
			RoleInstances: []*string{
				to.Ptr("ContosoFrontend_IN_0"),
				to.Ptr("ContosoBackend_IN_1")},
		},
		})
	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)
	}
}
Output:

func (*CloudServicesClient) BeginStart

func (client *CloudServicesClient) BeginStart(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginStartOptions) (*runtime.Poller[CloudServicesClientStartResponse], error)

BeginStart - Starts the cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginStartOptions contains the optional parameters for the CloudServicesClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/StartCloudService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx,
		"ConstosoRG",
		"{cs-name}",
		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)
	}
}
Output:

func (*CloudServicesClient) BeginUpdate

func (client *CloudServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginUpdateOptions) (*runtime.Poller[CloudServicesClientUpdateResponse], error)

BeginUpdate - Update a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientBeginUpdateOptions contains the optional parameters for the CloudServicesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/UpdateCloudServiceToIncludeTags.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"ConstosoRG",
		"{cs-name}",
		&armcompute.CloudServicesClientBeginUpdateOptions{Parameters: &armcompute.CloudServiceUpdate{
			Tags: map[string]*string{
				"Documentation": to.Ptr("RestAPI"),
			},
		},
		})
	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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServicesClient) Get

func (client *CloudServicesClient) Get(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientGetOptions) (CloudServicesClientGetResponse, error)

Get - Display information about a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientGetOptions contains the optional parameters for the CloudServicesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceWithMultiRoleAndRDP.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"ConstosoRG",
		"{cs-name}",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServicesClient) GetInstanceView

func (client *CloudServicesClient) GetInstanceView(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientGetInstanceViewOptions) (CloudServicesClientGetInstanceViewResponse, error)

GetInstanceView - Gets the status of a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesClientGetInstanceViewOptions contains the optional parameters for the CloudServicesClient.GetInstanceView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceInstanceViewWithMultiRole.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetInstanceView(ctx,
		"ConstosoRG",
		"{cs-name}",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServicesClient) NewListAllPager added in v0.7.0

NewListAllPager - Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 options - CloudServicesClientListAllOptions contains the optional parameters for the CloudServicesClient.ListAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServicesInSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAllPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*CloudServicesClient) NewListPager added in v0.7.0

func (client *CloudServicesClient) NewListPager(resourceGroupName string, options *CloudServicesClientListOptions) *runtime.Pager[CloudServicesClientListResponse]

NewListPager - Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. options - CloudServicesClientListOptions contains the optional parameters for the CloudServicesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServicesInResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("ConstosoRG",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CloudServicesClientBeginCreateOrUpdateOptions added in v0.3.0

type CloudServicesClientBeginCreateOrUpdateOptions struct {
	// The cloud service object.
	Parameters *CloudService
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudServicesClient.BeginCreateOrUpdate method.

type CloudServicesClientBeginDeleteInstancesOptions added in v0.3.0

type CloudServicesClientBeginDeleteInstancesOptions struct {
	// List of cloud service role instance names.
	Parameters *RoleInstances
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginDeleteInstancesOptions contains the optional parameters for the CloudServicesClient.BeginDeleteInstances method.

type CloudServicesClientBeginDeleteOptions added in v0.3.0

type CloudServicesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginDeleteOptions contains the optional parameters for the CloudServicesClient.BeginDelete method.

type CloudServicesClientBeginPowerOffOptions added in v0.3.0

type CloudServicesClientBeginPowerOffOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginPowerOffOptions contains the optional parameters for the CloudServicesClient.BeginPowerOff method.

type CloudServicesClientBeginRebuildOptions added in v0.3.0

type CloudServicesClientBeginRebuildOptions struct {
	// List of cloud service role instance names.
	Parameters *RoleInstances
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginRebuildOptions contains the optional parameters for the CloudServicesClient.BeginRebuild method.

type CloudServicesClientBeginReimageOptions added in v0.3.0

type CloudServicesClientBeginReimageOptions struct {
	// List of cloud service role instance names.
	Parameters *RoleInstances
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginReimageOptions contains the optional parameters for the CloudServicesClient.BeginReimage method.

type CloudServicesClientBeginRestartOptions added in v0.3.0

type CloudServicesClientBeginRestartOptions struct {
	// List of cloud service role instance names.
	Parameters *RoleInstances
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginRestartOptions contains the optional parameters for the CloudServicesClient.BeginRestart method.

type CloudServicesClientBeginStartOptions added in v0.3.0

type CloudServicesClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginStartOptions contains the optional parameters for the CloudServicesClient.BeginStart method.

type CloudServicesClientBeginUpdateOptions added in v0.3.0

type CloudServicesClientBeginUpdateOptions struct {
	// The cloud service object.
	Parameters *CloudServiceUpdate
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesClientBeginUpdateOptions contains the optional parameters for the CloudServicesClient.BeginUpdate method.

type CloudServicesClientCreateOrUpdateResponse added in v0.3.0

type CloudServicesClientCreateOrUpdateResponse struct {
	CloudService
}

CloudServicesClientCreateOrUpdateResponse contains the response from method CloudServicesClient.CreateOrUpdate.

type CloudServicesClientDeleteInstancesResponse added in v0.3.0

type CloudServicesClientDeleteInstancesResponse struct {
}

CloudServicesClientDeleteInstancesResponse contains the response from method CloudServicesClient.DeleteInstances.

type CloudServicesClientDeleteResponse added in v0.3.0

type CloudServicesClientDeleteResponse struct {
}

CloudServicesClientDeleteResponse contains the response from method CloudServicesClient.Delete.

type CloudServicesClientGetInstanceViewOptions added in v0.3.0

type CloudServicesClientGetInstanceViewOptions struct {
}

CloudServicesClientGetInstanceViewOptions contains the optional parameters for the CloudServicesClient.GetInstanceView method.

type CloudServicesClientGetInstanceViewResponse added in v0.3.0

type CloudServicesClientGetInstanceViewResponse struct {
	CloudServiceInstanceView
}

CloudServicesClientGetInstanceViewResponse contains the response from method CloudServicesClient.GetInstanceView.

type CloudServicesClientGetOptions added in v0.3.0

type CloudServicesClientGetOptions struct {
}

CloudServicesClientGetOptions contains the optional parameters for the CloudServicesClient.Get method.

type CloudServicesClientGetResponse added in v0.3.0

type CloudServicesClientGetResponse struct {
	CloudService
}

CloudServicesClientGetResponse contains the response from method CloudServicesClient.Get.

type CloudServicesClientListAllOptions added in v0.3.0

type CloudServicesClientListAllOptions struct {
}

CloudServicesClientListAllOptions contains the optional parameters for the CloudServicesClient.ListAll method.

type CloudServicesClientListAllResponse added in v0.3.0

type CloudServicesClientListAllResponse struct {
	CloudServiceListResult
}

CloudServicesClientListAllResponse contains the response from method CloudServicesClient.ListAll.

type CloudServicesClientListOptions added in v0.3.0

type CloudServicesClientListOptions struct {
}

CloudServicesClientListOptions contains the optional parameters for the CloudServicesClient.List method.

type CloudServicesClientListResponse added in v0.3.0

type CloudServicesClientListResponse struct {
	CloudServiceListResult
}

CloudServicesClientListResponse contains the response from method CloudServicesClient.List.

type CloudServicesClientPowerOffResponse added in v0.3.0

type CloudServicesClientPowerOffResponse struct {
}

CloudServicesClientPowerOffResponse contains the response from method CloudServicesClient.PowerOff.

type CloudServicesClientRebuildResponse added in v0.3.0

type CloudServicesClientRebuildResponse struct {
}

CloudServicesClientRebuildResponse contains the response from method CloudServicesClient.Rebuild.

type CloudServicesClientReimageResponse added in v0.3.0

type CloudServicesClientReimageResponse struct {
}

CloudServicesClientReimageResponse contains the response from method CloudServicesClient.Reimage.

type CloudServicesClientRestartResponse added in v0.3.0

type CloudServicesClientRestartResponse struct {
}

CloudServicesClientRestartResponse contains the response from method CloudServicesClient.Restart.

type CloudServicesClientStartResponse added in v0.3.0

type CloudServicesClientStartResponse struct {
}

CloudServicesClientStartResponse contains the response from method CloudServicesClient.Start.

type CloudServicesClientUpdateResponse added in v0.3.0

type CloudServicesClientUpdateResponse struct {
	CloudService
}

CloudServicesClientUpdateResponse contains the response from method CloudServicesClient.Update.

type CloudServicesUpdateDomainClient

type CloudServicesUpdateDomainClient struct {
	// contains filtered or unexported fields
}

CloudServicesUpdateDomainClient contains the methods for the CloudServicesUpdateDomain group. Don't use this type directly, use NewCloudServicesUpdateDomainClient() instead.

func NewCloudServicesUpdateDomainClient

func NewCloudServicesUpdateDomainClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesUpdateDomainClient, error)

NewCloudServicesUpdateDomainClient creates a new instance of CloudServicesUpdateDomainClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CloudServicesUpdateDomainClient) BeginWalkUpdateDomain

BeginWalkUpdateDomain - Updates the role instances in the specified update domain. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. updateDomain - Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. options - CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.BeginWalkUpdateDomain method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/UpdateCloudServiceUpdateDomain.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesUpdateDomainClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginWalkUpdateDomain(ctx,
		"ConstosoRG",
		"{cs-name}",
		1,
		&armcompute.CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions{Parameters: 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)
	}
}
Output:

func (*CloudServicesUpdateDomainClient) GetUpdateDomain

GetUpdateDomain - Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. updateDomain - Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. options - CloudServicesUpdateDomainClientGetUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.GetUpdateDomain method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetCloudServiceUpdateDomain.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesUpdateDomainClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetUpdateDomain(ctx,
		"ConstosoRG",
		"{cs-name}",
		1,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CloudServicesUpdateDomainClient) NewListUpdateDomainsPager added in v0.7.0

NewListUpdateDomainsPager - Gets a list of all update domains in a cloud service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-01 resourceGroupName - Name of the resource group. cloudServiceName - Name of the cloud service. options - CloudServicesUpdateDomainClientListUpdateDomainsOptions contains the optional parameters for the CloudServicesUpdateDomainClient.ListUpdateDomains method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/ListCloudServiceUpdateDomains.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCloudServicesUpdateDomainClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListUpdateDomainsPager("ConstosoRG",
		"{cs-name}",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions added in v0.3.0

type CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions struct {
	// The update domain object.
	Parameters *UpdateDomain
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.BeginWalkUpdateDomain method.

type CloudServicesUpdateDomainClientGetUpdateDomainOptions added in v0.3.0

type CloudServicesUpdateDomainClientGetUpdateDomainOptions struct {
}

CloudServicesUpdateDomainClientGetUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.GetUpdateDomain method.

type CloudServicesUpdateDomainClientGetUpdateDomainResponse added in v0.3.0

type CloudServicesUpdateDomainClientGetUpdateDomainResponse struct {
	UpdateDomain
}

CloudServicesUpdateDomainClientGetUpdateDomainResponse contains the response from method CloudServicesUpdateDomainClient.GetUpdateDomain.

type CloudServicesUpdateDomainClientListUpdateDomainsOptions added in v0.3.0

type CloudServicesUpdateDomainClientListUpdateDomainsOptions struct {
}

CloudServicesUpdateDomainClientListUpdateDomainsOptions contains the optional parameters for the CloudServicesUpdateDomainClient.ListUpdateDomains method.

type CloudServicesUpdateDomainClientListUpdateDomainsResponse added in v0.3.0

type CloudServicesUpdateDomainClientListUpdateDomainsResponse struct {
	UpdateDomainListResult
}

CloudServicesUpdateDomainClientListUpdateDomainsResponse contains the response from method CloudServicesUpdateDomainClient.ListUpdateDomains.

type CloudServicesUpdateDomainClientWalkUpdateDomainResponse added in v0.3.0

type CloudServicesUpdateDomainClientWalkUpdateDomainResponse struct {
}

CloudServicesUpdateDomainClientWalkUpdateDomainResponse contains the response from method CloudServicesUpdateDomainClient.WalkUpdateDomain.

type CommunityGalleriesClient added in v0.2.0

type CommunityGalleriesClient struct {
	// contains filtered or unexported fields
}

CommunityGalleriesClient contains the methods for the CommunityGalleries group. Don't use this type directly, use NewCommunityGalleriesClient() instead.

func NewCommunityGalleriesClient added in v0.2.0

func NewCommunityGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleriesClient, error)

NewCommunityGalleriesClient creates a new instance of CommunityGalleriesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CommunityGalleriesClient) Get added in v0.2.0

Get - Get a community gallery by gallery public name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. publicGalleryName - The public name of the community gallery. options - CommunityGalleriesClientGetOptions contains the optional parameters for the CommunityGalleriesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/communityGallery/GetACommunityGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCommunityGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myLocation",
		"publicGalleryName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type CommunityGalleriesClientGetOptions added in v0.3.0

type CommunityGalleriesClientGetOptions struct {
}

CommunityGalleriesClientGetOptions contains the optional parameters for the CommunityGalleriesClient.Get method.

type CommunityGalleriesClientGetResponse added in v0.3.0

type CommunityGalleriesClientGetResponse struct {
	CommunityGallery
}

CommunityGalleriesClientGetResponse contains the response from method CommunityGalleriesClient.Get.

type CommunityGallery added in v0.2.0

type CommunityGallery struct {
	// The identifier information of community gallery.
	Identifier *CommunityGalleryIdentifier `json:"identifier,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CommunityGallery - Specifies information about the Community Gallery that you want to create or update.

type CommunityGalleryIdentifier added in v0.2.0

type CommunityGalleryIdentifier struct {
	// The unique id of this community gallery.
	UniqueID *string `json:"uniqueId,omitempty"`
}

CommunityGalleryIdentifier - The identifier information of community gallery.

type CommunityGalleryImage added in v0.2.0

type CommunityGalleryImage struct {
	// The identifier information of community gallery.
	Identifier *CommunityGalleryIdentifier `json:"identifier,omitempty"`

	// Describes the properties of a gallery image definition.
	Properties *CommunityGalleryImageProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CommunityGalleryImage - Specifies information about the gallery image definition that you want to create or update.

type CommunityGalleryImageProperties added in v0.2.0

type CommunityGalleryImageProperties struct {
	// REQUIRED; This is the gallery image definition identifier.
	Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`

	// REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized'
	// or 'Specialized'.
	OSState *OperatingSystemStateTypes `json:"osState,omitempty"`

	// REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
	// managed image.
	// Possible values are:
	// Windows
	// Linux
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Describes the disallowed disk types.
	Disallowed *Disallowed `json:"disallowed,omitempty"`

	// The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
	// is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// A list of gallery image features.
	Features []*GalleryImageFeature `json:"features,omitempty"`

	// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// Describes the gallery image definition purchase plan. This is used by marketplace images.
	PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`

	// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
	Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
}

CommunityGalleryImageProperties - Describes the properties of a gallery image definition.

func (*CommunityGalleryImageProperties) UnmarshalJSON added in v0.2.0

func (c *CommunityGalleryImageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageProperties.

type CommunityGalleryImageVersion added in v0.2.0

type CommunityGalleryImageVersion struct {
	// The identifier information of community gallery.
	Identifier *CommunityGalleryIdentifier `json:"identifier,omitempty"`

	// Describes the properties of a gallery image version.
	Properties *CommunityGalleryImageVersionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CommunityGalleryImageVersion - Specifies information about the gallery image version that you want to create or update.

type CommunityGalleryImageVersionProperties added in v0.2.0

type CommunityGalleryImageVersionProperties struct {
	// The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This
	// property is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This
	// property is updatable.
	PublishedDate *time.Time `json:"publishedDate,omitempty"`
}

CommunityGalleryImageVersionProperties - Describes the properties of a gallery image version.

func (*CommunityGalleryImageVersionProperties) UnmarshalJSON added in v0.2.0

func (c *CommunityGalleryImageVersionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageVersionProperties.

type CommunityGalleryImageVersionsClient added in v0.2.0

type CommunityGalleryImageVersionsClient struct {
	// contains filtered or unexported fields
}

CommunityGalleryImageVersionsClient contains the methods for the CommunityGalleryImageVersions group. Don't use this type directly, use NewCommunityGalleryImageVersionsClient() instead.

func NewCommunityGalleryImageVersionsClient added in v0.2.0

func NewCommunityGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleryImageVersionsClient, error)

NewCommunityGalleryImageVersionsClient creates a new instance of CommunityGalleryImageVersionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CommunityGalleryImageVersionsClient) Get added in v0.2.0

func (client *CommunityGalleryImageVersionsClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string, options *CommunityGalleryImageVersionsClientGetOptions) (CommunityGalleryImageVersionsClientGetResponse, error)

Get - Get a community gallery image version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. publicGalleryName - The public name of the community gallery. galleryImageName - The name of the community gallery image definition. galleryImageVersionName - The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. options - CommunityGalleryImageVersionsClientGetOptions contains the optional parameters for the CommunityGalleryImageVersionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/communityGallery/GetACommunityGalleryImageVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCommunityGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myLocation",
		"publicGalleryName",
		"myGalleryImageName",
		"myGalleryImageVersionName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type CommunityGalleryImageVersionsClientGetOptions added in v0.3.0

type CommunityGalleryImageVersionsClientGetOptions struct {
}

CommunityGalleryImageVersionsClientGetOptions contains the optional parameters for the CommunityGalleryImageVersionsClient.Get method.

type CommunityGalleryImageVersionsClientGetResponse added in v0.3.0

type CommunityGalleryImageVersionsClientGetResponse struct {
	CommunityGalleryImageVersion
}

CommunityGalleryImageVersionsClientGetResponse contains the response from method CommunityGalleryImageVersionsClient.Get.

type CommunityGalleryImagesClient added in v0.2.0

type CommunityGalleryImagesClient struct {
	// contains filtered or unexported fields
}

CommunityGalleryImagesClient contains the methods for the CommunityGalleryImages group. Don't use this type directly, use NewCommunityGalleryImagesClient() instead.

func NewCommunityGalleryImagesClient added in v0.2.0

func NewCommunityGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleryImagesClient, error)

NewCommunityGalleryImagesClient creates a new instance of CommunityGalleryImagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CommunityGalleryImagesClient) Get added in v0.2.0

Get - Get a community gallery image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. publicGalleryName - The public name of the community gallery. galleryImageName - The name of the community gallery image definition. options - CommunityGalleryImagesClientGetOptions contains the optional parameters for the CommunityGalleryImagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/communityGallery/GetACommunityGalleryImage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewCommunityGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myLocation",
		"publicGalleryName",
		"myGalleryImageName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type CommunityGalleryImagesClientGetOptions added in v0.3.0

type CommunityGalleryImagesClientGetOptions struct {
}

CommunityGalleryImagesClientGetOptions contains the optional parameters for the CommunityGalleryImagesClient.Get method.

type CommunityGalleryImagesClientGetResponse added in v0.3.0

type CommunityGalleryImagesClientGetResponse struct {
	CommunityGalleryImage
}

CommunityGalleryImagesClientGetResponse contains the response from method CommunityGalleryImagesClient.Get.

type CommunityGalleryInfo added in v0.6.0

type CommunityGalleryInfo struct {
	// Community gallery publisher eula
	Eula *string `json:"eula,omitempty"`

	// Community gallery public name prefix
	PublicNamePrefix *string `json:"publicNamePrefix,omitempty"`

	// Community gallery publisher contact email
	PublisherContact *string `json:"publisherContact,omitempty"`

	// Community gallery publisher uri
	PublisherURI *string `json:"publisherUri,omitempty"`

	// READ-ONLY; Contains info about whether community gallery sharing is enabled.
	CommunityGalleryEnabled *bool `json:"communityGalleryEnabled,omitempty" azure:"ro"`

	// READ-ONLY; Community gallery public name list.
	PublicNames []*string `json:"publicNames,omitempty" azure:"ro"`
}

CommunityGalleryInfo - Information of community gallery if current gallery is shared to community

type ConfidentialVMEncryptionType added in v0.4.0

type ConfidentialVMEncryptionType string

ConfidentialVMEncryptionType - confidential VM encryption types

const (
	ConfidentialVMEncryptionTypeEncryptedVMGuestStateOnlyWithPmk ConfidentialVMEncryptionType = "EncryptedVMGuestStateOnlyWithPmk"
	ConfidentialVMEncryptionTypeEncryptedWithCmk                 ConfidentialVMEncryptionType = "EncryptedWithCmk"
	ConfidentialVMEncryptionTypeEncryptedWithPmk                 ConfidentialVMEncryptionType = "EncryptedWithPmk"
)

func PossibleConfidentialVMEncryptionTypeValues added in v0.4.0

func PossibleConfidentialVMEncryptionTypeValues() []ConfidentialVMEncryptionType

PossibleConfidentialVMEncryptionTypeValues returns the possible values for the ConfidentialVMEncryptionType const type.

type ConsistencyModeTypes

type ConsistencyModeTypes string

ConsistencyModeTypes - ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.

const (
	ConsistencyModeTypesApplicationConsistent ConsistencyModeTypes = "ApplicationConsistent"
	ConsistencyModeTypesCrashConsistent       ConsistencyModeTypes = "CrashConsistent"
	ConsistencyModeTypesFileSystemConsistent  ConsistencyModeTypes = "FileSystemConsistent"
)

func PossibleConsistencyModeTypesValues

func PossibleConsistencyModeTypesValues() []ConsistencyModeTypes

PossibleConsistencyModeTypesValues returns the possible values for the ConsistencyModeTypes const type.

type CreationData

type CreationData struct {
	// REQUIRED; This enumerates the possible sources of a disk's creation.
	CreateOption *DiskCreateOption `json:"createOption,omitempty"`

	// Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image
	// version from which to create a disk.
	GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`

	// Disk source information.
	ImageReference *ImageDiskReference `json:"imageReference,omitempty"`

	// Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
	LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"`

	// If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
	SecurityDataURI *string `json:"securityDataUri,omitempty"`

	// If createOption is Copy, this is the ARM id of the source snapshot or disk.
	SourceResourceID *string `json:"sourceResourceId,omitempty"`

	// If createOption is Import, this is the URI of a blob to be imported into a managed disk.
	SourceURI *string `json:"sourceUri,omitempty"`

	// Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to
	// import as a disk.
	StorageAccountID *string `json:"storageAccountId,omitempty"`

	// If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be
	// between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520
	// bytes (32 TiB + 512 bytes for the VHD footer).
	UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`

	// READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
	SourceUniqueID *string `json:"sourceUniqueId,omitempty" azure:"ro"`
}

CreationData - Data used when creating a disk.

type DataAccessAuthMode added in v0.5.0

type DataAccessAuthMode string

DataAccessAuthMode - Additional authentication requirements when exporting or uploading to a disk or snapshot.

const (
	// DataAccessAuthModeAzureActiveDirectory - When export/upload URL is used, the system checks if the user has an identity
	// in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.
	DataAccessAuthModeAzureActiveDirectory DataAccessAuthMode = "AzureActiveDirectory"
	// DataAccessAuthModeNone - No additional authentication would be performed when accessing export/upload URL.
	DataAccessAuthModeNone DataAccessAuthMode = "None"
)

func PossibleDataAccessAuthModeValues added in v0.5.0

func PossibleDataAccessAuthModeValues() []DataAccessAuthMode

PossibleDataAccessAuthModeValues returns the possible values for the DataAccessAuthMode const type.

type DataDisk

type DataDisk struct {
	// REQUIRED; Specifies how the virtual machine should be created.
	// Possible values are:
	// Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.
	// FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform
	// image, you also use the imageReference element described above. If you are
	// using a marketplace image, you also use the plan element previously described.
	CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"`

	// REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
	// therefore must be unique for each data disk attached to a VM.
	Lun *int32 `json:"lun,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies whether data disk should be deleted or detached upon VM deletion.
	// Possible values:
	// Delete If this value is used, the data disk is deleted when VM is deleted.
	// Detach If this value is used, the data disk is retained after VM is deleted.
	// The default value is set to detach
	DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"`

	// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the
	// virtual machine. Supported values: ForceDetach.
	// detachOption: ForceDetach is applicable only for managed data disks. If a previous detachment attempt of the data disk
	// did not complete due to an unexpected failure from the virtual machine and the
	// disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes
	// might not have been flushed when using this detach behavior.
	// This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update
	// toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.
	DetachOption *DiskDetachOptionTypes `json:"detachOption,omitempty"`

	// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
	// virtual machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
	// If SourceImage is provided, the destination virtual hard drive must not
	// exist.
	Image *VirtualHardDisk `json:"image,omitempty"`

	// The managed disk parameters.
	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`

	// The disk name.
	Name *string `json:"name,omitempty"`

	// Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
	ToBeDetached *bool `json:"toBeDetached,omitempty"`

	// The virtual hard disk.
	Vhd *VirtualHardDisk `json:"vhd,omitempty"`

	// Specifies whether writeAccelerator should be enabled or disabled on the disk.
	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`

	// READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for
	// VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine
	// Scale Set.
	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned
	// only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the
	// VirtualMachine Scale Set.
	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty" azure:"ro"`
}

DataDisk - Describes a data disk.

type DataDiskImage

type DataDiskImage struct {
	// READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM
	// and therefore must be unique for each data disk attached to a VM.
	Lun *int32 `json:"lun,omitempty" azure:"ro"`
}

DataDiskImage - Contains the data disk images information.

type DataDiskImageEncryption

type DataDiskImageEncryption struct {
	// REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within
	// the Virtual Machine and therefore must be unique for each data disk attached to the
	// Virtual Machine.
	Lun *int32 `json:"lun,omitempty"`

	// A relative URI containing the resource ID of the disk encryption set.
	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
}

DataDiskImageEncryption - Contains encryption settings for a data disk image.

type DedicatedHost

type DedicatedHost struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// REQUIRED; SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute
	// SKUs for a list of possible values.
	SKU *SKU `json:"sku,omitempty"`

	// Properties of the dedicated host.
	Properties *DedicatedHostProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DedicatedHost - Specifies information about the Dedicated host.

func (DedicatedHost) MarshalJSON

func (d DedicatedHost) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHost.

type DedicatedHostAllocatableVM

type DedicatedHostAllocatableVM struct {
	// Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
	Count *float64 `json:"count,omitempty"`

	// VM size in terms of which the unutilized capacity is represented.
	VMSize *string `json:"vmSize,omitempty"`
}

DedicatedHostAllocatableVM - Represents the dedicated host unutilized capacity in terms of a specific VM size.

type DedicatedHostAvailableCapacity

type DedicatedHostAvailableCapacity struct {
	// The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the
	// dedicated host.
	AllocatableVMs []*DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
}

DedicatedHostAvailableCapacity - Dedicated host unutilized capacity.

func (DedicatedHostAvailableCapacity) MarshalJSON

func (d DedicatedHostAvailableCapacity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostAvailableCapacity.

type DedicatedHostGroup

type DedicatedHostGroup struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Dedicated Host Group Properties.
	Properties *DedicatedHostGroupProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation.
	// If not provided, the group supports all zones in the region. If provided,
	// enforces each host in the group to be in the same zone.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DedicatedHostGroup - Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group.

func (DedicatedHostGroup) MarshalJSON

func (d DedicatedHostGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroup.

type DedicatedHostGroupInstanceView

type DedicatedHostGroupInstanceView struct {
	// List of instance view of the dedicated hosts under the dedicated host group.
	Hosts []*DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
}

func (DedicatedHostGroupInstanceView) MarshalJSON

func (d DedicatedHostGroupInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupInstanceView.

type DedicatedHostGroupListResult

type DedicatedHostGroupListResult struct {
	// REQUIRED; The list of dedicated host groups
	Value []*DedicatedHostGroup `json:"value,omitempty"`

	// The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated
	// Host Groups.
	NextLink *string `json:"nextLink,omitempty"`
}

DedicatedHostGroupListResult - The List Dedicated Host Group with resource group response.

type DedicatedHostGroupProperties

type DedicatedHostGroupProperties struct {
	// REQUIRED; Number of fault domains that the host group can span.
	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`

	// Enables or disables a capability on the dedicated host group.
	// Minimum api-version: 2022-03-01.
	AdditionalCapabilities *DedicatedHostGroupPropertiesAdditionalCapabilities `json:"additionalCapabilities,omitempty"`

	// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group.
	// Automatic placement means resources are allocated on dedicated hosts, that are
	// chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.
	// Minimum api-version: 2020-06-01.
	SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"`

	// READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
	Hosts []*SubResourceReadOnly `json:"hosts,omitempty" azure:"ro"`

	// READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the
	// dedicated host group.
	InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty" azure:"ro"`
}

DedicatedHostGroupProperties - Dedicated Host Group Properties.

func (DedicatedHostGroupProperties) MarshalJSON

func (d DedicatedHostGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupProperties.

type DedicatedHostGroupPropertiesAdditionalCapabilities added in v1.0.0

type DedicatedHostGroupPropertiesAdditionalCapabilities struct {
	// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated
	// Host Group. For the Virtual Machines to be UltraSSD Enabled,
	// UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided.
	// Please refer to
	// https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature.
	// NOTE: The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal.
	// Minimum api-version: 2022-03-01.
	UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
}

DedicatedHostGroupPropertiesAdditionalCapabilities - Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.

type DedicatedHostGroupUpdate

type DedicatedHostGroupUpdate struct {
	// Dedicated Host Group Properties.
	Properties *DedicatedHostGroupProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation.
	// If not provided, the group supports all zones in the region. If provided,
	// enforces each host in the group to be in the same zone.
	Zones []*string `json:"zones,omitempty"`
}

DedicatedHostGroupUpdate - Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated.

func (DedicatedHostGroupUpdate) MarshalJSON

func (d DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupUpdate.

type DedicatedHostGroupsClient

type DedicatedHostGroupsClient struct {
	// contains filtered or unexported fields
}

DedicatedHostGroupsClient contains the methods for the DedicatedHostGroups group. Don't use this type directly, use NewDedicatedHostGroupsClient() instead.

func NewDedicatedHostGroupsClient

func NewDedicatedHostGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHostGroupsClient, error)

NewDedicatedHostGroupsClient creates a new instance of DedicatedHostGroupsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DedicatedHostGroupsClient) CreateOrUpdate

CreateOrUpdate - Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see Dedicated Host Documentation [https://go.microsoft.com/fwlink/?linkid=2082596] If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. parameters - Parameters supplied to the Create Dedicated Host Group. options - DedicatedHostGroupsClientCreateOrUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHostGroup_CreateOrUpdate_WithUltraSSD.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroup",
		"myDedicatedHostGroup",
		armcompute.DedicatedHostGroup{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"department": to.Ptr("finance"),
			},
			Properties: &armcompute.DedicatedHostGroupProperties{
				AdditionalCapabilities: &armcompute.DedicatedHostGroupPropertiesAdditionalCapabilities{
					UltraSSDEnabled: to.Ptr(true),
				},
				PlatformFaultDomainCount:  to.Ptr[int32](3),
				SupportAutomaticPlacement: to.Ptr(true),
			},
			Zones: []*string{
				to.Ptr("1")},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DedicatedHostGroupsClient) Delete

Delete - Delete a dedicated host group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. options - DedicatedHostGroupsClientDeleteOptions contains the optional parameters for the DedicatedHostGroupsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHostGroups_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rgcompute",
		"a",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DedicatedHostGroupsClient) Get

Get - Retrieves information about a dedicated host group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. options - DedicatedHostGroupsClientGetOptions contains the optional parameters for the DedicatedHostGroupsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHostGroup_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostGroupsClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myDedicatedHostGroup",
		&armcompute.DedicatedHostGroupsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DedicatedHostGroupsClient) NewListByResourceGroupPager added in v0.7.0

NewListByResourceGroupPager - Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - DedicatedHostGroupsClientListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroupsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHostGroups_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("rgcompute",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DedicatedHostGroupsClient) NewListBySubscriptionPager added in v0.7.0

NewListBySubscriptionPager - Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - DedicatedHostGroupsClientListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroupsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHostGroups_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DedicatedHostGroupsClient) Update

Update - Update an dedicated host group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. parameters - Parameters supplied to the Update Dedicated Host Group operation. options - DedicatedHostGroupsClientUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHostGroups_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"rgcompute",
		"aaaa",
		armcompute.DedicatedHostGroupUpdate{
			Tags: map[string]*string{
				"key9921": to.Ptr("aaaaaaaaaa"),
			},
			Properties: &armcompute.DedicatedHostGroupProperties{
				InstanceView: &armcompute.DedicatedHostGroupInstanceView{
					Hosts: []*armcompute.DedicatedHostInstanceViewWithName{
						{
							AvailableCapacity: &armcompute.DedicatedHostAvailableCapacity{
								AllocatableVMs: []*armcompute.DedicatedHostAllocatableVM{
									{
										Count:  to.Ptr[float64](26),
										VMSize: to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
									}},
							},
							Statuses: []*armcompute.InstanceViewStatus{
								{
									Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
									DisplayStatus: to.Ptr("aaaaaa"),
									Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
									Message:       to.Ptr("a"),
									Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
								}},
						}},
				},
				PlatformFaultDomainCount:  to.Ptr[int32](3),
				SupportAutomaticPlacement: to.Ptr(true),
			},
			Zones: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa")},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type DedicatedHostGroupsClientCreateOrUpdateOptions added in v0.3.0

type DedicatedHostGroupsClientCreateOrUpdateOptions struct {
}

DedicatedHostGroupsClientCreateOrUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.CreateOrUpdate method.

type DedicatedHostGroupsClientCreateOrUpdateResponse added in v0.3.0

type DedicatedHostGroupsClientCreateOrUpdateResponse struct {
	DedicatedHostGroup
}

DedicatedHostGroupsClientCreateOrUpdateResponse contains the response from method DedicatedHostGroupsClient.CreateOrUpdate.

type DedicatedHostGroupsClientDeleteOptions added in v0.3.0

type DedicatedHostGroupsClientDeleteOptions struct {
}

DedicatedHostGroupsClientDeleteOptions contains the optional parameters for the DedicatedHostGroupsClient.Delete method.

type DedicatedHostGroupsClientDeleteResponse added in v0.3.0

type DedicatedHostGroupsClientDeleteResponse struct {
}

DedicatedHostGroupsClientDeleteResponse contains the response from method DedicatedHostGroupsClient.Delete.

type DedicatedHostGroupsClientGetOptions added in v0.3.0

type DedicatedHostGroupsClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated
	// hosts under the dedicated host group. 'UserData' is not supported for
	// dedicated host group.
	Expand *InstanceViewTypes
}

DedicatedHostGroupsClientGetOptions contains the optional parameters for the DedicatedHostGroupsClient.Get method.

type DedicatedHostGroupsClientGetResponse added in v0.3.0

type DedicatedHostGroupsClientGetResponse struct {
	DedicatedHostGroup
}

DedicatedHostGroupsClientGetResponse contains the response from method DedicatedHostGroupsClient.Get.

type DedicatedHostGroupsClientListByResourceGroupOptions added in v0.3.0

type DedicatedHostGroupsClientListByResourceGroupOptions struct {
}

DedicatedHostGroupsClientListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroupsClient.ListByResourceGroup method.

type DedicatedHostGroupsClientListByResourceGroupResponse added in v0.3.0

type DedicatedHostGroupsClientListByResourceGroupResponse struct {
	DedicatedHostGroupListResult
}

DedicatedHostGroupsClientListByResourceGroupResponse contains the response from method DedicatedHostGroupsClient.ListByResourceGroup.

type DedicatedHostGroupsClientListBySubscriptionOptions added in v0.3.0

type DedicatedHostGroupsClientListBySubscriptionOptions struct {
}

DedicatedHostGroupsClientListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroupsClient.ListBySubscription method.

type DedicatedHostGroupsClientListBySubscriptionResponse added in v0.3.0

type DedicatedHostGroupsClientListBySubscriptionResponse struct {
	DedicatedHostGroupListResult
}

DedicatedHostGroupsClientListBySubscriptionResponse contains the response from method DedicatedHostGroupsClient.ListBySubscription.

type DedicatedHostGroupsClientUpdateOptions added in v0.3.0

type DedicatedHostGroupsClientUpdateOptions struct {
}

DedicatedHostGroupsClientUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.Update method.

type DedicatedHostGroupsClientUpdateResponse added in v0.3.0

type DedicatedHostGroupsClientUpdateResponse struct {
	DedicatedHostGroup
}

DedicatedHostGroupsClientUpdateResponse contains the response from method DedicatedHostGroupsClient.Update.

type DedicatedHostInstanceView

type DedicatedHostInstanceView struct {
	// Unutilized capacity of the dedicated host.
	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
	AssetID *string `json:"assetId,omitempty" azure:"ro"`
}

DedicatedHostInstanceView - The instance view of a dedicated host.

func (DedicatedHostInstanceView) MarshalJSON

func (d DedicatedHostInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostInstanceView.

type DedicatedHostInstanceViewWithName

type DedicatedHostInstanceViewWithName struct {
	// Unutilized capacity of the dedicated host.
	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
	AssetID *string `json:"assetId,omitempty" azure:"ro"`

	// READ-ONLY; The name of the dedicated host.
	Name *string `json:"name,omitempty" azure:"ro"`
}

DedicatedHostInstanceViewWithName - The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to the instance view of a dedicated host group.

func (DedicatedHostInstanceViewWithName) MarshalJSON

func (d DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostInstanceViewWithName.

type DedicatedHostLicenseTypes

type DedicatedHostLicenseTypes string

DedicatedHostLicenseTypes - Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: None WindowsServerHybrid WindowsServerPerpetual Default: None

const (
	DedicatedHostLicenseTypesNone                   DedicatedHostLicenseTypes = "None"
	DedicatedHostLicenseTypesWindowsServerHybrid    DedicatedHostLicenseTypes = "Windows_Server_Hybrid"
	DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual"
)

func PossibleDedicatedHostLicenseTypesValues

func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes

PossibleDedicatedHostLicenseTypesValues returns the possible values for the DedicatedHostLicenseTypes const type.

type DedicatedHostListResult

type DedicatedHostListResult struct {
	// REQUIRED; The list of dedicated hosts
	Value []*DedicatedHost `json:"value,omitempty"`

	// The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
	NextLink *string `json:"nextLink,omitempty"`
}

DedicatedHostListResult - The list dedicated host operation response.

type DedicatedHostProperties

type DedicatedHostProperties struct {
	// Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true'
	// when not provided.
	AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`

	// Specifies the software license type that will be applied to the VMs deployed on the dedicated host.
	// Possible values are:
	// None
	// WindowsServerHybrid
	// WindowsServerPerpetual
	// Default: None
	LicenseType *DedicatedHostLicenseTypes `json:"licenseType,omitempty"`

	// Fault domain of the dedicated host within a dedicated host group.
	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`

	// READ-ONLY; A unique id generated and assigned to the dedicated host by the platform.
	// Does not change throughout the lifetime of the host.
	HostID *string `json:"hostId,omitempty" azure:"ro"`

	// READ-ONLY; The dedicated host instance view.
	InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The date when the host was first provisioned.
	ProvisioningTime *time.Time `json:"provisioningTime,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the time at which the Dedicated Host resource was created.
	// Minimum api-version: 2022-03-01.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`

	// READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
	VirtualMachines []*SubResourceReadOnly `json:"virtualMachines,omitempty" azure:"ro"`
}

DedicatedHostProperties - Properties of the dedicated host.

func (DedicatedHostProperties) MarshalJSON

func (d DedicatedHostProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostProperties.

func (*DedicatedHostProperties) UnmarshalJSON

func (d *DedicatedHostProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostProperties.

type DedicatedHostUpdate

type DedicatedHostUpdate struct {
	// Properties of the dedicated host.
	Properties *DedicatedHostProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

DedicatedHostUpdate - Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.

func (DedicatedHostUpdate) MarshalJSON

func (d DedicatedHostUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedHostUpdate.

type DedicatedHostsClient

type DedicatedHostsClient struct {
	// contains filtered or unexported fields
}

DedicatedHostsClient contains the methods for the DedicatedHosts group. Don't use this type directly, use NewDedicatedHostsClient() instead.

func NewDedicatedHostsClient

func NewDedicatedHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHostsClient, error)

NewDedicatedHostsClient creates a new instance of DedicatedHostsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DedicatedHostsClient) BeginCreateOrUpdate

func (client *DedicatedHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost, options *DedicatedHostsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DedicatedHostsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a dedicated host . If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. hostName - The name of the dedicated host . parameters - Parameters supplied to the Create Dedicated Host. options - DedicatedHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHost_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myDedicatedHostGroup",
		"myDedicatedHost",
		armcompute.DedicatedHost{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"department": to.Ptr("HR"),
			},
			Properties: &armcompute.DedicatedHostProperties{
				PlatformFaultDomain: to.Ptr[int32](1),
			},
			SKU: &armcompute.SKU{
				Name: to.Ptr("DSv3-Type1"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DedicatedHostsClient) BeginDelete

func (client *DedicatedHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginDeleteOptions) (*runtime.Poller[DedicatedHostsClientDeleteResponse], error)

BeginDelete - Delete a dedicated host. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. hostName - The name of the dedicated host. options - DedicatedHostsClientBeginDeleteOptions contains the optional parameters for the DedicatedHostsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHosts_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaa",
		"aaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*DedicatedHostsClient) BeginRestart added in v0.4.0

func (client *DedicatedHostsClient) BeginRestart(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRestartOptions) (*runtime.Poller[DedicatedHostsClientRestartResponse], error)

BeginRestart - Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/en-us/azure/service-health/resource-health-overview for more details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. hostName - The name of the dedicated host. options - DedicatedHostsClientBeginRestartOptions contains the optional parameters for the DedicatedHostsClient.BeginRestart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHost_Restart.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx,
		"myResourceGroup",
		"myDedicatedHostGroup",
		"myHost",
		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)
	}
}
Output:

func (*DedicatedHostsClient) BeginUpdate

func (client *DedicatedHostsClient) BeginUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate, options *DedicatedHostsClientBeginUpdateOptions) (*runtime.Poller[DedicatedHostsClientUpdateResponse], error)

BeginUpdate - Update an dedicated host . If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. hostName - The name of the dedicated host . parameters - Parameters supplied to the Update Dedicated Host operation. options - DedicatedHostsClientBeginUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHosts_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"rgcompute",
		"aaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaa",
		armcompute.DedicatedHostUpdate{
			Tags: map[string]*string{
				"key8813": to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"),
			},
			Properties: &armcompute.DedicatedHostProperties{
				AutoReplaceOnFailure: to.Ptr(true),
				InstanceView: &armcompute.DedicatedHostInstanceView{
					AvailableCapacity: &armcompute.DedicatedHostAvailableCapacity{
						AllocatableVMs: []*armcompute.DedicatedHostAllocatableVM{
							{
								Count:  to.Ptr[float64](26),
								VMSize: to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
							}},
					},
					Statuses: []*armcompute.InstanceViewStatus{
						{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						}},
				},
				LicenseType:         to.Ptr(armcompute.DedicatedHostLicenseTypesWindowsServerHybrid),
				PlatformFaultDomain: to.Ptr[int32](1),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DedicatedHostsClient) Get

func (client *DedicatedHostsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientGetOptions) (DedicatedHostsClientGetResponse, error)

Get - Retrieves information about a dedicated host. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. hostName - The name of the dedicated host. options - DedicatedHostsClientGetOptions contains the optional parameters for the DedicatedHostsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHost_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostsClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myDedicatedHostGroup",
		"myHost",
		&armcompute.DedicatedHostsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DedicatedHostsClient) NewListByHostGroupPager added in v0.7.0

func (client *DedicatedHostsClient) NewListByHostGroupPager(resourceGroupName string, hostGroupName string, options *DedicatedHostsClientListByHostGroupOptions) *runtime.Pager[DedicatedHostsClientListByHostGroupResponse]

NewListByHostGroupPager - Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. hostGroupName - The name of the dedicated host group. options - DedicatedHostsClientListByHostGroupOptions contains the optional parameters for the DedicatedHostsClient.ListByHostGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/dedicatedHostExamples/DedicatedHosts_ListByHostGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDedicatedHostsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHostGroupPager("rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DedicatedHostsClientBeginCreateOrUpdateOptions added in v0.3.0

type DedicatedHostsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DedicatedHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginCreateOrUpdate method.

type DedicatedHostsClientBeginDeleteOptions added in v0.3.0

type DedicatedHostsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DedicatedHostsClientBeginDeleteOptions contains the optional parameters for the DedicatedHostsClient.BeginDelete method.

type DedicatedHostsClientBeginRestartOptions added in v0.4.0

type DedicatedHostsClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DedicatedHostsClientBeginRestartOptions contains the optional parameters for the DedicatedHostsClient.BeginRestart method.

type DedicatedHostsClientBeginUpdateOptions added in v0.3.0

type DedicatedHostsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DedicatedHostsClientBeginUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginUpdate method.

type DedicatedHostsClientCreateOrUpdateResponse added in v0.3.0

type DedicatedHostsClientCreateOrUpdateResponse struct {
	DedicatedHost
}

DedicatedHostsClientCreateOrUpdateResponse contains the response from method DedicatedHostsClient.CreateOrUpdate.

type DedicatedHostsClientDeleteResponse added in v0.3.0

type DedicatedHostsClientDeleteResponse struct {
}

DedicatedHostsClientDeleteResponse contains the response from method DedicatedHostsClient.Delete.

type DedicatedHostsClientGetOptions added in v0.3.0

type DedicatedHostsClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated
	// host. 'UserData' is not supported for dedicated host.
	Expand *InstanceViewTypes
}

DedicatedHostsClientGetOptions contains the optional parameters for the DedicatedHostsClient.Get method.

type DedicatedHostsClientGetResponse added in v0.3.0

type DedicatedHostsClientGetResponse struct {
	DedicatedHost
}

DedicatedHostsClientGetResponse contains the response from method DedicatedHostsClient.Get.

type DedicatedHostsClientListByHostGroupOptions added in v0.3.0

type DedicatedHostsClientListByHostGroupOptions struct {
}

DedicatedHostsClientListByHostGroupOptions contains the optional parameters for the DedicatedHostsClient.ListByHostGroup method.

type DedicatedHostsClientListByHostGroupResponse added in v0.3.0

type DedicatedHostsClientListByHostGroupResponse struct {
	DedicatedHostListResult
}

DedicatedHostsClientListByHostGroupResponse contains the response from method DedicatedHostsClient.ListByHostGroup.

type DedicatedHostsClientRestartResponse added in v0.4.0

type DedicatedHostsClientRestartResponse struct {
}

DedicatedHostsClientRestartResponse contains the response from method DedicatedHostsClient.Restart.

type DedicatedHostsClientUpdateResponse added in v0.3.0

type DedicatedHostsClientUpdateResponse struct {
	DedicatedHost
}

DedicatedHostsClientUpdateResponse contains the response from method DedicatedHostsClient.Update.

type DeleteOptions

type DeleteOptions string

DeleteOptions - Specify what happens to the network interface when the VM is deleted

const (
	DeleteOptionsDelete DeleteOptions = "Delete"
	DeleteOptionsDetach DeleteOptions = "Detach"
)

func PossibleDeleteOptionsValues

func PossibleDeleteOptionsValues() []DeleteOptions

PossibleDeleteOptionsValues returns the possible values for the DeleteOptions const type.

type DiagnosticsProfile

type DiagnosticsProfile struct {
	// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
	// NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the
	// VM.
	// You can easily view the output of your console log.
	// Azure also enables you to see a screenshot of the VM from the hypervisor.
	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}

DiagnosticsProfile - Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.

type DiffDiskOptions

type DiffDiskOptions string

DiffDiskOptions - Specifies the ephemeral disk option for operating system disk.

const (
	DiffDiskOptionsLocal DiffDiskOptions = "Local"
)

func PossibleDiffDiskOptionsValues

func PossibleDiffDiskOptionsValues() []DiffDiskOptions

PossibleDiffDiskOptionsValues returns the possible values for the DiffDiskOptions const type.

type DiffDiskPlacement

type DiffDiskPlacement string

DiffDiskPlacement - Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk or 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 and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements

const (
	DiffDiskPlacementCacheDisk    DiffDiskPlacement = "CacheDisk"
	DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk"
)

func PossibleDiffDiskPlacementValues

func PossibleDiffDiskPlacementValues() []DiffDiskPlacement

PossibleDiffDiskPlacementValues returns the possible values for the DiffDiskPlacement const type.

type DiffDiskSettings

type DiffDiskSettings struct {
	// Specifies the ephemeral disk settings for operating system disk.
	Option *DiffDiskOptions `json:"option,omitempty"`

	// Specifies the ephemeral disk placement for operating system disk.
	// Possible values are:
	// CacheDisk
	// ResourceDisk
	// Default: CacheDisk if one is configured for the VM size otherwise ResourceDisk is used.
	// Refer to 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 sizes exposes a cache disk.
	Placement *DiffDiskPlacement `json:"placement,omitempty"`
}

DiffDiskSettings - Describes the parameters of ephemeral disk settings that can be specified for operating system disk. NOTE: The ephemeral disk settings can only be specified for managed disk.

type Disallowed

type Disallowed struct {
	// A list of disk types.
	DiskTypes []*string `json:"diskTypes,omitempty"`
}

Disallowed - Describes the disallowed disk types.

func (Disallowed) MarshalJSON

func (d Disallowed) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Disallowed.

type DisallowedConfiguration

type DisallowedConfiguration struct {
	// VM disk types which are disallowed.
	VMDiskType *VMDiskTypes `json:"vmDiskType,omitempty"`
}

DisallowedConfiguration - Specifies the disallowed configuration for a virtual machine image.

type Disk

type Disk struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The extended location where the disk will be created. Extended location cannot be changed.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// Disk resource properties.
	Properties *DiskProperties `json:"properties,omitempty"`

	// The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, or StandardSSDZRS.
	SKU *DiskSKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// The Logical zone list for Disk.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
	ManagedBy *string `json:"managedBy,omitempty" azure:"ro"`

	// READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to
	// a value greater than one for disks to allow attaching them to multiple VMs.
	ManagedByExtended []*string `json:"managedByExtended,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Disk resource.

func (Disk) MarshalJSON

func (d Disk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Disk.

type DiskAccess

type DiskAccess struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The extended location where the disk access will be created. Extended location cannot be changed.
	ExtendedLocation *ExtendedLocation     `json:"extendedLocation,omitempty"`
	Properties       *DiskAccessProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DiskAccess - disk access resource.

func (DiskAccess) MarshalJSON

func (d DiskAccess) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskAccess.

type DiskAccessList

type DiskAccessList struct {
	// REQUIRED; A list of disk access resources.
	Value []*DiskAccess `json:"value,omitempty"`

	// The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access
	// resources.
	NextLink *string `json:"nextLink,omitempty"`
}

DiskAccessList - The List disk access operation response.

type DiskAccessProperties

type DiskAccessProperties struct {
	// READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection
	// is supported.
	PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"`

	// READ-ONLY; The disk access resource provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The time when the disk access was created.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`
}

func (DiskAccessProperties) MarshalJSON

func (d DiskAccessProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskAccessProperties.

func (*DiskAccessProperties) UnmarshalJSON

func (d *DiskAccessProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiskAccessProperties.

type DiskAccessUpdate

type DiskAccessUpdate struct {
	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

DiskAccessUpdate - Used for updating a disk access resource.

func (DiskAccessUpdate) MarshalJSON

func (d DiskAccessUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskAccessUpdate.

type DiskAccessesClient

type DiskAccessesClient struct {
	// contains filtered or unexported fields
}

DiskAccessesClient contains the methods for the DiskAccesses group. Don't use this type directly, use NewDiskAccessesClient() instead.

func NewDiskAccessesClient

func NewDiskAccessesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskAccessesClient, error)

NewDiskAccessesClient creates a new instance of DiskAccessesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DiskAccessesClient) BeginCreateOrUpdate

func (client *DiskAccessesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess, options *DiskAccessesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DiskAccessesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a disk access resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. diskAccess - disk access object supplied in the body of the Put disk access operation. options - DiskAccessesClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/CreateADiskAccess.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myDiskAccess",
		armcompute.DiskAccess{
			Location: to.Ptr("West US"),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskAccessesClient) BeginDelete

func (client *DiskAccessesClient) BeginDelete(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientBeginDeleteOptions) (*runtime.Poller[DiskAccessesClientDeleteResponse], error)

BeginDelete - Deletes a disk access resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskAccessesClientBeginDeleteOptions contains the optional parameters for the DiskAccessesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/DeleteADiskAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myDiskAccess",
		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)
	}
}
Output:

func (*DiskAccessesClient) BeginDeleteAPrivateEndpointConnection

func (client *DiskAccessesClient) BeginDeleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions) (*runtime.Poller[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse], error)

BeginDeleteAPrivateEndpointConnection - Deletes a private endpoint connection under a disk access resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. privateEndpointConnectionName - The name of the private endpoint connection. options - DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginDeleteAPrivateEndpointConnection method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/DeleteAPrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeleteAPrivateEndpointConnection(ctx,
		"myResourceGroup",
		"myDiskAccess",
		"myPrivateEndpointConnection",
		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)
	}
}
Output:

func (*DiskAccessesClient) BeginUpdate

func (client *DiskAccessesClient) BeginUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate, options *DiskAccessesClientBeginUpdateOptions) (*runtime.Poller[DiskAccessesClientUpdateResponse], error)

BeginUpdate - Updates (patches) a disk access resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. diskAccess - disk access object supplied in the body of the Patch disk access operation. options - DiskAccessesClientBeginUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/UpdateADiskAccess.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myDiskAccess",
		armcompute.DiskAccessUpdate{
			Tags: map[string]*string{
				"department": to.Ptr("Development"),
				"project":    to.Ptr("PrivateEndpoints"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskAccessesClient) BeginUpdateAPrivateEndpointConnection

func (client *DiskAccessesClient) BeginUpdateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions) (*runtime.Poller[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse], error)

BeginUpdateAPrivateEndpointConnection - Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. privateEndpointConnectionName - The name of the private endpoint connection. privateEndpointConnection - private endpoint connection object supplied in the body of the Put private endpoint connection operation. options - DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginUpdateAPrivateEndpointConnection method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ApprovePrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdateAPrivateEndpointConnection(ctx,
		"myResourceGroup",
		"myDiskAccess",
		"myPrivateEndpointConnection",
		armcompute.PrivateEndpointConnection{
			Properties: &armcompute.PrivateEndpointConnectionProperties{
				PrivateLinkServiceConnectionState: &armcompute.PrivateLinkServiceConnectionState{
					Description: to.Ptr("Approving myPrivateEndpointConnection"),
					Status:      to.Ptr(armcompute.PrivateEndpointServiceConnectionStatusApproved),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskAccessesClient) Get

func (client *DiskAccessesClient) Get(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientGetOptions) (DiskAccessesClientGetResponse, error)

Get - Gets information about a disk access resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskAccessesClientGetOptions contains the optional parameters for the DiskAccessesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetInformationAboutADiskAccessWithPrivateEndpoints.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myDiskAccess",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskAccessesClient) GetAPrivateEndpointConnection

func (client *DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientGetAPrivateEndpointConnectionOptions) (DiskAccessesClientGetAPrivateEndpointConnectionResponse, error)

GetAPrivateEndpointConnection - Gets information about a private endpoint connection under a disk access resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. privateEndpointConnectionName - The name of the private endpoint connection. options - DiskAccessesClientGetAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.GetAPrivateEndpointConnection method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetInformationAboutAPrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetAPrivateEndpointConnection(ctx,
		"myResourceGroup",
		"myDiskAccess",
		"myPrivateEndpointConnection",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskAccessesClient) GetPrivateLinkResources

func (client *DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientGetPrivateLinkResourcesOptions) (DiskAccessesClientGetPrivateLinkResourcesResponse, error)

GetPrivateLinkResources - Gets the private link resources possible under disk access resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskAccessesClientGetPrivateLinkResourcesOptions contains the optional parameters for the DiskAccessesClient.GetPrivateLinkResources method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetDiskAccessPrivateLinkResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetPrivateLinkResources(ctx,
		"myResourceGroup",
		"myDiskAccess",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskAccessesClient) NewListByResourceGroupPager added in v0.7.0

NewListByResourceGroupPager - Lists all the disk access resources under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. options - DiskAccessesClientListByResourceGroupOptions contains the optional parameters for the DiskAccessesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListDiskAccessesInAResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DiskAccessesClient) NewListPager added in v0.7.0

NewListPager - Lists all the disk access resources under a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 options - DiskAccessesClientListOptions contains the optional parameters for the DiskAccessesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListDiskAccessesInASubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DiskAccessesClient) NewListPrivateEndpointConnectionsPager added in v0.7.0

func (client *DiskAccessesClient) NewListPrivateEndpointConnectionsPager(resourceGroupName string, diskAccessName string, options *DiskAccessesClientListPrivateEndpointConnectionsOptions) *runtime.Pager[DiskAccessesClientListPrivateEndpointConnectionsResponse]

NewListPrivateEndpointConnectionsPager - List information about private endpoint connections under a disk access resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskAccessesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the DiskAccessesClient.ListPrivateEndpointConnections method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListPrivateEndpointConnectionsInADiskAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskAccessesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPrivateEndpointConnectionsPager("myResourceGroup",
		"myDiskAccess",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DiskAccessesClientBeginCreateOrUpdateOptions added in v0.3.0

type DiskAccessesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskAccessesClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginCreateOrUpdate method.

type DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions added in v0.3.0

type DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginDeleteAPrivateEndpointConnection method.

type DiskAccessesClientBeginDeleteOptions added in v0.3.0

type DiskAccessesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskAccessesClientBeginDeleteOptions contains the optional parameters for the DiskAccessesClient.BeginDelete method.

type DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions added in v0.3.0

type DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginUpdateAPrivateEndpointConnection method.

type DiskAccessesClientBeginUpdateOptions added in v0.3.0

type DiskAccessesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskAccessesClientBeginUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginUpdate method.

type DiskAccessesClientCreateOrUpdateResponse added in v0.3.0

type DiskAccessesClientCreateOrUpdateResponse struct {
	DiskAccess
}

DiskAccessesClientCreateOrUpdateResponse contains the response from method DiskAccessesClient.CreateOrUpdate.

type DiskAccessesClientDeleteAPrivateEndpointConnectionResponse added in v0.3.0

type DiskAccessesClientDeleteAPrivateEndpointConnectionResponse struct {
}

DiskAccessesClientDeleteAPrivateEndpointConnectionResponse contains the response from method DiskAccessesClient.DeleteAPrivateEndpointConnection.

type DiskAccessesClientDeleteResponse added in v0.3.0

type DiskAccessesClientDeleteResponse struct {
}

DiskAccessesClientDeleteResponse contains the response from method DiskAccessesClient.Delete.

type DiskAccessesClientGetAPrivateEndpointConnectionOptions added in v0.3.0

type DiskAccessesClientGetAPrivateEndpointConnectionOptions struct {
}

DiskAccessesClientGetAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.GetAPrivateEndpointConnection method.

type DiskAccessesClientGetAPrivateEndpointConnectionResponse added in v0.3.0

type DiskAccessesClientGetAPrivateEndpointConnectionResponse struct {
	PrivateEndpointConnection
}

DiskAccessesClientGetAPrivateEndpointConnectionResponse contains the response from method DiskAccessesClient.GetAPrivateEndpointConnection.

type DiskAccessesClientGetOptions added in v0.3.0

type DiskAccessesClientGetOptions struct {
}

DiskAccessesClientGetOptions contains the optional parameters for the DiskAccessesClient.Get method.

type DiskAccessesClientGetPrivateLinkResourcesOptions added in v0.3.0

type DiskAccessesClientGetPrivateLinkResourcesOptions struct {
}

DiskAccessesClientGetPrivateLinkResourcesOptions contains the optional parameters for the DiskAccessesClient.GetPrivateLinkResources method.

type DiskAccessesClientGetPrivateLinkResourcesResponse added in v0.3.0

type DiskAccessesClientGetPrivateLinkResourcesResponse struct {
	PrivateLinkResourceListResult
}

DiskAccessesClientGetPrivateLinkResourcesResponse contains the response from method DiskAccessesClient.GetPrivateLinkResources.

type DiskAccessesClientGetResponse added in v0.3.0

type DiskAccessesClientGetResponse struct {
	DiskAccess
}

DiskAccessesClientGetResponse contains the response from method DiskAccessesClient.Get.

type DiskAccessesClientListByResourceGroupOptions added in v0.3.0

type DiskAccessesClientListByResourceGroupOptions struct {
}

DiskAccessesClientListByResourceGroupOptions contains the optional parameters for the DiskAccessesClient.ListByResourceGroup method.

type DiskAccessesClientListByResourceGroupResponse added in v0.3.0

type DiskAccessesClientListByResourceGroupResponse struct {
	DiskAccessList
}

DiskAccessesClientListByResourceGroupResponse contains the response from method DiskAccessesClient.ListByResourceGroup.

type DiskAccessesClientListOptions added in v0.3.0

type DiskAccessesClientListOptions struct {
}

DiskAccessesClientListOptions contains the optional parameters for the DiskAccessesClient.List method.

type DiskAccessesClientListPrivateEndpointConnectionsOptions added in v0.3.0

type DiskAccessesClientListPrivateEndpointConnectionsOptions struct {
}

DiskAccessesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the DiskAccessesClient.ListPrivateEndpointConnections method.

type DiskAccessesClientListPrivateEndpointConnectionsResponse added in v0.3.0

type DiskAccessesClientListPrivateEndpointConnectionsResponse struct {
	PrivateEndpointConnectionListResult
}

DiskAccessesClientListPrivateEndpointConnectionsResponse contains the response from method DiskAccessesClient.ListPrivateEndpointConnections.

type DiskAccessesClientListResponse added in v0.3.0

type DiskAccessesClientListResponse struct {
	DiskAccessList
}

DiskAccessesClientListResponse contains the response from method DiskAccessesClient.List.

type DiskAccessesClientUpdateAPrivateEndpointConnectionResponse added in v0.3.0

type DiskAccessesClientUpdateAPrivateEndpointConnectionResponse struct {
	PrivateEndpointConnection
}

DiskAccessesClientUpdateAPrivateEndpointConnectionResponse contains the response from method DiskAccessesClient.UpdateAPrivateEndpointConnection.

type DiskAccessesClientUpdateResponse added in v0.3.0

type DiskAccessesClientUpdateResponse struct {
	DiskAccess
}

DiskAccessesClientUpdateResponse contains the response from method DiskAccessesClient.Update.

type DiskCreateOption

type DiskCreateOption string

DiskCreateOption - This enumerates the possible sources of a disk's creation.

const (
	// DiskCreateOptionAttach - Disk will be attached to a VM.
	DiskCreateOptionAttach DiskCreateOption = "Attach"
	// DiskCreateOptionCopy - Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.
	DiskCreateOptionCopy DiskCreateOption = "Copy"
	// DiskCreateOptionCopyStart - Create a new disk by using a deep copy process, where the resource creation is considered complete
	// only after all data has been copied from the source.
	DiskCreateOptionCopyStart DiskCreateOption = "CopyStart"
	// DiskCreateOptionEmpty - Create an empty data disk of a size given by diskSizeGB.
	DiskCreateOptionEmpty DiskCreateOption = "Empty"
	// DiskCreateOptionFromImage - Create a new disk from a platform image specified by the given imageReference or galleryImageReference.
	DiskCreateOptionFromImage DiskCreateOption = "FromImage"
	// DiskCreateOptionImport - Create a disk by importing from a blob specified by a sourceUri in a storage account specified
	// by storageAccountId.
	DiskCreateOptionImport DiskCreateOption = "Import"
	// DiskCreateOptionImportSecure - Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported
	// disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId
	DiskCreateOptionImportSecure DiskCreateOption = "ImportSecure"
	// DiskCreateOptionRestore - Create a new disk by copying from a backup recovery point.
	DiskCreateOptionRestore DiskCreateOption = "Restore"
	// DiskCreateOptionUpload - Create a new disk by obtaining a write token and using it to directly upload the contents of the
	// disk.
	DiskCreateOptionUpload DiskCreateOption = "Upload"
	// DiskCreateOptionUploadPreparedSecure - Similar to Upload create option. Create a new Trusted Launch VM or Confidential
	// VM supported disk and upload using write token in both disk and VM guest state
	DiskCreateOptionUploadPreparedSecure DiskCreateOption = "UploadPreparedSecure"
)

func PossibleDiskCreateOptionValues

func PossibleDiskCreateOptionValues() []DiskCreateOption

PossibleDiskCreateOptionValues returns the possible values for the DiskCreateOption const type.

type DiskCreateOptionTypes

type DiskCreateOptionTypes string

DiskCreateOptionTypes - Specifies how the virtual machine should be created. Possible values are: Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine. FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.

const (
	DiskCreateOptionTypesAttach    DiskCreateOptionTypes = "Attach"
	DiskCreateOptionTypesEmpty     DiskCreateOptionTypes = "Empty"
	DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage"
)

func PossibleDiskCreateOptionTypesValues

func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes

PossibleDiskCreateOptionTypesValues returns the possible values for the DiskCreateOptionTypes const type.

type DiskDeleteOptionTypes

type DiskDeleteOptionTypes string

DiskDeleteOptionTypes - Specifies the behavior of the managed disk when the VM gets deleted i.e whether the managed disk is deleted or detached. Supported values: Delete If this value is used, the managed disk is deleted when VM gets deleted. Detach If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01

const (
	DiskDeleteOptionTypesDelete DiskDeleteOptionTypes = "Delete"
	DiskDeleteOptionTypesDetach DiskDeleteOptionTypes = "Detach"
)

func PossibleDiskDeleteOptionTypesValues

func PossibleDiskDeleteOptionTypesValues() []DiskDeleteOptionTypes

PossibleDiskDeleteOptionTypesValues returns the possible values for the DiskDeleteOptionTypes const type.

type DiskDetachOptionTypes

type DiskDetachOptionTypes string

DiskDetachOptionTypes - Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: ForceDetach. detachOption: ForceDetach is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.

const (
	DiskDetachOptionTypesForceDetach DiskDetachOptionTypes = "ForceDetach"
)

func PossibleDiskDetachOptionTypesValues

func PossibleDiskDetachOptionTypesValues() []DiskDetachOptionTypes

PossibleDiskDetachOptionTypesValues returns the possible values for the DiskDetachOptionTypes const type.

type DiskEncryptionSet

type DiskEncryptionSet struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used
	// to encrypt disks.
	Identity   *EncryptionSetIdentity   `json:"identity,omitempty"`
	Properties *EncryptionSetProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DiskEncryptionSet - disk encryption set resource.

func (DiskEncryptionSet) MarshalJSON

func (d DiskEncryptionSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSet.

type DiskEncryptionSetIdentityType

type DiskEncryptionSetIdentityType string

DiskEncryptionSetIdentityType - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.

const (
	DiskEncryptionSetIdentityTypeNone           DiskEncryptionSetIdentityType = "None"
	DiskEncryptionSetIdentityTypeSystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned"
)

func PossibleDiskEncryptionSetIdentityTypeValues

func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType

PossibleDiskEncryptionSetIdentityTypeValues returns the possible values for the DiskEncryptionSetIdentityType const type.

type DiskEncryptionSetList

type DiskEncryptionSetList struct {
	// REQUIRED; A list of disk encryption sets.
	Value []*DiskEncryptionSet `json:"value,omitempty"`

	// The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption
	// sets.
	NextLink *string `json:"nextLink,omitempty"`
}

DiskEncryptionSetList - The List disk encryption set operation response.

type DiskEncryptionSetParameters

type DiskEncryptionSetParameters struct {
	// Resource Id
	ID *string `json:"id,omitempty"`
}

DiskEncryptionSetParameters - Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.

type DiskEncryptionSetType

type DiskEncryptionSetType string

DiskEncryptionSetType - The type of key used to encrypt the data of the disk.

const (
	// DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey - Confidential VM supported disk and VM guest state would be
	// encrypted with customer managed key.
	DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey DiskEncryptionSetType = "ConfidentialVmEncryptedWithCustomerKey"
	// DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey - Resource using diskEncryptionSet would be encrypted at rest with
	// Customer managed key that can be changed and revoked by a customer.
	DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey"
	// DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys - Resource using diskEncryptionSet would be encrypted
	// at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed.
	DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys"
)

func PossibleDiskEncryptionSetTypeValues

func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType

PossibleDiskEncryptionSetTypeValues returns the possible values for the DiskEncryptionSetType const type.

type DiskEncryptionSetUpdate

type DiskEncryptionSetUpdate struct {
	// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used
	// to encrypt disks.
	Identity *EncryptionSetIdentity `json:"identity,omitempty"`

	// disk encryption set resource update properties.
	Properties *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

DiskEncryptionSetUpdate - disk encryption set update resource.

func (DiskEncryptionSetUpdate) MarshalJSON

func (d DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetUpdate.

type DiskEncryptionSetUpdateProperties

type DiskEncryptionSetUpdateProperties struct {
	// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots
	ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`

	// The type of key used to encrypt the data of the disk.
	EncryptionType *DiskEncryptionSetType `json:"encryptionType,omitempty"`

	// Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
	RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
}

DiskEncryptionSetUpdateProperties - disk encryption set resource update properties.

type DiskEncryptionSetsClient

type DiskEncryptionSetsClient struct {
	// contains filtered or unexported fields
}

DiskEncryptionSetsClient contains the methods for the DiskEncryptionSets group. Don't use this type directly, use NewDiskEncryptionSetsClient() instead.

func NewDiskEncryptionSetsClient

func NewDiskEncryptionSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskEncryptionSetsClient, error)

NewDiskEncryptionSetsClient creates a new instance of DiskEncryptionSetsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DiskEncryptionSetsClient) BeginCreateOrUpdate

func (client *DiskEncryptionSetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet, options *DiskEncryptionSetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DiskEncryptionSetsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a disk encryption set If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set operation. options - DiskEncryptionSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myDiskEncryptionSet",
		armcompute.DiskEncryptionSet{
			Location: to.Ptr("West US"),
			Identity: &armcompute.EncryptionSetIdentity{
				Type: to.Ptr(armcompute.DiskEncryptionSetIdentityTypeSystemAssigned),
			},
			Properties: &armcompute.EncryptionSetProperties{
				ActiveKey: &armcompute.KeyForDiskEncryptionSet{
					KeyURL: to.Ptr("https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}"),
				},
				EncryptionType: to.Ptr(armcompute.DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskEncryptionSetsClient) BeginDelete

func (client *DiskEncryptionSetsClient) BeginDelete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientBeginDeleteOptions) (*runtime.Poller[DiskEncryptionSetsClientDeleteResponse], error)

BeginDelete - Deletes a disk encryption set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskEncryptionSetsClientBeginDeleteOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/DeleteADiskEncryptionSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myDiskEncryptionSet",
		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)
	}
}
Output:

func (*DiskEncryptionSetsClient) BeginUpdate

func (client *DiskEncryptionSetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate, options *DiskEncryptionSetsClientBeginUpdateOptions) (*runtime.Poller[DiskEncryptionSetsClientUpdateResponse], error)

BeginUpdate - Updates (patches) a disk encryption set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set operation. options - DiskEncryptionSetsClientBeginUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabled.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myDiskEncryptionSet",
		armcompute.DiskEncryptionSetUpdate{
			Identity: &armcompute.EncryptionSetIdentity{
				Type: to.Ptr(armcompute.DiskEncryptionSetIdentityTypeSystemAssigned),
			},
			Properties: &armcompute.DiskEncryptionSetUpdateProperties{
				ActiveKey: &armcompute.KeyForDiskEncryptionSet{
					KeyURL: to.Ptr("https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1"),
				},
				EncryptionType:                    to.Ptr(armcompute.DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey),
				RotationToLatestKeyVersionEnabled: to.Ptr(true),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskEncryptionSetsClient) Get

func (client *DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientGetOptions) (DiskEncryptionSetsClientGetResponse, error)

Get - Gets information about a disk encryption set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskEncryptionSetsClientGetOptions contains the optional parameters for the DiskEncryptionSetsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetInformationAboutADiskEncryptionSetWithAutoKeyRotationError.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myDiskEncryptionSet",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskEncryptionSetsClient) NewListAssociatedResourcesPager added in v0.7.0

func (client *DiskEncryptionSetsClient) NewListAssociatedResourcesPager(resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientListAssociatedResourcesOptions) *runtime.Pager[DiskEncryptionSetsClientListAssociatedResourcesResponse]

NewListAssociatedResourcesPager - Lists all resources that are encrypted with this disk encryption set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DiskEncryptionSetsClientListAssociatedResourcesOptions contains the optional parameters for the DiskEncryptionSetsClient.ListAssociatedResources method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListDiskEncryptionSetAssociatedResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAssociatedResourcesPager("myResourceGroup",
		"myDiskEncryptionSet",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DiskEncryptionSetsClient) NewListByResourceGroupPager added in v0.7.0

NewListByResourceGroupPager - Lists all the disk encryption sets under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. options - DiskEncryptionSetsClientListByResourceGroupOptions contains the optional parameters for the DiskEncryptionSetsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListDiskEncryptionSetsInAResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DiskEncryptionSetsClient) NewListPager added in v0.7.0

NewListPager - Lists all the disk encryption sets under a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 options - DiskEncryptionSetsClientListOptions contains the optional parameters for the DiskEncryptionSetsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListDiskEncryptionSetsInASubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskEncryptionSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DiskEncryptionSetsClientBeginCreateOrUpdateOptions added in v0.3.0

type DiskEncryptionSetsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskEncryptionSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginCreateOrUpdate method.

type DiskEncryptionSetsClientBeginDeleteOptions added in v0.3.0

type DiskEncryptionSetsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskEncryptionSetsClientBeginDeleteOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginDelete method.

type DiskEncryptionSetsClientBeginUpdateOptions added in v0.3.0

type DiskEncryptionSetsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskEncryptionSetsClientBeginUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginUpdate method.

type DiskEncryptionSetsClientCreateOrUpdateResponse added in v0.3.0

type DiskEncryptionSetsClientCreateOrUpdateResponse struct {
	DiskEncryptionSet
}

DiskEncryptionSetsClientCreateOrUpdateResponse contains the response from method DiskEncryptionSetsClient.CreateOrUpdate.

type DiskEncryptionSetsClientDeleteResponse added in v0.3.0

type DiskEncryptionSetsClientDeleteResponse struct {
}

DiskEncryptionSetsClientDeleteResponse contains the response from method DiskEncryptionSetsClient.Delete.

type DiskEncryptionSetsClientGetOptions added in v0.3.0

type DiskEncryptionSetsClientGetOptions struct {
}

DiskEncryptionSetsClientGetOptions contains the optional parameters for the DiskEncryptionSetsClient.Get method.

type DiskEncryptionSetsClientGetResponse added in v0.3.0

type DiskEncryptionSetsClientGetResponse struct {
	DiskEncryptionSet
}

DiskEncryptionSetsClientGetResponse contains the response from method DiskEncryptionSetsClient.Get.

type DiskEncryptionSetsClientListAssociatedResourcesOptions added in v0.3.0

type DiskEncryptionSetsClientListAssociatedResourcesOptions struct {
}

DiskEncryptionSetsClientListAssociatedResourcesOptions contains the optional parameters for the DiskEncryptionSetsClient.ListAssociatedResources method.

type DiskEncryptionSetsClientListAssociatedResourcesResponse added in v0.3.0

type DiskEncryptionSetsClientListAssociatedResourcesResponse struct {
	ResourceURIList
}

DiskEncryptionSetsClientListAssociatedResourcesResponse contains the response from method DiskEncryptionSetsClient.ListAssociatedResources.

type DiskEncryptionSetsClientListByResourceGroupOptions added in v0.3.0

type DiskEncryptionSetsClientListByResourceGroupOptions struct {
}

DiskEncryptionSetsClientListByResourceGroupOptions contains the optional parameters for the DiskEncryptionSetsClient.ListByResourceGroup method.

type DiskEncryptionSetsClientListByResourceGroupResponse added in v0.3.0

type DiskEncryptionSetsClientListByResourceGroupResponse struct {
	DiskEncryptionSetList
}

DiskEncryptionSetsClientListByResourceGroupResponse contains the response from method DiskEncryptionSetsClient.ListByResourceGroup.

type DiskEncryptionSetsClientListOptions added in v0.3.0

type DiskEncryptionSetsClientListOptions struct {
}

DiskEncryptionSetsClientListOptions contains the optional parameters for the DiskEncryptionSetsClient.List method.

type DiskEncryptionSetsClientListResponse added in v0.3.0

type DiskEncryptionSetsClientListResponse struct {
	DiskEncryptionSetList
}

DiskEncryptionSetsClientListResponse contains the response from method DiskEncryptionSetsClient.List.

type DiskEncryptionSetsClientUpdateResponse added in v0.3.0

type DiskEncryptionSetsClientUpdateResponse struct {
	DiskEncryptionSet
}

DiskEncryptionSetsClientUpdateResponse contains the response from method DiskEncryptionSetsClient.Update.

type DiskEncryptionSettings

type DiskEncryptionSettings struct {
	// Specifies the location of the disk encryption key, which is a Key Vault Secret.
	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`

	// Specifies whether disk encryption should be enabled on the virtual machine.
	Enabled *bool `json:"enabled,omitempty"`

	// Specifies the location of the key encryption key in Key Vault.
	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
}

DiskEncryptionSettings - Describes a Encryption Settings for a Disk

type DiskImageEncryption

type DiskImageEncryption struct {
	// A relative URI containing the resource ID of the disk encryption set.
	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
}

DiskImageEncryption - This is the disk image encryption base class.

type DiskInstanceView

type DiskInstanceView struct {
	// Specifies the encryption settings for the OS Disk.
	// Minimum api-version: 2015-06-15
	EncryptionSettings []*DiskEncryptionSettings `json:"encryptionSettings,omitempty"`

	// The disk name.
	Name *string `json:"name,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`
}

DiskInstanceView - The instance view of the disk.

func (DiskInstanceView) MarshalJSON

func (d DiskInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskInstanceView.

type DiskList

type DiskList struct {
	// REQUIRED; A list of disks.
	Value []*Disk `json:"value,omitempty"`

	// The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
	NextLink *string `json:"nextLink,omitempty"`
}

DiskList - The List Disks operation response.

type DiskProperties

type DiskProperties struct {
	// REQUIRED; Disk source information. CreationData information cannot be changed after the disk has been created.
	CreationData *CreationData `json:"creationData,omitempty"`

	// Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default.
	// Does not apply to Ultra disks.
	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`

	// Percentage complete for the background copy when a resource is created via the CopyStart operation.
	CompletionPercent *float32 `json:"completionPercent,omitempty"`

	// Additional authentication requirements when exporting or uploading to a disk or snapshot.
	DataAccessAuthMode *DataAccessAuthMode `json:"dataAccessAuthMode,omitempty"`

	// ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessID *string `json:"diskAccessId,omitempty"`

	// The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer
	// between 4k and 256k bytes.
	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`

	// The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k
	// bytes.
	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`

	// The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions
	// of bytes per second - MB here uses the ISO notation, of powers of 10.
	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`

	// The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here
	// uses the ISO notation, of powers of 10.
	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`

	// If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
	// field is present for updates or creation with other options, it indicates a
	// resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption `json:"encryption,omitempty"`

	// Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`

	// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can
	// be mounted on multiple VMs at the same time.
	MaxShares *int32 `json:"maxShares,omitempty"`

	// Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`

	// The Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Policy for controlling export on the disk.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher:
	// MicrosoftWindowsServer, product: WindowsServer}
	PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"`

	// Contains the security related information for the resource.
	SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"`

	// List of supported capabilities for the image from which the OS disk was created.
	SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`

	// Indicates the OS on a disk supports hibernation.
	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`

	// Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/.
	// Does not apply to Ultra disks.
	Tier *string `json:"tier,omitempty"`

	// READ-ONLY; The size of the disk in bytes. This field is read only.
	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty" azure:"ro"`

	// READ-ONLY; The state of the disk.
	DiskState *DiskState `json:"diskState,omitempty" azure:"ro"`

	// READ-ONLY; Properties of the disk for which update is pending.
	PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty" azure:"ro"`

	// READ-ONLY; The disk provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than
	// one for disks to allow attaching them to multiple VMs.
	ShareInfo []*ShareInfoElement `json:"shareInfo,omitempty" azure:"ro"`

	// READ-ONLY; The time when the disk was created.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`

	// READ-ONLY; Unique Guid identifying the resource.
	UniqueID *string `json:"uniqueId,omitempty" azure:"ro"`
}

DiskProperties - Disk resource properties.

func (DiskProperties) MarshalJSON

func (d DiskProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskProperties.

func (*DiskProperties) UnmarshalJSON

func (d *DiskProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiskProperties.

type DiskPurchasePlan

type DiskPurchasePlan struct {
	// REQUIRED; The plan ID.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference
	// element.
	Product *string `json:"product,omitempty"`

	// REQUIRED; The publisher ID.
	Publisher *string `json:"publisher,omitempty"`

	// The Offer Promotion Code.
	PromotionCode *string `json:"promotionCode,omitempty"`
}

DiskPurchasePlan - Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

type DiskRestorePoint

type DiskRestorePoint struct {
	// Properties of an incremental disk restore point
	Properties *DiskRestorePointProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DiskRestorePoint - Properties of disk restore point

type DiskRestorePointClient

type DiskRestorePointClient struct {
	// contains filtered or unexported fields
}

DiskRestorePointClient contains the methods for the DiskRestorePoint group. Don't use this type directly, use NewDiskRestorePointClient() instead.

func NewDiskRestorePointClient

func NewDiskRestorePointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskRestorePointClient, error)

NewDiskRestorePointClient creates a new instance of DiskRestorePointClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DiskRestorePointClient) BeginGrantAccess

func (client *DiskRestorePointClient) BeginGrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData, options *DiskRestorePointClientBeginGrantAccessOptions) (*runtime.Poller[DiskRestorePointClientGrantAccessResponse], error)

BeginGrantAccess - Grants access to a diskRestorePoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection that the disk restore point belongs. vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs. diskRestorePointName - The name of the disk restore point created. grantAccessData - Access data object supplied in the body of the get disk access operation. options - DiskRestorePointClientBeginGrantAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginGrantAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/BeginGetAccessDiskRestorePoint.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskRestorePointClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGrantAccess(ctx,
		"myResourceGroup",
		"rpc",
		"vmrp",
		"TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745",
		armcompute.GrantAccessData{
			Access:            to.Ptr(armcompute.AccessLevelRead),
			DurationInSeconds: to.Ptr[int32](300),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskRestorePointClient) BeginRevokeAccess

func (client *DiskRestorePointClient) BeginRevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientBeginRevokeAccessOptions) (*runtime.Poller[DiskRestorePointClientRevokeAccessResponse], error)

BeginRevokeAccess - Revokes access to a diskRestorePoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection that the disk restore point belongs. vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs. diskRestorePointName - The name of the disk restore point created. options - DiskRestorePointClientBeginRevokeAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginRevokeAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/EndGetAccessDiskRestorePoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskRestorePointClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRevokeAccess(ctx,
		"myResourceGroup",
		"rpc",
		"vmrp",
		"TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745",
		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)
	}
}
Output:

func (*DiskRestorePointClient) Get

func (client *DiskRestorePointClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientGetOptions) (DiskRestorePointClientGetResponse, error)

Get - Get disk restorePoint resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection that the disk restore point belongs. vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs. diskRestorePointName - The name of the disk restore point created. options - DiskRestorePointClientGetOptions contains the optional parameters for the DiskRestorePointClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetDiskRestorePointResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskRestorePointClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"rpc",
		"vmrp",
		"TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiskRestorePointClient) NewListByRestorePointPager added in v0.7.0

func (client *DiskRestorePointClient) NewListByRestorePointPager(resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, options *DiskRestorePointClientListByRestorePointOptions) *runtime.Pager[DiskRestorePointClientListByRestorePointResponse]

NewListByRestorePointPager - Lists diskRestorePoints under a vmRestorePoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection that the disk restore point belongs. vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs. options - DiskRestorePointClientListByRestorePointOptions contains the optional parameters for the DiskRestorePointClient.ListByRestorePoint method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListDiskRestorePointsInVmRestorePoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDiskRestorePointClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByRestorePointPager("myResourceGroup",
		"rpc",
		"vmrp",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DiskRestorePointClientBeginGrantAccessOptions added in v0.3.0

type DiskRestorePointClientBeginGrantAccessOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskRestorePointClientBeginGrantAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginGrantAccess method.

type DiskRestorePointClientBeginRevokeAccessOptions added in v0.3.0

type DiskRestorePointClientBeginRevokeAccessOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DiskRestorePointClientBeginRevokeAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginRevokeAccess method.

type DiskRestorePointClientGetOptions added in v0.3.0

type DiskRestorePointClientGetOptions struct {
}

DiskRestorePointClientGetOptions contains the optional parameters for the DiskRestorePointClient.Get method.

type DiskRestorePointClientGetResponse added in v0.3.0

type DiskRestorePointClientGetResponse struct {
	DiskRestorePoint
}

DiskRestorePointClientGetResponse contains the response from method DiskRestorePointClient.Get.

type DiskRestorePointClientGrantAccessResponse added in v0.3.0

type DiskRestorePointClientGrantAccessResponse struct {
	AccessURI
}

DiskRestorePointClientGrantAccessResponse contains the response from method DiskRestorePointClient.GrantAccess.

type DiskRestorePointClientListByRestorePointOptions added in v0.3.0

type DiskRestorePointClientListByRestorePointOptions struct {
}

DiskRestorePointClientListByRestorePointOptions contains the optional parameters for the DiskRestorePointClient.ListByRestorePoint method.

type DiskRestorePointClientListByRestorePointResponse added in v0.3.0

type DiskRestorePointClientListByRestorePointResponse struct {
	DiskRestorePointList
}

DiskRestorePointClientListByRestorePointResponse contains the response from method DiskRestorePointClient.ListByRestorePoint.

type DiskRestorePointClientRevokeAccessResponse added in v0.3.0

type DiskRestorePointClientRevokeAccessResponse struct {
}

DiskRestorePointClientRevokeAccessResponse contains the response from method DiskRestorePointClient.RevokeAccess.

type DiskRestorePointInstanceView added in v0.4.0

type DiskRestorePointInstanceView struct {
	// Disk restore point Id.
	ID *string `json:"id,omitempty"`

	// The disk restore point replication status information.
	ReplicationStatus *DiskRestorePointReplicationStatus `json:"replicationStatus,omitempty"`
}

DiskRestorePointInstanceView - The instance view of a disk restore point.

type DiskRestorePointList

type DiskRestorePointList struct {
	// REQUIRED; A list of disk restore points.
	Value []*DiskRestorePoint `json:"value,omitempty"`

	// The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore
	// points.
	NextLink *string `json:"nextLink,omitempty"`
}

DiskRestorePointList - The List Disk Restore Points operation response.

type DiskRestorePointProperties

type DiskRestorePointProperties struct {
	// Percentage complete for the background copy of disk restore point when source resource is from a different region.
	CompletionPercent *float32 `json:"completionPercent,omitempty"`

	// ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessID *string `json:"diskAccessId,omitempty"`

	// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`

	// Policy for controlling export on the disk.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Purchase plan information for the the image from which the OS disk was created.
	PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"`

	// List of supported capabilities for the image from which the OS disk was created.
	SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`

	// Indicates the OS on a disk supports hibernation.
	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`

	// READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption `json:"encryption,omitempty" azure:"ro"`

	// READ-ONLY; id of the backing snapshot's MIS family
	FamilyID *string `json:"familyId,omitempty" azure:"ro"`

	// READ-ONLY; The Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty" azure:"ro"`

	// READ-ONLY; Replication state of disk restore point when source resource is from a different region.
	ReplicationState *string `json:"replicationState,omitempty" azure:"ro"`

	// READ-ONLY; arm id of source disk or source disk restore point.
	SourceResourceID *string `json:"sourceResourceId,omitempty" azure:"ro"`

	// READ-ONLY; Location of source disk or source disk restore point when source resource is from a different region.
	SourceResourceLocation *string `json:"sourceResourceLocation,omitempty" azure:"ro"`

	// READ-ONLY; unique incarnation id of the source disk
	SourceUniqueID *string `json:"sourceUniqueId,omitempty" azure:"ro"`

	// READ-ONLY; The timestamp of restorePoint creation
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`
}

DiskRestorePointProperties - Properties of an incremental disk restore point

func (*DiskRestorePointProperties) UnmarshalJSON

func (d *DiskRestorePointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointProperties.

type DiskRestorePointReplicationStatus added in v0.6.0

type DiskRestorePointReplicationStatus struct {
	// Replication completion percentage.
	CompletionPercent *int32 `json:"completionPercent,omitempty"`

	// The resource status information.
	Status *InstanceViewStatus `json:"status,omitempty"`
}

DiskRestorePointReplicationStatus - The instance view of a disk restore point.

type DiskSKU

type DiskSKU struct {
	// The sku name.
	Name *DiskStorageAccountTypes `json:"name,omitempty"`

	// READ-ONLY; The sku tier.
	Tier *string `json:"tier,omitempty" azure:"ro"`
}

DiskSKU - The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, or StandardSSDZRS.

type DiskSecurityProfile

type DiskSecurityProfile struct {
	// ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key
	SecureVMDiskEncryptionSetID *string `json:"secureVMDiskEncryptionSetId,omitempty"`

	// Specifies the SecurityType of the VM. Applicable for OS disks only.
	SecurityType *DiskSecurityTypes `json:"securityType,omitempty"`
}

DiskSecurityProfile - Contains the security related information for the resource.

type DiskSecurityTypes

type DiskSecurityTypes string

DiskSecurityTypes - Specifies the SecurityType of the VM. Applicable for OS disks only.

const (
	// DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey - Indicates Confidential VM disk with both OS disk and VM guest
	// state encrypted with a customer managed key
	DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithCustomerKey"
	// DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey - Indicates Confidential VM disk with both OS disk and VM guest
	// state encrypted with a platform managed key
	DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithPlatformKey"
	// DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey - Indicates Confidential VM disk with only VM guest
	// state encrypted
	DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey"
	// DiskSecurityTypesTrustedLaunch - Trusted Launch provides security features such as secure boot and virtual Trusted Platform
	// Module (vTPM)
	DiskSecurityTypesTrustedLaunch DiskSecurityTypes = "TrustedLaunch"
)

func PossibleDiskSecurityTypesValues

func PossibleDiskSecurityTypesValues() []DiskSecurityTypes

PossibleDiskSecurityTypesValues returns the possible values for the DiskSecurityTypes const type.

type DiskState

type DiskState string

DiskState - This enumerates the possible state of the disk.

const (
	// DiskStateActiveSAS - The disk currently has an Active SAS Uri associated with it.
	DiskStateActiveSAS DiskState = "ActiveSAS"
	// DiskStateActiveSASFrozen - The disk is attached to a VM in hibernated state and has an active SAS URI associated with it.
	DiskStateActiveSASFrozen DiskState = "ActiveSASFrozen"
	// DiskStateActiveUpload - A disk is created for upload and a write token has been issued for uploading to it.
	DiskStateActiveUpload DiskState = "ActiveUpload"
	// DiskStateAttached - The disk is currently attached to a running VM.
	DiskStateAttached DiskState = "Attached"
	// DiskStateFrozen - The disk is attached to a VM which is in hibernated state.
	DiskStateFrozen DiskState = "Frozen"
	// DiskStateReadyToUpload - A disk is ready to be created by upload by requesting a write token.
	DiskStateReadyToUpload DiskState = "ReadyToUpload"
	// DiskStateReserved - The disk is attached to a stopped-deallocated VM.
	DiskStateReserved DiskState = "Reserved"
	// DiskStateUnattached - The disk is not being used and can be attached to a VM.
	DiskStateUnattached DiskState = "Unattached"
)

func PossibleDiskStateValues

func PossibleDiskStateValues() []DiskState

PossibleDiskStateValues returns the possible values for the DiskState const type.

type DiskStorageAccountTypes

type DiskStorageAccountTypes string

DiskStorageAccountTypes - The sku name.

const (
	// DiskStorageAccountTypesPremiumLRS - Premium SSD locally redundant storage. Best for production and performance sensitive
	// workloads.
	DiskStorageAccountTypesPremiumLRS DiskStorageAccountTypes = "Premium_LRS"
	// DiskStorageAccountTypesPremiumZRS - Premium SSD zone redundant storage. Best for the production workloads that need storage
	// resiliency against zone failures.
	DiskStorageAccountTypesPremiumZRS DiskStorageAccountTypes = "Premium_ZRS"
	// DiskStorageAccountTypesStandardLRS - Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent
	// access.
	DiskStorageAccountTypesStandardLRS DiskStorageAccountTypes = "Standard_LRS"
	// DiskStorageAccountTypesStandardSSDLRS - Standard SSD locally redundant storage. Best for web servers, lightly used enterprise
	// applications and dev/test.
	DiskStorageAccountTypesStandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS"
	// DiskStorageAccountTypesStandardSSDZRS - Standard SSD zone redundant storage. Best for web servers, lightly used enterprise
	// applications and dev/test that need storage resiliency against zone failures.
	DiskStorageAccountTypesStandardSSDZRS DiskStorageAccountTypes = "StandardSSD_ZRS"
	// DiskStorageAccountTypesUltraSSDLRS - Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA,
	// top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.
	DiskStorageAccountTypesUltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS"
)

func PossibleDiskStorageAccountTypesValues

func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes

PossibleDiskStorageAccountTypesValues returns the possible values for the DiskStorageAccountTypes const type.

type DiskUpdate

type DiskUpdate struct {
	// Disk resource update properties.
	Properties *DiskUpdateProperties `json:"properties,omitempty"`

	// The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, or StandardSSDZRS.
	SKU *DiskSKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

DiskUpdate - Disk update resource.

func (DiskUpdate) MarshalJSON

func (d DiskUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskUpdate.

type DiskUpdateProperties

type DiskUpdateProperties struct {
	// Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default.
	// Does not apply to Ultra disks.
	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`

	// Additional authentication requirements when exporting or uploading to a disk or snapshot.
	DataAccessAuthMode *DataAccessAuthMode `json:"dataAccessAuthMode,omitempty"`

	// ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessID *string `json:"diskAccessId,omitempty"`

	// The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer
	// between 4k and 256k bytes.
	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`

	// The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k
	// bytes.
	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`

	// The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions
	// of bytes per second - MB here uses the ISO notation, of powers of 10.
	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`

	// The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here
	// uses the ISO notation, of powers of 10.
	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`

	// If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
	// field is present for updates or creation with other options, it indicates a
	// resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption `json:"encryption,omitempty"`

	// Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`

	// The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can
	// be mounted on multiple VMs at the same time.
	MaxShares *int32 `json:"maxShares,omitempty"`

	// Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`

	// the Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Policy for controlling export on the disk.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Purchase plan information to be added on the OS disk
	PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"`

	// List of supported capabilities to be added on the OS disk.
	SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`

	// Indicates the OS on a disk supports hibernation.
	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`

	// Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/.
	// Does not apply to Ultra disks.
	Tier *string `json:"tier,omitempty"`

	// READ-ONLY; Properties of the disk for which update is pending.
	PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty" azure:"ro"`
}

DiskUpdateProperties - Disk resource update properties.

type DisksClient

type DisksClient struct {
	// contains filtered or unexported fields
}

DisksClient contains the methods for the Disks group. Don't use this type directly, use NewDisksClient() instead.

func NewDisksClient

func NewDisksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DisksClient, error)

NewDisksClient creates a new instance of DisksClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DisksClient) BeginCreateOrUpdate

func (client *DisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk, options *DisksClientBeginCreateOrUpdateOptions) (*runtime.Poller[DisksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a disk. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. disk - Disk object supplied in the body of the Put disk operation. options - DisksClientBeginCreateOrUpdateOptions contains the optional parameters for the DisksClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/CreateAConfidentialVMDiskEncryptedWithCMK.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myDisk",
		armcompute.Disk{
			Location: to.Ptr("West US"),
			Properties: &armcompute.DiskProperties{
				CreationData: &armcompute.CreationData{
					CreateOption: to.Ptr(armcompute.DiskCreateOptionFromImage),
					ImageReference: &armcompute.ImageDiskReference{
						ID: to.Ptr("/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"),
					},
				},
				OSType: to.Ptr(armcompute.OperatingSystemTypesWindows),
				SecurityProfile: &armcompute.DiskSecurityProfile{
					SecureVMDiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"),
					SecurityType:                to.Ptr(armcompute.DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DisksClient) BeginDelete

func (client *DisksClient) BeginDelete(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginDeleteOptions) (*runtime.Poller[DisksClientDeleteResponse], error)

BeginDelete - Deletes a disk. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DisksClientBeginDeleteOptions contains the optional parameters for the DisksClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/DeleteAManagedDisk.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myDisk",
		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)
	}
}
Output:

func (*DisksClient) BeginGrantAccess

func (client *DisksClient) BeginGrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData, options *DisksClientBeginGrantAccessOptions) (*runtime.Poller[DisksClientGrantAccessResponse], error)

BeginGrantAccess - Grants access to a disk. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. grantAccessData - Access data object supplied in the body of the get disk access operation. options - DisksClientBeginGrantAccessOptions contains the optional parameters for the DisksClient.BeginGrantAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/BeginGetAccessManagedDisk.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGrantAccess(ctx,
		"myResourceGroup",
		"myDisk",
		armcompute.GrantAccessData{
			Access:            to.Ptr(armcompute.AccessLevelRead),
			DurationInSeconds: to.Ptr[int32](300),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DisksClient) BeginRevokeAccess

func (client *DisksClient) BeginRevokeAccess(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginRevokeAccessOptions) (*runtime.Poller[DisksClientRevokeAccessResponse], error)

BeginRevokeAccess - Revokes access to a disk. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DisksClientBeginRevokeAccessOptions contains the optional parameters for the DisksClient.BeginRevokeAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/EndGetAccessManagedDisk.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRevokeAccess(ctx,
		"myResourceGroup",
		"myDisk",
		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)
	}
}
Output:

func (*DisksClient) BeginUpdate

func (client *DisksClient) BeginUpdate(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate, options *DisksClientBeginUpdateOptions) (*runtime.Poller[DisksClientUpdateResponse], error)

BeginUpdate - Updates (patches) a disk. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. disk - Disk object supplied in the body of the Patch disk operation. options - DisksClientBeginUpdateOptions contains the optional parameters for the DisksClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/CreateOrUpdateABurstingEnabledManagedDisk.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myDisk",
		armcompute.DiskUpdate{
			Properties: &armcompute.DiskUpdateProperties{
				BurstingEnabled: to.Ptr(true),
				DiskSizeGB:      to.Ptr[int32](1024),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DisksClient) Get

func (client *DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientGetOptions) (DisksClientGetResponse, error)

Get - Gets information about a disk. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. options - DisksClientGetOptions contains the optional parameters for the DisksClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetInformationAboutAManagedDisk.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myManagedDisk",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DisksClient) NewListByResourceGroupPager added in v0.7.0

func (client *DisksClient) NewListByResourceGroupPager(resourceGroupName string, options *DisksClientListByResourceGroupOptions) *runtime.Pager[DisksClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all the disks under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. options - DisksClientListByResourceGroupOptions contains the optional parameters for the DisksClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListManagedDisksInAResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DisksClient) NewListPager added in v0.7.0

func (client *DisksClient) NewListPager(options *DisksClientListOptions) *runtime.Pager[DisksClientListResponse]

NewListPager - Lists all the disks under a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 options - DisksClientListOptions contains the optional parameters for the DisksClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListManagedDisksInASubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewDisksClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DisksClientBeginCreateOrUpdateOptions added in v0.3.0

type DisksClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DisksClientBeginCreateOrUpdateOptions contains the optional parameters for the DisksClient.BeginCreateOrUpdate method.

type DisksClientBeginDeleteOptions added in v0.3.0

type DisksClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DisksClientBeginDeleteOptions contains the optional parameters for the DisksClient.BeginDelete method.

type DisksClientBeginGrantAccessOptions added in v0.3.0

type DisksClientBeginGrantAccessOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DisksClientBeginGrantAccessOptions contains the optional parameters for the DisksClient.BeginGrantAccess method.

type DisksClientBeginRevokeAccessOptions added in v0.3.0

type DisksClientBeginRevokeAccessOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DisksClientBeginRevokeAccessOptions contains the optional parameters for the DisksClient.BeginRevokeAccess method.

type DisksClientBeginUpdateOptions added in v0.3.0

type DisksClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DisksClientBeginUpdateOptions contains the optional parameters for the DisksClient.BeginUpdate method.

type DisksClientCreateOrUpdateResponse added in v0.3.0

type DisksClientCreateOrUpdateResponse struct {
	Disk
}

DisksClientCreateOrUpdateResponse contains the response from method DisksClient.CreateOrUpdate.

type DisksClientDeleteResponse added in v0.3.0

type DisksClientDeleteResponse struct {
}

DisksClientDeleteResponse contains the response from method DisksClient.Delete.

type DisksClientGetOptions added in v0.3.0

type DisksClientGetOptions struct {
}

DisksClientGetOptions contains the optional parameters for the DisksClient.Get method.

type DisksClientGetResponse added in v0.3.0

type DisksClientGetResponse struct {
	Disk
}

DisksClientGetResponse contains the response from method DisksClient.Get.

type DisksClientGrantAccessResponse added in v0.3.0

type DisksClientGrantAccessResponse struct {
	AccessURI
}

DisksClientGrantAccessResponse contains the response from method DisksClient.GrantAccess.

type DisksClientListByResourceGroupOptions added in v0.3.0

type DisksClientListByResourceGroupOptions struct {
}

DisksClientListByResourceGroupOptions contains the optional parameters for the DisksClient.ListByResourceGroup method.

type DisksClientListByResourceGroupResponse added in v0.3.0

type DisksClientListByResourceGroupResponse struct {
	DiskList
}

DisksClientListByResourceGroupResponse contains the response from method DisksClient.ListByResourceGroup.

type DisksClientListOptions added in v0.3.0

type DisksClientListOptions struct {
}

DisksClientListOptions contains the optional parameters for the DisksClient.List method.

type DisksClientListResponse added in v0.3.0

type DisksClientListResponse struct {
	DiskList
}

DisksClientListResponse contains the response from method DisksClient.List.

type DisksClientRevokeAccessResponse added in v0.3.0

type DisksClientRevokeAccessResponse struct {
}

DisksClientRevokeAccessResponse contains the response from method DisksClient.RevokeAccess.

type DisksClientUpdateResponse added in v0.3.0

type DisksClientUpdateResponse struct {
	Disk
}

DisksClientUpdateResponse contains the response from method DisksClient.Update.

type Encryption

type Encryption struct {
	// ResourceId of the disk encryption set to use for enabling encryption at rest.
	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`

	// The type of key used to encrypt the data of the disk.
	Type *EncryptionType `json:"type,omitempty"`
}

Encryption at rest settings for disk or snapshot

type EncryptionImages

type EncryptionImages struct {
	// A list of encryption specifications for data disk images.
	DataDiskImages []*DataDiskImageEncryption `json:"dataDiskImages,omitempty"`

	// Contains encryption settings for an OS disk image.
	OSDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
}

EncryptionImages - Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.

func (EncryptionImages) MarshalJSON

func (e EncryptionImages) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EncryptionImages.

type EncryptionSetIdentity

type EncryptionSetIdentity struct {
	// The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption
	// Sets can be updated with Identity type None during migration of
	// subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.
	Type *DiskEncryptionSetIdentityType `json:"type,omitempty"`

	// READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id
	// header in the PUT request if the resource has a systemAssigned(implicit)
	// identity
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id
	// header in the PUT request if the resource has a systemAssigned(implicit) identity
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

EncryptionSetIdentity - The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.

type EncryptionSetProperties

type EncryptionSetProperties struct {
	// The key vault key which is currently used by this disk encryption set.
	ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`

	// The type of key used to encrypt the data of the disk.
	EncryptionType *DiskEncryptionSetType `json:"encryptionType,omitempty"`

	// Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
	RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`

	// READ-ONLY; The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will
	// not be attempted until the error on this disk encryption set is fixed.
	AutoKeyRotationError *APIError `json:"autoKeyRotationError,omitempty" azure:"ro"`

	// READ-ONLY; The time when the active key of this disk encryption set was updated.
	LastKeyRotationTimestamp *time.Time `json:"lastKeyRotationTimestamp,omitempty" azure:"ro"`

	// READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is
	// in progress. It will be empty if there is no ongoing key rotation.
	PreviousKeys []*KeyForDiskEncryptionSet `json:"previousKeys,omitempty" azure:"ro"`

	// READ-ONLY; The disk encryption set provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

func (EncryptionSetProperties) MarshalJSON

func (e EncryptionSetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EncryptionSetProperties.

func (*EncryptionSetProperties) UnmarshalJSON

func (e *EncryptionSetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSetProperties.

type EncryptionSettingsCollection

type EncryptionSettingsCollection struct {
	// REQUIRED; Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this
	// flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption.
	// If EncryptionSettings is null in the request object, the existing settings remain unchanged.
	Enabled *bool `json:"enabled,omitempty"`

	// A collection of encryption settings, one for each disk volume.
	EncryptionSettings []*EncryptionSettingsElement `json:"encryptionSettings,omitempty"`

	// Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds
	// to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk
	// Encryption.
	EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
}

EncryptionSettingsCollection - Encryption settings for disk or snapshot

func (EncryptionSettingsCollection) MarshalJSON

func (e EncryptionSettingsCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EncryptionSettingsCollection.

type EncryptionSettingsElement

type EncryptionSettingsElement struct {
	// Key Vault Secret Url and vault id of the disk encryption key
	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`

	// Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap
	// the disk encryption key.
	KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
}

EncryptionSettingsElement - Encryption settings for one disk volume.

type EncryptionType

type EncryptionType string

EncryptionType - The type of key used to encrypt the data of the disk.

const (
	// EncryptionTypeEncryptionAtRestWithCustomerKey - Disk is encrypted at rest with Customer managed key that can be changed
	// and revoked by a customer.
	EncryptionTypeEncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey"
	// EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys - Disk is encrypted at rest with 2 layers of encryption. One
	// of the keys is Customer managed and the other key is Platform managed.
	EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys EncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys"
	// EncryptionTypeEncryptionAtRestWithPlatformKey - Disk is encrypted at rest with Platform managed key. It is the default
	// encryption type. This is not a valid encryption type for disk encryption sets.
	EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey"
)

func PossibleEncryptionTypeValues

func PossibleEncryptionTypeValues() []EncryptionType

PossibleEncryptionTypeValues returns the possible values for the EncryptionType const type.

type ExecutionState

type ExecutionState string

ExecutionState - Script execution status.

const (
	ExecutionStateCanceled  ExecutionState = "Canceled"
	ExecutionStateFailed    ExecutionState = "Failed"
	ExecutionStatePending   ExecutionState = "Pending"
	ExecutionStateRunning   ExecutionState = "Running"
	ExecutionStateSucceeded ExecutionState = "Succeeded"
	ExecutionStateTimedOut  ExecutionState = "TimedOut"
	ExecutionStateUnknown   ExecutionState = "Unknown"
)

func PossibleExecutionStateValues

func PossibleExecutionStateValues() []ExecutionState

PossibleExecutionStateValues returns the possible values for the ExecutionState const type.

type ExpandTypesForGetCapacityReservationGroups

type ExpandTypesForGetCapacityReservationGroups string
const (
	ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsRef ExpandTypesForGetCapacityReservationGroups = "virtualMachineScaleSetVMs/$ref"
	ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef           ExpandTypesForGetCapacityReservationGroups = "virtualMachines/$ref"
)

func PossibleExpandTypesForGetCapacityReservationGroupsValues

func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesForGetCapacityReservationGroups

PossibleExpandTypesForGetCapacityReservationGroupsValues returns the possible values for the ExpandTypesForGetCapacityReservationGroups const type.

type ExpandTypesForGetVMScaleSets

type ExpandTypesForGetVMScaleSets string
const (
	ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = "userData"
)

func PossibleExpandTypesForGetVMScaleSetsValues

func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets

PossibleExpandTypesForGetVMScaleSetsValues returns the possible values for the ExpandTypesForGetVMScaleSets const type.

type ExtendedLocation

type ExtendedLocation struct {
	// The name of the extended location.
	Name *string `json:"name,omitempty"`

	// The type of the extended location.
	Type *ExtendedLocationTypes `json:"type,omitempty"`
}

ExtendedLocation - The complex type of the extended location.

type ExtendedLocationType

type ExtendedLocationType string

ExtendedLocationType - The type of the extended location.

const (
	ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone"
)

func PossibleExtendedLocationTypeValues

func PossibleExtendedLocationTypeValues() []ExtendedLocationType

PossibleExtendedLocationTypeValues returns the possible values for the ExtendedLocationType const type.

type ExtendedLocationTypes

type ExtendedLocationTypes string

ExtendedLocationTypes - The type of extendedLocation.

const (
	ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone"
)

func PossibleExtendedLocationTypesValues

func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes

PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type.

type Extension

type Extension struct {
	// The name of the extension.
	Name *string `json:"name,omitempty"`

	// Extension Properties.
	Properties *CloudServiceExtensionProperties `json:"properties,omitempty"`
}

Extension - Describes a cloud service Extension.

type GalleriesClient

type GalleriesClient struct {
	// contains filtered or unexported fields
}

GalleriesClient contains the methods for the Galleries group. Don't use this type directly, use NewGalleriesClient() instead.

func NewGalleriesClient

func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleriesClient, error)

NewGalleriesClient creates a new instance of GalleriesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GalleriesClient) BeginCreateOrUpdate

func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleriesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a Shared Image Gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. gallery - Parameters supplied to the create or update Shared Image Gallery operation. options - GalleriesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleriesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/CreateACommunityGallery.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		armcompute.Gallery{
			Location: to.Ptr("West US"),
			Properties: &armcompute.GalleryProperties{
				Description: to.Ptr("This is the gallery description."),
				SharingProfile: &armcompute.SharingProfile{
					CommunityGalleryInfo: map[string]interface{}{
						"eula":             "eula",
						"publicNamePrefix": "PirPublic",
						"publisherContact": "pir@microsoft.com",
						"publisherUri":     "uri",
					},
					Permissions: to.Ptr(armcompute.GallerySharingPermissionTypes("Community")),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleriesClient) BeginDelete

func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*runtime.Poller[GalleriesClientDeleteResponse], error)

BeginDelete - Delete a Shared Image Gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery to be deleted. options - GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/DeleteAGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myGalleryName",
		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)
	}
}
Output:

func (*GalleriesClient) BeginUpdate

func (client *GalleriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate, options *GalleriesClientBeginUpdateOptions) (*runtime.Poller[GalleriesClientUpdateResponse], error)

BeginUpdate - Update a Shared Image Gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. gallery - Parameters supplied to the update Shared Image Gallery operation. options - GalleriesClientBeginUpdateOptions contains the optional parameters for the GalleriesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/UpdateASimpleGallery.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		armcompute.GalleryUpdate{
			Properties: &armcompute.GalleryProperties{
				Description: to.Ptr("This is the gallery description."),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleriesClient) Get

func (client *GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientGetOptions) (GalleriesClientGetResponse, error)

Get - Retrieves information about a Shared Image Gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery. options - GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/GetACommunityGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myGalleryName",
		&armcompute.GalleriesClientGetOptions{Select: nil,
			Expand: nil,
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleriesClient) NewListByResourceGroupPager added in v0.7.0

func (client *GalleriesClient) NewListByResourceGroupPager(resourceGroupName string, options *GalleriesClientListByResourceGroupOptions) *runtime.Pager[GalleriesClientListByResourceGroupResponse]

NewListByResourceGroupPager - List galleries under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. options - GalleriesClientListByResourceGroupOptions contains the optional parameters for the GalleriesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/ListGalleriesInAResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*GalleriesClient) NewListPager added in v0.7.0

NewListPager - List galleries under a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 options - GalleriesClientListOptions contains the optional parameters for the GalleriesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/ListGalleriesInASubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GalleriesClientBeginCreateOrUpdateOptions added in v0.3.0

type GalleriesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleriesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleriesClient.BeginCreateOrUpdate method.

type GalleriesClientBeginDeleteOptions added in v0.3.0

type GalleriesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.

type GalleriesClientBeginUpdateOptions added in v0.3.0

type GalleriesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleriesClientBeginUpdateOptions contains the optional parameters for the GalleriesClient.BeginUpdate method.

type GalleriesClientCreateOrUpdateResponse added in v0.3.0

type GalleriesClientCreateOrUpdateResponse struct {
	Gallery
}

GalleriesClientCreateOrUpdateResponse contains the response from method GalleriesClient.CreateOrUpdate.

type GalleriesClientDeleteResponse added in v0.3.0

type GalleriesClientDeleteResponse struct {
}

GalleriesClientDeleteResponse contains the response from method GalleriesClient.Delete.

type GalleriesClientGetOptions added in v0.3.0

type GalleriesClientGetOptions struct {
	// The expand query option to apply on the operation.
	Expand *GalleryExpandParams
	// The select expression to apply on the operation.
	Select *SelectPermissions
}

GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.

type GalleriesClientGetResponse added in v0.3.0

type GalleriesClientGetResponse struct {
	Gallery
}

GalleriesClientGetResponse contains the response from method GalleriesClient.Get.

type GalleriesClientListByResourceGroupOptions added in v0.3.0

type GalleriesClientListByResourceGroupOptions struct {
}

GalleriesClientListByResourceGroupOptions contains the optional parameters for the GalleriesClient.ListByResourceGroup method.

type GalleriesClientListByResourceGroupResponse added in v0.3.0

type GalleriesClientListByResourceGroupResponse struct {
	GalleryList
}

GalleriesClientListByResourceGroupResponse contains the response from method GalleriesClient.ListByResourceGroup.

type GalleriesClientListOptions added in v0.3.0

type GalleriesClientListOptions struct {
}

GalleriesClientListOptions contains the optional parameters for the GalleriesClient.List method.

type GalleriesClientListResponse added in v0.3.0

type GalleriesClientListResponse struct {
	GalleryList
}

GalleriesClientListResponse contains the response from method GalleriesClient.List.

type GalleriesClientUpdateResponse added in v0.3.0

type GalleriesClientUpdateResponse struct {
	Gallery
}

GalleriesClientUpdateResponse contains the response from method GalleriesClient.Update.

type Gallery struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a Shared Image Gallery.
	Properties *GalleryProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Gallery - Specifies information about the Shared Image Gallery that you want to create or update.

func (Gallery) MarshalJSON

func (g Gallery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Gallery.

type GalleryApplication

type GalleryApplication struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a gallery Application Definition.
	Properties *GalleryApplicationProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryApplication - Specifies information about the gallery Application Definition that you want to create or update.

func (GalleryApplication) MarshalJSON

func (g GalleryApplication) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryApplication.

type GalleryApplicationList

type GalleryApplicationList struct {
	// REQUIRED; A list of Gallery Applications.
	Value []*GalleryApplication `json:"value,omitempty"`

	// The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch
	// the next page of gallery Application Definitions.
	NextLink *string `json:"nextLink,omitempty"`
}

GalleryApplicationList - The List Gallery Applications operation response.

type GalleryApplicationProperties

type GalleryApplicationProperties struct {
	// REQUIRED; This property allows you to specify the supported type of the OS that application is built for.
	// Possible values are:
	// Windows
	// Linux
	SupportedOSType *OperatingSystemTypes `json:"supportedOSType,omitempty"`

	// The description of this gallery Application Definition resource. This property is updatable.
	Description *string `json:"description,omitempty"`

	// The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This
	// property is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// The Eula agreement for the gallery Application Definition.
	Eula *string `json:"eula,omitempty"`

	// The privacy statement uri.
	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`

	// The release note uri.
	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
}

GalleryApplicationProperties - Describes the properties of a gallery Application Definition.

func (GalleryApplicationProperties) MarshalJSON

func (g GalleryApplicationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryApplicationProperties.

func (*GalleryApplicationProperties) UnmarshalJSON

func (g *GalleryApplicationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationProperties.

type GalleryApplicationUpdate

type GalleryApplicationUpdate struct {
	// Describes the properties of a gallery Application Definition.
	Properties *GalleryApplicationProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryApplicationUpdate - Specifies information about the gallery Application Definition that you want to update.

func (GalleryApplicationUpdate) MarshalJSON

func (g GalleryApplicationUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryApplicationUpdate.

type GalleryApplicationVersion

type GalleryApplicationVersion struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a gallery image version.
	Properties *GalleryApplicationVersionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryApplicationVersion - Specifies information about the gallery Application Version that you want to create or update.

func (GalleryApplicationVersion) MarshalJSON

func (g GalleryApplicationVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersion.

type GalleryApplicationVersionList

type GalleryApplicationVersionList struct {
	// REQUIRED; A list of gallery Application Versions.
	Value []*GalleryApplicationVersion `json:"value,omitempty"`

	// The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery
	// Application Versions.
	NextLink *string `json:"nextLink,omitempty"`
}

GalleryApplicationVersionList - The List Gallery Application version operation response.

type GalleryApplicationVersionProperties

type GalleryApplicationVersionProperties struct {
	// REQUIRED; The publishing profile of a gallery image version.
	PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *GalleryApplicationVersionPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; This is the replication status of the gallery image version.
	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty" azure:"ro"`
}

GalleryApplicationVersionProperties - Describes the properties of a gallery image version.

type GalleryApplicationVersionPropertiesProvisioningState

type GalleryApplicationVersionPropertiesProvisioningState string

GalleryApplicationVersionPropertiesProvisioningState - The provisioning state, which only appears in the response.

const (
	GalleryApplicationVersionPropertiesProvisioningStateCreating  GalleryApplicationVersionPropertiesProvisioningState = "Creating"
	GalleryApplicationVersionPropertiesProvisioningStateDeleting  GalleryApplicationVersionPropertiesProvisioningState = "Deleting"
	GalleryApplicationVersionPropertiesProvisioningStateFailed    GalleryApplicationVersionPropertiesProvisioningState = "Failed"
	GalleryApplicationVersionPropertiesProvisioningStateMigrating GalleryApplicationVersionPropertiesProvisioningState = "Migrating"
	GalleryApplicationVersionPropertiesProvisioningStateSucceeded GalleryApplicationVersionPropertiesProvisioningState = "Succeeded"
	GalleryApplicationVersionPropertiesProvisioningStateUpdating  GalleryApplicationVersionPropertiesProvisioningState = "Updating"
)

func PossibleGalleryApplicationVersionPropertiesProvisioningStateValues

func PossibleGalleryApplicationVersionPropertiesProvisioningStateValues() []GalleryApplicationVersionPropertiesProvisioningState

PossibleGalleryApplicationVersionPropertiesProvisioningStateValues returns the possible values for the GalleryApplicationVersionPropertiesProvisioningState const type.

type GalleryApplicationVersionPublishingProfile

type GalleryApplicationVersionPublishingProfile struct {
	// REQUIRED; The source image from which the Image Version is going to be created.
	Source *UserArtifactSource `json:"source,omitempty"`

	// Optional. Whether or not this application reports health.
	EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`

	// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property
	// is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
	ExcludeFromLatest *bool               `json:"excludeFromLatest,omitempty"`
	ManageActions     *UserArtifactManage `json:"manageActions,omitempty"`

	// The number of replicas of the Image Version to be created per region. This property would take effect for a region when
	// regionalReplicaCount is not specified. This property is updatable.
	ReplicaCount *int32 `json:"replicaCount,omitempty"`

	// Optional parameter which specifies the mode to be used for replication. This property is not updatable.
	ReplicationMode *ReplicationMode `json:"replicationMode,omitempty"`

	// Specifies the storage account type to be used to store the image. This property is not updatable.
	StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"`

	// The target extended locations where the Image Version is going to be replicated to. This property is updatable.
	TargetExtendedLocations []*GalleryTargetExtendedLocation `json:"targetExtendedLocations,omitempty"`

	// The target regions where the Image Version is going to be replicated to. This property is updatable.
	TargetRegions []*TargetRegion `json:"targetRegions,omitempty"`

	// READ-ONLY; The timestamp for when the gallery image version is published.
	PublishedDate *time.Time `json:"publishedDate,omitempty" azure:"ro"`
}

GalleryApplicationVersionPublishingProfile - The publishing profile of a gallery image version.

func (GalleryApplicationVersionPublishingProfile) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionPublishingProfile.

func (*GalleryApplicationVersionPublishingProfile) UnmarshalJSON

func (g *GalleryApplicationVersionPublishingProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionPublishingProfile.

type GalleryApplicationVersionUpdate

type GalleryApplicationVersionUpdate struct {
	// Describes the properties of a gallery image version.
	Properties *GalleryApplicationVersionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryApplicationVersionUpdate - Specifies information about the gallery Application Version that you want to update.

func (GalleryApplicationVersionUpdate) MarshalJSON

func (g GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionUpdate.

type GalleryApplicationVersionsClient

type GalleryApplicationVersionsClient struct {
	// contains filtered or unexported fields
}

GalleryApplicationVersionsClient contains the methods for the GalleryApplicationVersions group. Don't use this type directly, use NewGalleryApplicationVersionsClient() instead.

func NewGalleryApplicationVersionsClient

func NewGalleryApplicationVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryApplicationVersionsClient, error)

NewGalleryApplicationVersionsClient creates a new instance of GalleryApplicationVersionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GalleryApplicationVersionsClient) BeginCreateOrUpdate

func (client *GalleryApplicationVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion, options *GalleryApplicationVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryApplicationVersionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a gallery Application Version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition resides. galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be created. galleryApplicationVersionName - The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. galleryApplicationVersion - Parameters supplied to the create or update gallery Application Version operation. options - GalleryApplicationVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/CreateOrUpdateASimpleGalleryApplicationVersion.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		"1.0.0",
		armcompute.GalleryApplicationVersion{
			Location: to.Ptr("West US"),
			Properties: &armcompute.GalleryApplicationVersionProperties{
				PublishingProfile: &armcompute.GalleryApplicationVersionPublishingProfile{
					EndOfLifeDate:      to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-01T07:00:00Z"); return t }()),
					ReplicaCount:       to.Ptr[int32](1),
					StorageAccountType: to.Ptr(armcompute.StorageAccountTypeStandardLRS),
					TargetRegions: []*armcompute.TargetRegion{
						{
							Name:                 to.Ptr("West US"),
							RegionalReplicaCount: to.Ptr[int32](1),
							StorageAccountType:   to.Ptr(armcompute.StorageAccountTypeStandardLRS),
						}},
					ManageActions: &armcompute.UserArtifactManage{
						Install: to.Ptr("powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\""),
						Remove:  to.Ptr("del C:\\package "),
					},
					Source: &armcompute.UserArtifactSource{
						MediaLink: to.Ptr("https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"),
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryApplicationVersionsClient) BeginDelete

func (client *GalleryApplicationVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientBeginDeleteOptions) (*runtime.Poller[GalleryApplicationVersionsClientDeleteResponse], error)

BeginDelete - Delete a gallery Application Version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition resides. galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides. galleryApplicationVersionName - The name of the gallery Application Version to be deleted. options - GalleryApplicationVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/DeleteAGalleryApplicationVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		"1.0.0",
		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)
	}
}
Output:

func (*GalleryApplicationVersionsClient) BeginUpdate

func (client *GalleryApplicationVersionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate, options *GalleryApplicationVersionsClientBeginUpdateOptions) (*runtime.Poller[GalleryApplicationVersionsClientUpdateResponse], error)

BeginUpdate - Update a gallery Application Version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition resides. galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be updated. galleryApplicationVersionName - The name of the gallery Application Version to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. galleryApplicationVersion - Parameters supplied to the update gallery Application Version operation. options - GalleryApplicationVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/UpdateASimpleGalleryApplicationVersion.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		"1.0.0",
		armcompute.GalleryApplicationVersionUpdate{
			Properties: &armcompute.GalleryApplicationVersionProperties{
				PublishingProfile: &armcompute.GalleryApplicationVersionPublishingProfile{
					EndOfLifeDate:      to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-01T07:00:00Z"); return t }()),
					ReplicaCount:       to.Ptr[int32](1),
					StorageAccountType: to.Ptr(armcompute.StorageAccountTypeStandardLRS),
					TargetRegions: []*armcompute.TargetRegion{
						{
							Name:                 to.Ptr("West US"),
							RegionalReplicaCount: to.Ptr[int32](1),
							StorageAccountType:   to.Ptr(armcompute.StorageAccountTypeStandardLRS),
						}},
					ManageActions: &armcompute.UserArtifactManage{
						Install: to.Ptr("powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\""),
						Remove:  to.Ptr("del C:\\package "),
					},
					Source: &armcompute.UserArtifactSource{
						MediaLink: to.Ptr("https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"),
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryApplicationVersionsClient) Get

func (client *GalleryApplicationVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientGetOptions) (GalleryApplicationVersionsClientGetResponse, error)

Get - Retrieves information about a gallery Application Version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition resides. galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides. galleryApplicationVersionName - The name of the gallery Application Version to be retrieved. options - GalleryApplicationVersionsClientGetOptions contains the optional parameters for the GalleryApplicationVersionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/GetAGalleryApplicationVersionWithReplicationStatus.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		"1.0.0",
		&armcompute.GalleryApplicationVersionsClientGetOptions{Expand: to.Ptr(armcompute.ReplicationStatusTypesReplicationStatus)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryApplicationVersionsClient) NewListByGalleryApplicationPager added in v0.7.0

NewListByGalleryApplicationPager - List gallery Application Versions in a gallery Application Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition resides. galleryApplicationName - The name of the Shared Application Gallery Application Definition from which the Application Versions are to be listed. options - GalleryApplicationVersionsClientListByGalleryApplicationOptions contains the optional parameters for the GalleryApplicationVersionsClient.ListByGalleryApplication method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/ListGalleryApplicationVersionsInAGalleryApplication.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByGalleryApplicationPager("myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GalleryApplicationVersionsClientBeginCreateOrUpdateOptions added in v0.3.0

type GalleryApplicationVersionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryApplicationVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginCreateOrUpdate method.

type GalleryApplicationVersionsClientBeginDeleteOptions added in v0.3.0

type GalleryApplicationVersionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryApplicationVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginDelete method.

type GalleryApplicationVersionsClientBeginUpdateOptions added in v0.3.0

type GalleryApplicationVersionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryApplicationVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginUpdate method.

type GalleryApplicationVersionsClientCreateOrUpdateResponse added in v0.3.0

type GalleryApplicationVersionsClientCreateOrUpdateResponse struct {
	GalleryApplicationVersion
}

GalleryApplicationVersionsClientCreateOrUpdateResponse contains the response from method GalleryApplicationVersionsClient.CreateOrUpdate.

type GalleryApplicationVersionsClientDeleteResponse added in v0.3.0

type GalleryApplicationVersionsClientDeleteResponse struct {
}

GalleryApplicationVersionsClientDeleteResponse contains the response from method GalleryApplicationVersionsClient.Delete.

type GalleryApplicationVersionsClientGetOptions added in v0.3.0

type GalleryApplicationVersionsClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *ReplicationStatusTypes
}

GalleryApplicationVersionsClientGetOptions contains the optional parameters for the GalleryApplicationVersionsClient.Get method.

type GalleryApplicationVersionsClientGetResponse added in v0.3.0

type GalleryApplicationVersionsClientGetResponse struct {
	GalleryApplicationVersion
}

GalleryApplicationVersionsClientGetResponse contains the response from method GalleryApplicationVersionsClient.Get.

type GalleryApplicationVersionsClientListByGalleryApplicationOptions added in v0.3.0

type GalleryApplicationVersionsClientListByGalleryApplicationOptions struct {
}

GalleryApplicationVersionsClientListByGalleryApplicationOptions contains the optional parameters for the GalleryApplicationVersionsClient.ListByGalleryApplication method.

type GalleryApplicationVersionsClientListByGalleryApplicationResponse added in v0.3.0

type GalleryApplicationVersionsClientListByGalleryApplicationResponse struct {
	GalleryApplicationVersionList
}

GalleryApplicationVersionsClientListByGalleryApplicationResponse contains the response from method GalleryApplicationVersionsClient.ListByGalleryApplication.

type GalleryApplicationVersionsClientUpdateResponse added in v0.3.0

type GalleryApplicationVersionsClientUpdateResponse struct {
	GalleryApplicationVersion
}

GalleryApplicationVersionsClientUpdateResponse contains the response from method GalleryApplicationVersionsClient.Update.

type GalleryApplicationsClient

type GalleryApplicationsClient struct {
	// contains filtered or unexported fields
}

GalleryApplicationsClient contains the methods for the GalleryApplications group. Don't use this type directly, use NewGalleryApplicationsClient() instead.

func NewGalleryApplicationsClient

func NewGalleryApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryApplicationsClient, error)

NewGalleryApplicationsClient creates a new instance of GalleryApplicationsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GalleryApplicationsClient) BeginCreateOrUpdate

func (client *GalleryApplicationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication, options *GalleryApplicationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryApplicationsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a gallery Application Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition is to be created. galleryApplicationName - The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. galleryApplication - Parameters supplied to the create or update gallery Application operation. options - GalleryApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/CreateOrUpdateASimpleGalleryApplication.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		armcompute.GalleryApplication{
			Location: to.Ptr("West US"),
			Properties: &armcompute.GalleryApplicationProperties{
				Description:         to.Ptr("This is the gallery application description."),
				Eula:                to.Ptr("This is the gallery application EULA."),
				PrivacyStatementURI: to.Ptr("myPrivacyStatementUri}"),
				ReleaseNoteURI:      to.Ptr("myReleaseNoteUri"),
				SupportedOSType:     to.Ptr(armcompute.OperatingSystemTypesWindows),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryApplicationsClient) BeginDelete

func (client *GalleryApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientBeginDeleteOptions) (*runtime.Poller[GalleryApplicationsClientDeleteResponse], error)

BeginDelete - Delete a gallery Application. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition is to be deleted. galleryApplicationName - The name of the gallery Application Definition to be deleted. options - GalleryApplicationsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/DeleteAGalleryApplication.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		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)
	}
}
Output:

func (*GalleryApplicationsClient) BeginUpdate

func (client *GalleryApplicationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate, options *GalleryApplicationsClientBeginUpdateOptions) (*runtime.Poller[GalleryApplicationsClientUpdateResponse], error)

BeginUpdate - Update a gallery Application Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery in which the Application Definition is to be updated. galleryApplicationName - The name of the gallery Application Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. galleryApplication - Parameters supplied to the update gallery Application operation. options - GalleryApplicationsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/UpdateASimpleGalleryApplication.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		armcompute.GalleryApplicationUpdate{
			Properties: &armcompute.GalleryApplicationProperties{
				Description:         to.Ptr("This is the gallery application description."),
				Eula:                to.Ptr("This is the gallery application EULA."),
				PrivacyStatementURI: to.Ptr("myPrivacyStatementUri}"),
				ReleaseNoteURI:      to.Ptr("myReleaseNoteUri"),
				SupportedOSType:     to.Ptr(armcompute.OperatingSystemTypesWindows),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryApplicationsClient) Get

func (client *GalleryApplicationsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientGetOptions) (GalleryApplicationsClientGetResponse, error)

Get - Retrieves information about a gallery Application Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery from which the Application Definitions are to be retrieved. galleryApplicationName - The name of the gallery Application Definition to be retrieved. options - GalleryApplicationsClientGetOptions contains the optional parameters for the GalleryApplicationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/GetAGalleryApplication.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryApplicationName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryApplicationsClient) NewListByGalleryPager added in v0.7.0

NewListByGalleryPager - List gallery Application Definitions in a gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Application Gallery from which Application Definitions are to be listed. options - GalleryApplicationsClientListByGalleryOptions contains the optional parameters for the GalleryApplicationsClient.ListByGallery method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/ListGalleryApplicationsInAGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryApplicationsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByGalleryPager("myResourceGroup",
		"myGalleryName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GalleryApplicationsClientBeginCreateOrUpdateOptions added in v0.3.0

type GalleryApplicationsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginCreateOrUpdate method.

type GalleryApplicationsClientBeginDeleteOptions added in v0.3.0

type GalleryApplicationsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryApplicationsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationsClient.BeginDelete method.

type GalleryApplicationsClientBeginUpdateOptions added in v0.3.0

type GalleryApplicationsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryApplicationsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginUpdate method.

type GalleryApplicationsClientCreateOrUpdateResponse added in v0.3.0

type GalleryApplicationsClientCreateOrUpdateResponse struct {
	GalleryApplication
}

GalleryApplicationsClientCreateOrUpdateResponse contains the response from method GalleryApplicationsClient.CreateOrUpdate.

type GalleryApplicationsClientDeleteResponse added in v0.3.0

type GalleryApplicationsClientDeleteResponse struct {
}

GalleryApplicationsClientDeleteResponse contains the response from method GalleryApplicationsClient.Delete.

type GalleryApplicationsClientGetOptions added in v0.3.0

type GalleryApplicationsClientGetOptions struct {
}

GalleryApplicationsClientGetOptions contains the optional parameters for the GalleryApplicationsClient.Get method.

type GalleryApplicationsClientGetResponse added in v0.3.0

type GalleryApplicationsClientGetResponse struct {
	GalleryApplication
}

GalleryApplicationsClientGetResponse contains the response from method GalleryApplicationsClient.Get.

type GalleryApplicationsClientListByGalleryOptions added in v0.3.0

type GalleryApplicationsClientListByGalleryOptions struct {
}

GalleryApplicationsClientListByGalleryOptions contains the optional parameters for the GalleryApplicationsClient.ListByGallery method.

type GalleryApplicationsClientListByGalleryResponse added in v0.3.0

type GalleryApplicationsClientListByGalleryResponse struct {
	GalleryApplicationList
}

GalleryApplicationsClientListByGalleryResponse contains the response from method GalleryApplicationsClient.ListByGallery.

type GalleryApplicationsClientUpdateResponse added in v0.3.0

type GalleryApplicationsClientUpdateResponse struct {
	GalleryApplication
}

GalleryApplicationsClientUpdateResponse contains the response from method GalleryApplicationsClient.Update.

type GalleryArtifactPublishingProfileBase

type GalleryArtifactPublishingProfileBase struct {
	// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property
	// is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`

	// The number of replicas of the Image Version to be created per region. This property would take effect for a region when
	// regionalReplicaCount is not specified. This property is updatable.
	ReplicaCount *int32 `json:"replicaCount,omitempty"`

	// Optional parameter which specifies the mode to be used for replication. This property is not updatable.
	ReplicationMode *ReplicationMode `json:"replicationMode,omitempty"`

	// Specifies the storage account type to be used to store the image. This property is not updatable.
	StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"`

	// The target extended locations where the Image Version is going to be replicated to. This property is updatable.
	TargetExtendedLocations []*GalleryTargetExtendedLocation `json:"targetExtendedLocations,omitempty"`

	// The target regions where the Image Version is going to be replicated to. This property is updatable.
	TargetRegions []*TargetRegion `json:"targetRegions,omitempty"`

	// READ-ONLY; The timestamp for when the gallery image version is published.
	PublishedDate *time.Time `json:"publishedDate,omitempty" azure:"ro"`
}

GalleryArtifactPublishingProfileBase - Describes the basic gallery artifact publishing profile.

func (GalleryArtifactPublishingProfileBase) MarshalJSON

func (g GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryArtifactPublishingProfileBase.

func (*GalleryArtifactPublishingProfileBase) UnmarshalJSON

func (g *GalleryArtifactPublishingProfileBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactPublishingProfileBase.

type GalleryArtifactSource

type GalleryArtifactSource struct {
	// REQUIRED; The managed artifact.
	ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
}

GalleryArtifactSource - The source image from which the Image Version is going to be created.

type GalleryArtifactVersionSource

type GalleryArtifactVersionSource struct {
	// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
	ID *string `json:"id,omitempty"`

	// The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
	URI *string `json:"uri,omitempty"`
}

GalleryArtifactVersionSource - The gallery artifact version source.

type GalleryDataDiskImage

type GalleryDataDiskImage struct {
	// REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within
	// the Virtual Machine and therefore must be unique for each data disk attached to the
	// Virtual Machine.
	Lun *int32 `json:"lun,omitempty"`

	// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
	HostCaching *HostCaching `json:"hostCaching,omitempty"`

	// The gallery artifact version source.
	Source *GalleryArtifactVersionSource `json:"source,omitempty"`

	// READ-ONLY; This property indicates the size of the VHD to be created.
	SizeInGB *int32 `json:"sizeInGB,omitempty" azure:"ro"`
}

GalleryDataDiskImage - This is the data disk image.

type GalleryDiskImage

type GalleryDiskImage struct {
	// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
	HostCaching *HostCaching `json:"hostCaching,omitempty"`

	// The gallery artifact version source.
	Source *GalleryArtifactVersionSource `json:"source,omitempty"`

	// READ-ONLY; This property indicates the size of the VHD to be created.
	SizeInGB *int32 `json:"sizeInGB,omitempty" azure:"ro"`
}

GalleryDiskImage - This is the disk image base class.

type GalleryExpandParams added in v0.4.0

type GalleryExpandParams string
const (
	GalleryExpandParamsSharingProfileGroups GalleryExpandParams = "SharingProfile/Groups"
)

func PossibleGalleryExpandParamsValues added in v0.4.0

func PossibleGalleryExpandParamsValues() []GalleryExpandParams

PossibleGalleryExpandParamsValues returns the possible values for the GalleryExpandParams const type.

type GalleryExtendedLocation added in v0.4.0

type GalleryExtendedLocation struct {
	Name *string `json:"name,omitempty"`

	// It is type of the extended location.
	Type *GalleryExtendedLocationType `json:"type,omitempty"`
}

GalleryExtendedLocation - The name of the extended location.

type GalleryExtendedLocationType added in v0.4.0

type GalleryExtendedLocationType string

GalleryExtendedLocationType - It is type of the extended location.

const (
	GalleryExtendedLocationTypeEdgeZone GalleryExtendedLocationType = "EdgeZone"
	GalleryExtendedLocationTypeUnknown  GalleryExtendedLocationType = "Unknown"
)

func PossibleGalleryExtendedLocationTypeValues added in v0.4.0

func PossibleGalleryExtendedLocationTypeValues() []GalleryExtendedLocationType

PossibleGalleryExtendedLocationTypeValues returns the possible values for the GalleryExtendedLocationType const type.

type GalleryIdentifier

type GalleryIdentifier struct {
	// READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
	UniqueName *string `json:"uniqueName,omitempty" azure:"ro"`
}

GalleryIdentifier - Describes the gallery unique name.

type GalleryImage

type GalleryImage struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a gallery image definition.
	Properties *GalleryImageProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryImage - Specifies information about the gallery image definition that you want to create or update.

func (GalleryImage) MarshalJSON

func (g GalleryImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImage.

type GalleryImageFeature

type GalleryImageFeature struct {
	// The name of the gallery image feature.
	Name *string `json:"name,omitempty"`

	// The value of the gallery image feature.
	Value *string `json:"value,omitempty"`
}

GalleryImageFeature - A feature for gallery image.

type GalleryImageIdentifier

type GalleryImageIdentifier struct {
	// REQUIRED; The name of the gallery image definition offer.
	Offer *string `json:"offer,omitempty"`

	// REQUIRED; The name of the gallery image definition publisher.
	Publisher *string `json:"publisher,omitempty"`

	// REQUIRED; The name of the gallery image definition SKU.
	SKU *string `json:"sku,omitempty"`
}

GalleryImageIdentifier - This is the gallery image definition identifier.

type GalleryImageList

type GalleryImageList struct {
	// REQUIRED; A list of Shared Image Gallery images.
	Value []*GalleryImage `json:"value,omitempty"`

	// The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the
	// next page of gallery image definitions.
	NextLink *string `json:"nextLink,omitempty"`
}

GalleryImageList - The List Gallery Images operation response.

type GalleryImageProperties

type GalleryImageProperties struct {
	// REQUIRED; This is the gallery image definition identifier.
	Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`

	// REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized'
	// or 'Specialized'.
	OSState *OperatingSystemStateTypes `json:"osState,omitempty"`

	// REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
	// managed image.
	// Possible values are:
	// Windows
	// Linux
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// The architecture of the image. Applicable to OS disks only.
	Architecture *Architecture `json:"architecture,omitempty"`

	// The description of this gallery image definition resource. This property is updatable.
	Description *string `json:"description,omitempty"`

	// Describes the disallowed disk types.
	Disallowed *Disallowed `json:"disallowed,omitempty"`

	// The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
	// is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// The Eula agreement for the gallery image definition.
	Eula *string `json:"eula,omitempty"`

	// A list of gallery image features.
	Features []*GalleryImageFeature `json:"features,omitempty"`

	// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// The privacy statement uri.
	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`

	// Describes the gallery image definition purchase plan. This is used by marketplace images.
	PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`

	// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
	Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`

	// The release note uri.
	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *GalleryImagePropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

GalleryImageProperties - Describes the properties of a gallery image definition.

func (GalleryImageProperties) MarshalJSON

func (g GalleryImageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImageProperties.

func (*GalleryImageProperties) UnmarshalJSON

func (g *GalleryImageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageProperties.

type GalleryImagePropertiesProvisioningState

type GalleryImagePropertiesProvisioningState string

GalleryImagePropertiesProvisioningState - The provisioning state, which only appears in the response.

const (
	GalleryImagePropertiesProvisioningStateCreating  GalleryImagePropertiesProvisioningState = "Creating"
	GalleryImagePropertiesProvisioningStateDeleting  GalleryImagePropertiesProvisioningState = "Deleting"
	GalleryImagePropertiesProvisioningStateFailed    GalleryImagePropertiesProvisioningState = "Failed"
	GalleryImagePropertiesProvisioningStateMigrating GalleryImagePropertiesProvisioningState = "Migrating"
	GalleryImagePropertiesProvisioningStateSucceeded GalleryImagePropertiesProvisioningState = "Succeeded"
	GalleryImagePropertiesProvisioningStateUpdating  GalleryImagePropertiesProvisioningState = "Updating"
)

func PossibleGalleryImagePropertiesProvisioningStateValues

func PossibleGalleryImagePropertiesProvisioningStateValues() []GalleryImagePropertiesProvisioningState

PossibleGalleryImagePropertiesProvisioningStateValues returns the possible values for the GalleryImagePropertiesProvisioningState const type.

type GalleryImageUpdate

type GalleryImageUpdate struct {
	// Describes the properties of a gallery image definition.
	Properties *GalleryImageProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryImageUpdate - Specifies information about the gallery image definition that you want to update.

func (GalleryImageUpdate) MarshalJSON

func (g GalleryImageUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImageUpdate.

type GalleryImageVersion

type GalleryImageVersion struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a gallery image version.
	Properties *GalleryImageVersionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryImageVersion - Specifies information about the gallery image version that you want to create or update.

func (GalleryImageVersion) MarshalJSON

func (g GalleryImageVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImageVersion.

type GalleryImageVersionList

type GalleryImageVersionList struct {
	// REQUIRED; A list of gallery image versions.
	Value []*GalleryImageVersion `json:"value,omitempty"`

	// The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image
	// versions.
	NextLink *string `json:"nextLink,omitempty"`
}

GalleryImageVersionList - The List Gallery Image version operation response.

type GalleryImageVersionProperties

type GalleryImageVersionProperties struct {
	// REQUIRED; This is the storage profile of a Gallery Image Version.
	StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`

	// The publishing profile of a gallery image Version.
	PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *GalleryImageVersionPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; This is the replication status of the gallery image version.
	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty" azure:"ro"`
}

GalleryImageVersionProperties - Describes the properties of a gallery image version.

type GalleryImageVersionPropertiesProvisioningState

type GalleryImageVersionPropertiesProvisioningState string

GalleryImageVersionPropertiesProvisioningState - The provisioning state, which only appears in the response.

const (
	GalleryImageVersionPropertiesProvisioningStateCreating  GalleryImageVersionPropertiesProvisioningState = "Creating"
	GalleryImageVersionPropertiesProvisioningStateDeleting  GalleryImageVersionPropertiesProvisioningState = "Deleting"
	GalleryImageVersionPropertiesProvisioningStateFailed    GalleryImageVersionPropertiesProvisioningState = "Failed"
	GalleryImageVersionPropertiesProvisioningStateMigrating GalleryImageVersionPropertiesProvisioningState = "Migrating"
	GalleryImageVersionPropertiesProvisioningStateSucceeded GalleryImageVersionPropertiesProvisioningState = "Succeeded"
	GalleryImageVersionPropertiesProvisioningStateUpdating  GalleryImageVersionPropertiesProvisioningState = "Updating"
)

func PossibleGalleryImageVersionPropertiesProvisioningStateValues

func PossibleGalleryImageVersionPropertiesProvisioningStateValues() []GalleryImageVersionPropertiesProvisioningState

PossibleGalleryImageVersionPropertiesProvisioningStateValues returns the possible values for the GalleryImageVersionPropertiesProvisioningState const type.

type GalleryImageVersionPublishingProfile

type GalleryImageVersionPublishingProfile struct {
	// The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property
	// is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`

	// The number of replicas of the Image Version to be created per region. This property would take effect for a region when
	// regionalReplicaCount is not specified. This property is updatable.
	ReplicaCount *int32 `json:"replicaCount,omitempty"`

	// Optional parameter which specifies the mode to be used for replication. This property is not updatable.
	ReplicationMode *ReplicationMode `json:"replicationMode,omitempty"`

	// Specifies the storage account type to be used to store the image. This property is not updatable.
	StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"`

	// The target extended locations where the Image Version is going to be replicated to. This property is updatable.
	TargetExtendedLocations []*GalleryTargetExtendedLocation `json:"targetExtendedLocations,omitempty"`

	// The target regions where the Image Version is going to be replicated to. This property is updatable.
	TargetRegions []*TargetRegion `json:"targetRegions,omitempty"`

	// READ-ONLY; The timestamp for when the gallery image version is published.
	PublishedDate *time.Time `json:"publishedDate,omitempty" azure:"ro"`
}

GalleryImageVersionPublishingProfile - The publishing profile of a gallery image Version.

func (GalleryImageVersionPublishingProfile) MarshalJSON added in v0.3.0

func (g GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionPublishingProfile.

func (*GalleryImageVersionPublishingProfile) UnmarshalJSON added in v0.3.0

func (g *GalleryImageVersionPublishingProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionPublishingProfile.

type GalleryImageVersionStorageProfile

type GalleryImageVersionStorageProfile struct {
	// A list of data disk images.
	DataDiskImages []*GalleryDataDiskImage `json:"dataDiskImages,omitempty"`

	// This is the OS disk image.
	OSDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"`

	// The gallery artifact version source.
	Source *GalleryArtifactVersionSource `json:"source,omitempty"`
}

GalleryImageVersionStorageProfile - This is the storage profile of a Gallery Image Version.

func (GalleryImageVersionStorageProfile) MarshalJSON

func (g GalleryImageVersionStorageProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionStorageProfile.

type GalleryImageVersionUpdate

type GalleryImageVersionUpdate struct {
	// Describes the properties of a gallery image version.
	Properties *GalleryImageVersionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryImageVersionUpdate - Specifies information about the gallery image version that you want to update.

func (GalleryImageVersionUpdate) MarshalJSON

func (g GalleryImageVersionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionUpdate.

type GalleryImageVersionsClient

type GalleryImageVersionsClient struct {
	// contains filtered or unexported fields
}

GalleryImageVersionsClient contains the methods for the GalleryImageVersions group. Don't use this type directly, use NewGalleryImageVersionsClient() instead.

func NewGalleryImageVersionsClient

func NewGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImageVersionsClient, error)

NewGalleryImageVersionsClient creates a new instance of GalleryImageVersionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GalleryImageVersionsClient) BeginCreateOrUpdate

func (client *GalleryImageVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion, options *GalleryImageVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryImageVersionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a gallery image version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition resides. galleryImageName - The name of the gallery image definition in which the Image Version is to be created. galleryImageVersionName - The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. galleryImageVersion - Parameters supplied to the create or update gallery image version operation. options - GalleryImageVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/CreateOrUpdateASimpleGalleryImageVersionWithVMAsSource.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		"1.0.0",
		armcompute.GalleryImageVersion{
			Location: to.Ptr("West US"),
			Properties: &armcompute.GalleryImageVersionProperties{
				PublishingProfile: &armcompute.GalleryImageVersionPublishingProfile{
					TargetRegions: []*armcompute.TargetRegion{
						{
							Name: to.Ptr("West US"),
							Encryption: &armcompute.EncryptionImages{
								DataDiskImages: []*armcompute.DataDiskImageEncryption{
									{
										DiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet"),
										Lun:                 to.Ptr[int32](0),
									},
									{
										DiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"),
										Lun:                 to.Ptr[int32](1),
									}},
								OSDiskImage: &armcompute.OSDiskImageEncryption{
									DiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"),
								},
							},
							RegionalReplicaCount: to.Ptr[int32](1),
						},
						{
							Name: to.Ptr("East US"),
							Encryption: &armcompute.EncryptionImages{
								DataDiskImages: []*armcompute.DataDiskImageEncryption{
									{
										DiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet"),
										Lun:                 to.Ptr[int32](0),
									},
									{
										DiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"),
										Lun:                 to.Ptr[int32](1),
									}},
								OSDiskImage: &armcompute.OSDiskImageEncryption{
									DiskEncryptionSetID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"),
								},
							},
							RegionalReplicaCount: to.Ptr[int32](2),
							StorageAccountType:   to.Ptr(armcompute.StorageAccountTypeStandardZRS),
						}},
				},
				StorageProfile: &armcompute.GalleryImageVersionStorageProfile{
					Source: &armcompute.GalleryArtifactVersionSource{
						ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}"),
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryImageVersionsClient) BeginDelete

func (client *GalleryImageVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientBeginDeleteOptions) (*runtime.Poller[GalleryImageVersionsClientDeleteResponse], error)

BeginDelete - Delete a gallery image version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition resides. galleryImageName - The name of the gallery image definition in which the Image Version resides. galleryImageVersionName - The name of the gallery image version to be deleted. options - GalleryImageVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryImageVersionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/DeleteAGalleryImageVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		"1.0.0",
		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)
	}
}
Output:

func (*GalleryImageVersionsClient) BeginUpdate

func (client *GalleryImageVersionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate, options *GalleryImageVersionsClientBeginUpdateOptions) (*runtime.Poller[GalleryImageVersionsClientUpdateResponse], error)

BeginUpdate - Update a gallery image version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition resides. galleryImageName - The name of the gallery image definition in which the Image Version is to be updated. galleryImageVersionName - The name of the gallery image version to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. galleryImageVersion - Parameters supplied to the update gallery image version operation. options - GalleryImageVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/UpdateASimpleGalleryImageVersion.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		"1.0.0",
		armcompute.GalleryImageVersionUpdate{
			Properties: &armcompute.GalleryImageVersionProperties{
				PublishingProfile: &armcompute.GalleryImageVersionPublishingProfile{
					TargetRegions: []*armcompute.TargetRegion{
						{
							Name:                 to.Ptr("West US"),
							RegionalReplicaCount: to.Ptr[int32](1),
						},
						{
							Name:                 to.Ptr("East US"),
							RegionalReplicaCount: to.Ptr[int32](2),
							StorageAccountType:   to.Ptr(armcompute.StorageAccountTypeStandardZRS),
						}},
				},
				StorageProfile: &armcompute.GalleryImageVersionStorageProfile{
					Source: &armcompute.GalleryArtifactVersionSource{
						ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}"),
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryImageVersionsClient) Get

func (client *GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientGetOptions) (GalleryImageVersionsClientGetResponse, error)

Get - Retrieves information about a gallery image version. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition resides. galleryImageName - The name of the gallery image definition in which the Image Version resides. galleryImageVersionName - The name of the gallery image version to be retrieved. options - GalleryImageVersionsClientGetOptions contains the optional parameters for the GalleryImageVersionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/GetAGalleryImageVersionWithReplicationStatus.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		"1.0.0",
		&armcompute.GalleryImageVersionsClientGetOptions{Expand: to.Ptr(armcompute.ReplicationStatusTypesReplicationStatus)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryImageVersionsClient) NewListByGalleryImagePager added in v0.7.0

func (client *GalleryImageVersionsClient) NewListByGalleryImagePager(resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImageVersionsClientListByGalleryImageOptions) *runtime.Pager[GalleryImageVersionsClientListByGalleryImageResponse]

NewListByGalleryImagePager - List gallery image versions in a gallery image definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition resides. galleryImageName - The name of the Shared Image Gallery Image Definition from which the Image Versions are to be listed. options - GalleryImageVersionsClientListByGalleryImageOptions contains the optional parameters for the GalleryImageVersionsClient.ListByGalleryImage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/ListGalleryImageVersionsInAGalleryImage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByGalleryImagePager("myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GalleryImageVersionsClientBeginCreateOrUpdateOptions added in v0.3.0

type GalleryImageVersionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryImageVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginCreateOrUpdate method.

type GalleryImageVersionsClientBeginDeleteOptions added in v0.3.0

type GalleryImageVersionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryImageVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryImageVersionsClient.BeginDelete method.

type GalleryImageVersionsClientBeginUpdateOptions added in v0.3.0

type GalleryImageVersionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryImageVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginUpdate method.

type GalleryImageVersionsClientCreateOrUpdateResponse added in v0.3.0

type GalleryImageVersionsClientCreateOrUpdateResponse struct {
	GalleryImageVersion
}

GalleryImageVersionsClientCreateOrUpdateResponse contains the response from method GalleryImageVersionsClient.CreateOrUpdate.

type GalleryImageVersionsClientDeleteResponse added in v0.3.0

type GalleryImageVersionsClientDeleteResponse struct {
}

GalleryImageVersionsClientDeleteResponse contains the response from method GalleryImageVersionsClient.Delete.

type GalleryImageVersionsClientGetOptions added in v0.3.0

type GalleryImageVersionsClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *ReplicationStatusTypes
}

GalleryImageVersionsClientGetOptions contains the optional parameters for the GalleryImageVersionsClient.Get method.

type GalleryImageVersionsClientGetResponse added in v0.3.0

type GalleryImageVersionsClientGetResponse struct {
	GalleryImageVersion
}

GalleryImageVersionsClientGetResponse contains the response from method GalleryImageVersionsClient.Get.

type GalleryImageVersionsClientListByGalleryImageOptions added in v0.3.0

type GalleryImageVersionsClientListByGalleryImageOptions struct {
}

GalleryImageVersionsClientListByGalleryImageOptions contains the optional parameters for the GalleryImageVersionsClient.ListByGalleryImage method.

type GalleryImageVersionsClientListByGalleryImageResponse added in v0.3.0

type GalleryImageVersionsClientListByGalleryImageResponse struct {
	GalleryImageVersionList
}

GalleryImageVersionsClientListByGalleryImageResponse contains the response from method GalleryImageVersionsClient.ListByGalleryImage.

type GalleryImageVersionsClientUpdateResponse added in v0.3.0

type GalleryImageVersionsClientUpdateResponse struct {
	GalleryImageVersion
}

GalleryImageVersionsClientUpdateResponse contains the response from method GalleryImageVersionsClient.Update.

type GalleryImagesClient

type GalleryImagesClient struct {
	// contains filtered or unexported fields
}

GalleryImagesClient contains the methods for the GalleryImages group. Don't use this type directly, use NewGalleryImagesClient() instead.

func NewGalleryImagesClient

func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImagesClient, error)

NewGalleryImagesClient creates a new instance of GalleryImagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GalleryImagesClient) BeginCreateOrUpdate

func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryImagesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a gallery image definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition is to be created. galleryImageName - The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. galleryImage - Parameters supplied to the create or update gallery image operation. options - GalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/CreateOrUpdateASimpleGalleryImage.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		armcompute.GalleryImage{
			Location: to.Ptr("West US"),
			Properties: &armcompute.GalleryImageProperties{
				HyperVGeneration: to.Ptr(armcompute.HyperVGenerationV1),
				Identifier: &armcompute.GalleryImageIdentifier{
					Offer:     to.Ptr("myOfferName"),
					Publisher: to.Ptr("myPublisherName"),
					SKU:       to.Ptr("mySkuName"),
				},
				OSState: to.Ptr(armcompute.OperatingSystemStateTypesGeneralized),
				OSType:  to.Ptr(armcompute.OperatingSystemTypesWindows),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryImagesClient) BeginDelete

func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*runtime.Poller[GalleryImagesClientDeleteResponse], error)

BeginDelete - Delete a gallery image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition is to be deleted. galleryImageName - The name of the gallery image definition to be deleted. options - GalleryImagesClientBeginDeleteOptions contains the optional parameters for the GalleryImagesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/DeleteAGalleryImage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		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)
	}
}
Output:

func (*GalleryImagesClient) BeginUpdate

func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate, options *GalleryImagesClientBeginUpdateOptions) (*runtime.Poller[GalleryImagesClientUpdateResponse], error)

BeginUpdate - Update a gallery image definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery in which the Image Definition is to be updated. galleryImageName - The name of the gallery image definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. galleryImage - Parameters supplied to the update gallery image operation. options - GalleryImagesClientBeginUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/UpdateASimpleGalleryImage.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		armcompute.GalleryImageUpdate{
			Properties: &armcompute.GalleryImageProperties{
				HyperVGeneration: to.Ptr(armcompute.HyperVGenerationV1),
				Identifier: &armcompute.GalleryImageIdentifier{
					Offer:     to.Ptr("myOfferName"),
					Publisher: to.Ptr("myPublisherName"),
					SKU:       to.Ptr("mySkuName"),
				},
				OSState: to.Ptr(armcompute.OperatingSystemStateTypesGeneralized),
				OSType:  to.Ptr(armcompute.OperatingSystemTypesWindows),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryImagesClient) Get

func (client *GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientGetOptions) (GalleryImagesClientGetResponse, error)

Get - Retrieves information about a gallery image definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. galleryImageName - The name of the gallery image definition to be retrieved. options - GalleryImagesClientGetOptions contains the optional parameters for the GalleryImagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/GetAGalleryImage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myGalleryName",
		"myGalleryImageName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GalleryImagesClient) NewListByGalleryPager added in v0.7.0

func (client *GalleryImagesClient) NewListByGalleryPager(resourceGroupName string, galleryName string, options *GalleryImagesClientListByGalleryOptions) *runtime.Pager[GalleryImagesClientListByGalleryResponse]

NewListByGalleryPager - List gallery image definitions in a gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery from which Image Definitions are to be listed. options - GalleryImagesClientListByGalleryOptions contains the optional parameters for the GalleryImagesClient.ListByGallery method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/ListGalleryImagesInAGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByGalleryPager("myResourceGroup",
		"myGalleryName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GalleryImagesClientBeginCreateOrUpdateOptions added in v0.3.0

type GalleryImagesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginCreateOrUpdate method.

type GalleryImagesClientBeginDeleteOptions added in v0.3.0

type GalleryImagesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryImagesClientBeginDeleteOptions contains the optional parameters for the GalleryImagesClient.BeginDelete method.

type GalleryImagesClientBeginUpdateOptions added in v0.3.0

type GalleryImagesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GalleryImagesClientBeginUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginUpdate method.

type GalleryImagesClientCreateOrUpdateResponse added in v0.3.0

type GalleryImagesClientCreateOrUpdateResponse struct {
	GalleryImage
}

GalleryImagesClientCreateOrUpdateResponse contains the response from method GalleryImagesClient.CreateOrUpdate.

type GalleryImagesClientDeleteResponse added in v0.3.0

type GalleryImagesClientDeleteResponse struct {
}

GalleryImagesClientDeleteResponse contains the response from method GalleryImagesClient.Delete.

type GalleryImagesClientGetOptions added in v0.3.0

type GalleryImagesClientGetOptions struct {
}

GalleryImagesClientGetOptions contains the optional parameters for the GalleryImagesClient.Get method.

type GalleryImagesClientGetResponse added in v0.3.0

type GalleryImagesClientGetResponse struct {
	GalleryImage
}

GalleryImagesClientGetResponse contains the response from method GalleryImagesClient.Get.

type GalleryImagesClientListByGalleryOptions added in v0.3.0

type GalleryImagesClientListByGalleryOptions struct {
}

GalleryImagesClientListByGalleryOptions contains the optional parameters for the GalleryImagesClient.ListByGallery method.

type GalleryImagesClientListByGalleryResponse added in v0.3.0

type GalleryImagesClientListByGalleryResponse struct {
	GalleryImageList
}

GalleryImagesClientListByGalleryResponse contains the response from method GalleryImagesClient.ListByGallery.

type GalleryImagesClientUpdateResponse added in v0.3.0

type GalleryImagesClientUpdateResponse struct {
	GalleryImage
}

GalleryImagesClientUpdateResponse contains the response from method GalleryImagesClient.Update.

type GalleryList

type GalleryList struct {
	// REQUIRED; A list of galleries.
	Value []*Gallery `json:"value,omitempty"`

	// The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
	NextLink *string `json:"nextLink,omitempty"`
}

GalleryList - The List Galleries operation response.

type GalleryOSDiskImage

type GalleryOSDiskImage struct {
	// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
	HostCaching *HostCaching `json:"hostCaching,omitempty"`

	// The gallery artifact version source.
	Source *GalleryArtifactVersionSource `json:"source,omitempty"`

	// READ-ONLY; This property indicates the size of the VHD to be created.
	SizeInGB *int32 `json:"sizeInGB,omitempty" azure:"ro"`
}

GalleryOSDiskImage - This is the OS disk image.

type GalleryProperties

type GalleryProperties struct {
	// The description of this Shared Image Gallery resource. This property is updatable.
	Description *string `json:"description,omitempty"`

	// Describes the gallery unique name.
	Identifier *GalleryIdentifier `json:"identifier,omitempty"`

	// Profile for gallery sharing to subscription or tenant
	SharingProfile *SharingProfile `json:"sharingProfile,omitempty"`

	// Contains information about the soft deletion policy of the gallery.
	SoftDeletePolicy *SoftDeletePolicy `json:"softDeletePolicy,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *GalleryPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Sharing status of current gallery.
	SharingStatus *SharingStatus `json:"sharingStatus,omitempty" azure:"ro"`
}

GalleryProperties - Describes the properties of a Shared Image Gallery.

type GalleryPropertiesProvisioningState

type GalleryPropertiesProvisioningState string

GalleryPropertiesProvisioningState - The provisioning state, which only appears in the response.

const (
	GalleryPropertiesProvisioningStateCreating  GalleryPropertiesProvisioningState = "Creating"
	GalleryPropertiesProvisioningStateDeleting  GalleryPropertiesProvisioningState = "Deleting"
	GalleryPropertiesProvisioningStateFailed    GalleryPropertiesProvisioningState = "Failed"
	GalleryPropertiesProvisioningStateMigrating GalleryPropertiesProvisioningState = "Migrating"
	GalleryPropertiesProvisioningStateSucceeded GalleryPropertiesProvisioningState = "Succeeded"
	GalleryPropertiesProvisioningStateUpdating  GalleryPropertiesProvisioningState = "Updating"
)

func PossibleGalleryPropertiesProvisioningStateValues

func PossibleGalleryPropertiesProvisioningStateValues() []GalleryPropertiesProvisioningState

PossibleGalleryPropertiesProvisioningStateValues returns the possible values for the GalleryPropertiesProvisioningState const type.

type GallerySharingPermissionTypes

type GallerySharingPermissionTypes string

GallerySharingPermissionTypes - This property allows you to specify the permission of sharing gallery. Possible values are: Private Groups

const (
	GallerySharingPermissionTypesGroups  GallerySharingPermissionTypes = "Groups"
	GallerySharingPermissionTypesPrivate GallerySharingPermissionTypes = "Private"
)

func PossibleGallerySharingPermissionTypesValues

func PossibleGallerySharingPermissionTypesValues() []GallerySharingPermissionTypes

PossibleGallerySharingPermissionTypesValues returns the possible values for the GallerySharingPermissionTypes const type.

type GallerySharingProfileClient

type GallerySharingProfileClient struct {
	// contains filtered or unexported fields
}

GallerySharingProfileClient contains the methods for the GallerySharingProfile group. Don't use this type directly, use NewGallerySharingProfileClient() instead.

func NewGallerySharingProfileClient

func NewGallerySharingProfileClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GallerySharingProfileClient, error)

NewGallerySharingProfileClient creates a new instance of GallerySharingProfileClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GallerySharingProfileClient) BeginUpdate

BeginUpdate - Update sharing profile of a gallery. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01 resourceGroupName - The name of the resource group. galleryName - The name of the Shared Image Gallery. sharingUpdate - Parameters supplied to the update gallery sharing profile. options - GallerySharingProfileClientBeginUpdateOptions contains the optional parameters for the GallerySharingProfileClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/examples/gallery/AddToSharingProfileInAGallery.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewGallerySharingProfileClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myGalleryName",
		armcompute.SharingUpdate{
			Groups: []*armcompute.SharingProfileGroup{
				{
					Type: to.Ptr(armcompute.SharingProfileGroupTypesSubscriptions),
					IDs: []*string{
						to.Ptr("34a4ab42-0d72-47d9-bd1a-aed207386dac"),
						to.Ptr("380fd389-260b-41aa-bad9-0a83108c370b")},
				},
				{
					Type: to.Ptr(armcompute.SharingProfileGroupTypesAADTenants),
					IDs: []*string{
						to.Ptr("c24c76aa-8897-4027-9b03-8f7928b54ff6")},
				}},
			OperationType: to.Ptr(armcompute.SharingUpdateOperationTypesAdd),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

type GallerySharingProfileClientBeginUpdateOptions added in v0.3.0

type GallerySharingProfileClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GallerySharingProfileClientBeginUpdateOptions contains the optional parameters for the GallerySharingProfileClient.BeginUpdate method.

type GallerySharingProfileClientUpdateResponse added in v0.3.0

type GallerySharingProfileClientUpdateResponse struct {
	SharingUpdate
}

GallerySharingProfileClientUpdateResponse contains the response from method GallerySharingProfileClient.Update.

type GalleryTargetExtendedLocation added in v0.4.0

type GalleryTargetExtendedLocation struct {
	// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
	Encryption *EncryptionImages `json:"encryption,omitempty"`

	// The name of the extended location.
	ExtendedLocation *GalleryExtendedLocation `json:"extendedLocation,omitempty"`

	// The number of replicas of the Image Version to be created per extended location. This property is updatable.
	ExtendedLocationReplicaCount *int32 `json:"extendedLocationReplicaCount,omitempty"`

	// The name of the region.
	Name *string `json:"name,omitempty"`

	// Specifies the storage account type to be used to store the image. This property is not updatable.
	StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"`
}

type GalleryUpdate

type GalleryUpdate struct {
	// Describes the properties of a Shared Image Gallery.
	Properties *GalleryProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GalleryUpdate - Specifies information about the Shared Image Gallery that you want to update.

func (GalleryUpdate) MarshalJSON

func (g GalleryUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryUpdate.

type GrantAccessData

type GrantAccessData struct {
	// REQUIRED
	Access *AccessLevel `json:"access,omitempty"`

	// REQUIRED; Time duration in seconds until the SAS access expires.
	DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`

	// Set this flag to true to get additional SAS for VM guest state
	GetSecureVMGuestStateSAS *bool `json:"getSecureVMGuestStateSAS,omitempty"`
}

GrantAccessData - Data used for requesting a SAS.

type HardwareProfile

type HardwareProfile struct {
	// Specifies the size of the virtual machine.
	// The enum data type is currently deprecated and will be removed by December 23rd 2023.
	// Recommended way to get the list of available sizes is using these APIs:
	// List all available virtual machine sizes in an availability set [https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes]
	// List all available virtual machine sizes in a region [https://docs.microsoft.com/rest/api/compute/resourceskus/list]
	// List all available virtual machine sizes for resizing [https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes].
	// For more information about virtual machine sizes, see Sizes for
	// virtual machines [https://docs.microsoft.com/azure/virtual-machines/sizes].
	// The available VM sizes depend on region and availability set.
	VMSize *VirtualMachineSizeTypes `json:"vmSize,omitempty"`

	// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01.
	// This feature is still in preview mode and is not supported for VirtualMachineScaleSet.
	// Please follow the instructions in VM Customization [https://aka.ms/vmcustomization] for more details.
	VMSizeProperties *VMSizeProperties `json:"vmSizeProperties,omitempty"`
}

HardwareProfile - Specifies the hardware settings for the virtual machine.

type HostCaching

type HostCaching string

HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'

const (
	HostCachingNone      HostCaching = "None"
	HostCachingReadOnly  HostCaching = "ReadOnly"
	HostCachingReadWrite HostCaching = "ReadWrite"
)

func PossibleHostCachingValues

func PossibleHostCachingValues() []HostCaching

PossibleHostCachingValues returns the possible values for the HostCaching const type.

type HyperVGeneration

type HyperVGeneration string

HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only.

const (
	HyperVGenerationV1 HyperVGeneration = "V1"
	HyperVGenerationV2 HyperVGeneration = "V2"
)

func PossibleHyperVGenerationValues

func PossibleHyperVGenerationValues() []HyperVGeneration

PossibleHyperVGenerationValues returns the possible values for the HyperVGeneration const type.

type HyperVGenerationType

type HyperVGenerationType string

HyperVGenerationType - Specifies the HyperVGeneration Type associated with a resource

const (
	HyperVGenerationTypeV1 HyperVGenerationType = "V1"
	HyperVGenerationTypeV2 HyperVGenerationType = "V2"
)

func PossibleHyperVGenerationTypeValues

func PossibleHyperVGenerationTypeValues() []HyperVGenerationType

PossibleHyperVGenerationTypeValues returns the possible values for the HyperVGenerationType const type.

type HyperVGenerationTypes

type HyperVGenerationTypes string

HyperVGenerationTypes - Specifies the HyperVGeneration Type

const (
	HyperVGenerationTypesV1 HyperVGenerationTypes = "V1"
	HyperVGenerationTypesV2 HyperVGenerationTypes = "V2"
)

func PossibleHyperVGenerationTypesValues

func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes

PossibleHyperVGenerationTypesValues returns the possible values for the HyperVGenerationTypes const type.

type IPVersion

type IPVersion string

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'.

const (
	IPVersionIPv4 IPVersion = "IPv4"
	IPVersionIPv6 IPVersion = "IPv6"
)

func PossibleIPVersionValues

func PossibleIPVersionValues() []IPVersion

PossibleIPVersionValues returns the possible values for the IPVersion const type.

type IPVersions

type IPVersions string

IPVersions - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.

const (
	IPVersionsIPv4 IPVersions = "IPv4"
	IPVersionsIPv6 IPVersions = "IPv6"
)

func PossibleIPVersionsValues

func PossibleIPVersionsValues() []IPVersions

PossibleIPVersionsValues returns the possible values for the IPVersions const type.

type Image

type Image struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The extended location of the Image.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// Describes the properties of an Image.
	Properties *ImageProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

func (Image) MarshalJSON

func (i Image) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Image.

type ImageDataDisk

type ImageDataDisk struct {
	// REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
	// therefore must be unique for each data disk attached to a VM.
	Lun *int32 `json:"lun,omitempty"`

	// The Virtual Hard Disk.
	BlobURI *string `json:"blobUri,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies the customer managed disk encryption set resource id for the managed image disk.
	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`

	// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual
	// machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// The managedDisk.
	ManagedDisk *SubResource `json:"managedDisk,omitempty"`

	// The snapshot.
	Snapshot *SubResource `json:"snapshot,omitempty"`

	// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
	// be used with OS Disk.
	StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"`
}

ImageDataDisk - Describes a data disk.

type ImageDisk

type ImageDisk struct {
	// The Virtual Hard Disk.
	BlobURI *string `json:"blobUri,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies the customer managed disk encryption set resource id for the managed image disk.
	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`

	// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual
	// machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// The managedDisk.
	ManagedDisk *SubResource `json:"managedDisk,omitempty"`

	// The snapshot.
	Snapshot *SubResource `json:"snapshot,omitempty"`

	// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
	// be used with OS Disk.
	StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"`
}

ImageDisk - Describes a image disk.

type ImageDiskReference

type ImageDiskReference struct {
	// REQUIRED; A relative uri containing either a Platform Image Repository or user image reference.
	ID *string `json:"id,omitempty"`

	// If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image
	// to use. For OS disks, this field is null.
	Lun *int32 `json:"lun,omitempty"`
}

ImageDiskReference - The source image used for creating the disk.

type ImageListResult

type ImageListResult struct {
	// REQUIRED; The list of Images.
	Value []*Image `json:"value,omitempty"`

	// The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
	NextLink *string `json:"nextLink,omitempty"`
}

ImageListResult - The List Image operation response.

type ImageOSDisk

type ImageOSDisk struct {
	// REQUIRED; The OS State.
	OSState *OperatingSystemStateTypes `json:"osState,omitempty"`

	// REQUIRED; This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom
	// image.
	// Possible values are:
	// Windows
	// Linux
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// The Virtual Hard Disk.
	BlobURI *string `json:"blobUri,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies the customer managed disk encryption set resource id for the managed image disk.
	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`

	// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual
	// machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// The managedDisk.
	ManagedDisk *SubResource `json:"managedDisk,omitempty"`

	// The snapshot.
	Snapshot *SubResource `json:"snapshot,omitempty"`

	// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
	// be used with OS Disk.
	StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"`
}

ImageOSDisk - Describes an Operating System disk.

type ImageProperties

type ImageProperties struct {
	// Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image
	// source is a blob, then we need the user to specify the value, if the source is
	// managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the
	// source managed resource.
	HyperVGeneration *HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`

	// The source virtual machine from which Image is created.
	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`

	// Specifies the storage settings for the virtual machine disks.
	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`

	// READ-ONLY; The provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

ImageProperties - Describes the properties of an Image.

type ImagePurchasePlan

type ImagePurchasePlan struct {
	// The plan ID.
	Name *string `json:"name,omitempty"`

	// The product ID.
	Product *string `json:"product,omitempty"`

	// The publisher ID.
	Publisher *string `json:"publisher,omitempty"`
}

ImagePurchasePlan - Describes the gallery image definition purchase plan. This is used by marketplace images.

type ImageReference

type ImageReference struct {
	// Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET
	// call.
	CommunityGalleryImageID *string `json:"communityGalleryImageId,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`

	// Specifies the offer of the platform image or marketplace image used to create the virtual machine.
	Offer *string `json:"offer,omitempty"`

	// The image publisher.
	Publisher *string `json:"publisher,omitempty"`

	// The image SKU.
	SKU *string `json:"sku,omitempty"`

	// Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
	SharedGalleryImageID *string `json:"sharedGalleryImageId,omitempty"`

	// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats
	// are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers.
	// Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image
	// will not automatically update after deploy time even if a new version becomes
	// available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for
	// deployment, to use 'latest' version of gallery image, just set
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'
	// in the 'id' field without version input.
	Version *string `json:"version,omitempty"`

	// READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual
	// machine. This readonly field differs from 'version', only if the value specified in
	// 'version' field is 'latest'.
	ExactVersion *string `json:"exactVersion,omitempty" azure:"ro"`
}

ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.

type ImageStorageProfile

type ImageStorageProfile struct {
	// Specifies the parameters that are used to add a data disk to a virtual machine.
	// For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
	DataDisks []*ImageDataDisk `json:"dataDisks,omitempty"`

	// Specifies information about the operating system disk used by the virtual machine.
	// For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
	OSDisk *ImageOSDisk `json:"osDisk,omitempty"`

	// Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions
	// that provide Zone Redundant Storage (ZRS).
	ZoneResilient *bool `json:"zoneResilient,omitempty"`
}

ImageStorageProfile - Describes a storage profile.

func (ImageStorageProfile) MarshalJSON

func (i ImageStorageProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImageStorageProfile.

type ImageUpdate

type ImageUpdate struct {
	// Describes the properties of an Image.
	Properties *ImageProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

ImageUpdate - The source user image virtual hard disk. Only tags may be updated.

func (ImageUpdate) MarshalJSON

func (i ImageUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImageUpdate.

type ImagesClient

type ImagesClient struct {
	// contains filtered or unexported fields
}

ImagesClient contains the methods for the Images group. Don't use this type directly, use NewImagesClient() instead.

func NewImagesClient

func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImagesClient, error)

NewImagesClient creates a new instance of ImagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ImagesClient) BeginCreateOrUpdate

func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image, options *ImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ImagesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update an image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. imageName - The name of the image. parameters - Parameters supplied to the Create Image operation. options - ImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the ImagesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/imageExamples/Image_CreateFromABlobWithDiskEncryptionSet.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myImage",
		armcompute.Image{
			Location: to.Ptr("West US"),
			Properties: &armcompute.ImageProperties{
				StorageProfile: &armcompute.ImageStorageProfile{
					OSDisk: &armcompute.ImageOSDisk{
						BlobURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
						DiskEncryptionSet: &armcompute.DiskEncryptionSetParameters{
							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
						},
						OSState: to.Ptr(armcompute.OperatingSystemStateTypesGeneralized),
						OSType:  to.Ptr(armcompute.OperatingSystemTypesLinux),
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ImagesClient) BeginDelete

func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientBeginDeleteOptions) (*runtime.Poller[ImagesClientDeleteResponse], error)

BeginDelete - Deletes an Image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. imageName - The name of the image. options - ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/imageExamples/Images_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*ImagesClient) BeginUpdate

func (client *ImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate, options *ImagesClientBeginUpdateOptions) (*runtime.Poller[ImagesClientUpdateResponse], error)

BeginUpdate - Update an image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. imageName - The name of the image. parameters - Parameters supplied to the Update Image operation. options - ImagesClientBeginUpdateOptions contains the optional parameters for the ImagesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/imageExamples/Image_Update.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myImage",
		armcompute.ImageUpdate{
			Tags: map[string]*string{
				"department": to.Ptr("HR"),
			},
			Properties: &armcompute.ImageProperties{
				HyperVGeneration: to.Ptr(armcompute.HyperVGenerationTypesV1),
				SourceVirtualMachine: &armcompute.SubResource{
					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ImagesClient) Get

func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientGetOptions) (ImagesClientGetResponse, error)

Get - Gets an image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. imageName - The name of the image. options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/imageExamples/Image_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myImage",
		&armcompute.ImagesClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ImagesClient) NewListByResourceGroupPager added in v0.7.0

func (client *ImagesClient) NewListByResourceGroupPager(resourceGroupName string, options *ImagesClientListByResourceGroupOptions) *runtime.Pager[ImagesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Gets the list of images under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - ImagesClientListByResourceGroupOptions contains the optional parameters for the ImagesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/imageExamples/Image_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ImagesClient) NewListPager added in v0.7.0

NewListPager - Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - ImagesClientListOptions contains the optional parameters for the ImagesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/imageExamples/Image_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ImagesClientBeginCreateOrUpdateOptions added in v0.3.0

type ImagesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the ImagesClient.BeginCreateOrUpdate method.

type ImagesClientBeginDeleteOptions added in v0.3.0

type ImagesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.

type ImagesClientBeginUpdateOptions added in v0.3.0

type ImagesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ImagesClientBeginUpdateOptions contains the optional parameters for the ImagesClient.BeginUpdate method.

type ImagesClientCreateOrUpdateResponse added in v0.3.0

type ImagesClientCreateOrUpdateResponse struct {
	Image
}

ImagesClientCreateOrUpdateResponse contains the response from method ImagesClient.CreateOrUpdate.

type ImagesClientDeleteResponse added in v0.3.0

type ImagesClientDeleteResponse struct {
}

ImagesClientDeleteResponse contains the response from method ImagesClient.Delete.

type ImagesClientGetOptions added in v0.3.0

type ImagesClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.

type ImagesClientGetResponse added in v0.3.0

type ImagesClientGetResponse struct {
	Image
}

ImagesClientGetResponse contains the response from method ImagesClient.Get.

type ImagesClientListByResourceGroupOptions added in v0.3.0

type ImagesClientListByResourceGroupOptions struct {
}

ImagesClientListByResourceGroupOptions contains the optional parameters for the ImagesClient.ListByResourceGroup method.

type ImagesClientListByResourceGroupResponse added in v0.3.0

type ImagesClientListByResourceGroupResponse struct {
	ImageListResult
}

ImagesClientListByResourceGroupResponse contains the response from method ImagesClient.ListByResourceGroup.

type ImagesClientListOptions added in v0.3.0

type ImagesClientListOptions struct {
}

ImagesClientListOptions contains the optional parameters for the ImagesClient.List method.

type ImagesClientListResponse added in v0.3.0

type ImagesClientListResponse struct {
	ImageListResult
}

ImagesClientListResponse contains the response from method ImagesClient.List.

type ImagesClientUpdateResponse added in v0.3.0

type ImagesClientUpdateResponse struct {
	Image
}

ImagesClientUpdateResponse contains the response from method ImagesClient.Update.

type InnerError

type InnerError struct {
	// The internal error message or exception dump.
	Errordetail *string `json:"errordetail,omitempty"`

	// The exception type.
	Exceptiontype *string `json:"exceptiontype,omitempty"`
}

InnerError - Inner error details.

type InstanceSKU

type InstanceSKU struct {
	// READ-ONLY; The sku name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The tier of the cloud service role instance.
	Tier *string `json:"tier,omitempty" azure:"ro"`
}

type InstanceViewStatus

type InstanceViewStatus struct {
	// The status code.
	Code *string `json:"code,omitempty"`

	// The short localizable label for the status.
	DisplayStatus *string `json:"displayStatus,omitempty"`

	// The level code.
	Level *StatusLevelTypes `json:"level,omitempty"`

	// The detailed status message, including for alerts and error messages.
	Message *string `json:"message,omitempty"`

	// The time of the status.
	Time *time.Time `json:"time,omitempty"`
}

InstanceViewStatus - Instance view status.

func (InstanceViewStatus) MarshalJSON

func (i InstanceViewStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InstanceViewStatus.

func (*InstanceViewStatus) UnmarshalJSON

func (i *InstanceViewStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InstanceViewStatus.

type InstanceViewStatusesSummary

type InstanceViewStatusesSummary struct {
	// READ-ONLY
	StatusesSummary []*StatusCodeCount `json:"statusesSummary,omitempty" azure:"ro"`
}

InstanceViewStatusesSummary - Instance view statuses.

type InstanceViewTypes

type InstanceViewTypes string
const (
	InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
	InstanceViewTypesUserData     InstanceViewTypes = "userData"
)

func PossibleInstanceViewTypesValues

func PossibleInstanceViewTypesValues() []InstanceViewTypes

PossibleInstanceViewTypesValues returns the possible values for the InstanceViewTypes const type.

type IntervalInMins

type IntervalInMins string

IntervalInMins - Interval value in minutes used to create LogAnalytics call rate logs.

const (
	IntervalInMinsThreeMins  IntervalInMins = "ThreeMins"
	IntervalInMinsFiveMins   IntervalInMins = "FiveMins"
	IntervalInMinsThirtyMins IntervalInMins = "ThirtyMins"
	IntervalInMinsSixtyMins  IntervalInMins = "SixtyMins"
)

func PossibleIntervalInMinsValues

func PossibleIntervalInMinsValues() []IntervalInMins

PossibleIntervalInMinsValues returns the possible values for the IntervalInMins const type.

type KeyForDiskEncryptionSet

type KeyForDiskEncryptionSet struct {
	// REQUIRED; Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled
	// value.
	KeyURL *string `json:"keyUrl,omitempty"`

	// Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault
	// subscription is not the same as the Disk Encryption Set subscription.
	SourceVault *SourceVault `json:"sourceVault,omitempty"`
}

KeyForDiskEncryptionSet - Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots

type KeyVaultAndKeyReference

type KeyVaultAndKeyReference struct {
	// REQUIRED; Url pointing to a key or secret in KeyVault
	KeyURL *string `json:"keyUrl,omitempty"`

	// REQUIRED; Resource id of the KeyVault containing the key or secret
	SourceVault *SourceVault `json:"sourceVault,omitempty"`
}

KeyVaultAndKeyReference - Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey

type KeyVaultAndSecretReference

type KeyVaultAndSecretReference struct {
	// REQUIRED; Url pointing to a key or secret in KeyVault
	SecretURL *string `json:"secretUrl,omitempty"`

	// REQUIRED; Resource id of the KeyVault containing the key or secret
	SourceVault *SourceVault `json:"sourceVault,omitempty"`
}

KeyVaultAndSecretReference - Key Vault Secret Url and vault id of the encryption key

type KeyVaultKeyReference

type KeyVaultKeyReference struct {
	// REQUIRED; The URL referencing a key encryption key in Key Vault.
	KeyURL *string `json:"keyUrl,omitempty"`

	// REQUIRED; The relative URL of the Key Vault containing the key.
	SourceVault *SubResource `json:"sourceVault,omitempty"`
}

KeyVaultKeyReference - Describes a reference to Key Vault Key

type KeyVaultSecretReference

type KeyVaultSecretReference struct {
	// REQUIRED; The URL referencing a secret in a Key Vault.
	SecretURL *string `json:"secretUrl,omitempty"`

	// REQUIRED; The relative URL of the Key Vault containing the secret.
	SourceVault *SubResource `json:"sourceVault,omitempty"`
}

KeyVaultSecretReference - Describes a reference to Key Vault Secret

type LastPatchInstallationSummary

type LastPatchInstallationSummary struct {
	// READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
	Error *APIError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The count of patches that failed installation.
	FailedPatchCount *int32 `json:"failedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
	// logs.
	InstallationActivityID *string `json:"installationActivityId,omitempty" azure:"ro"`

	// READ-ONLY; The count of patches that successfully installed.
	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the operation began.
	LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"`

	// READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty" azure:"ro"`

	// READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or
	// inclusion list entry.
	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the operation began.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
	// At that point it will become "Unknown", "Failed", "Succeeded", or
	// "CompletedWithWarnings."
	Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"`
}

LastPatchInstallationSummary - Describes the properties of the last installed patch summary.

func (LastPatchInstallationSummary) MarshalJSON

func (l LastPatchInstallationSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LastPatchInstallationSummary.

func (*LastPatchInstallationSummary) UnmarshalJSON

func (l *LastPatchInstallationSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LastPatchInstallationSummary.

type LinuxConfiguration

type LinuxConfiguration struct {
	// Specifies whether password authentication should be disabled.
	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`

	// [Preview Feature] Specifies settings related to VM Guest Patching on Linux.
	PatchSettings *LinuxPatchSettings `json:"patchSettings,omitempty"`

	// Indicates whether virtual machine agent should be provisioned on the virtual machine.
	// When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM
	// Agent is installed on the VM so that extensions can be added to the VM later.
	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`

	// Specifies the ssh key configuration for a Linux OS.
	SSH *SSHConfiguration `json:"ssh,omitempty"`
}

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].

type LinuxParameters

type LinuxParameters struct {
	// The update classifications to select when installing patches for Linux.
	ClassificationsToInclude []*VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"`

	// This is used as a maintenance run identifier for Auto VM Guest Patching in Linux.
	MaintenanceRunID *string `json:"maintenanceRunId,omitempty"`

	// packages to exclude in the patch operation. Format: packageName_packageVersion
	PackageNameMasksToExclude []*string `json:"packageNameMasksToExclude,omitempty"`

	// packages to include in the patch operation. Format: packageName_packageVersion
	PackageNameMasksToInclude []*string `json:"packageNameMasksToInclude,omitempty"`
}

LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API

func (LinuxParameters) MarshalJSON

func (l LinuxParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinuxParameters.

type LinuxPatchAssessmentMode

type LinuxPatchAssessmentMode string

LinuxPatchAssessmentMode - Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine. Possible values are: ImageDefault - You control the timing of patch assessments on a virtual machine. AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.

const (
	LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform"
	LinuxPatchAssessmentModeImageDefault        LinuxPatchAssessmentMode = "ImageDefault"
)

func PossibleLinuxPatchAssessmentModeValues

func PossibleLinuxPatchAssessmentModeValues() []LinuxPatchAssessmentMode

PossibleLinuxPatchAssessmentModeValues returns the possible values for the LinuxPatchAssessmentMode const type.

type LinuxPatchSettings

type LinuxPatchSettings struct {
	// Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.
	// Possible values are:
	// ImageDefault - You control the timing of patch assessments on a virtual machine.
	// AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.
	AssessmentMode *LinuxPatchAssessmentMode `json:"assessmentMode,omitempty"`

	// Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.
	AutomaticByPlatformSettings *LinuxVMGuestPatchAutomaticByPlatformSettings `json:"automaticByPlatformSettings,omitempty"`

	// Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale
	// set with OrchestrationMode as Flexible.
	// Possible values are:
	// ImageDefault - The virtual machine's default patching configuration is used.
	// AutomaticByPlatform - The virtual machine will be automatically updated by the platform. The property provisionVMAgent
	// must be true
	PatchMode *LinuxVMGuestPatchMode `json:"patchMode,omitempty"`
}

LinuxPatchSettings - Specifies settings related to VM Guest Patching on Linux.

type LinuxVMGuestPatchAutomaticByPlatformRebootSetting added in v1.0.0

type LinuxVMGuestPatchAutomaticByPlatformRebootSetting string

LinuxVMGuestPatchAutomaticByPlatformRebootSetting - Specifies the reboot setting for all AutomaticByPlatform patch installation operations.

const (
	LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways     LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Always"
	LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired"
	LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever      LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Never"
	LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown    LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown"
)

func PossibleLinuxVMGuestPatchAutomaticByPlatformRebootSettingValues added in v1.0.0

func PossibleLinuxVMGuestPatchAutomaticByPlatformRebootSettingValues() []LinuxVMGuestPatchAutomaticByPlatformRebootSetting

PossibleLinuxVMGuestPatchAutomaticByPlatformRebootSettingValues returns the possible values for the LinuxVMGuestPatchAutomaticByPlatformRebootSetting const type.

type LinuxVMGuestPatchAutomaticByPlatformSettings added in v1.0.0

type LinuxVMGuestPatchAutomaticByPlatformSettings struct {
	// Specifies the reboot setting for all AutomaticByPlatform patch installation operations.
	RebootSetting *LinuxVMGuestPatchAutomaticByPlatformRebootSetting `json:"rebootSetting,omitempty"`
}

LinuxVMGuestPatchAutomaticByPlatformSettings - Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.

type LinuxVMGuestPatchMode

type LinuxVMGuestPatchMode string

LinuxVMGuestPatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible. Possible values are: ImageDefault - The virtual machine's default patching configuration is used. AutomaticByPlatform - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true

const (
	LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform"
	LinuxVMGuestPatchModeImageDefault        LinuxVMGuestPatchMode = "ImageDefault"
)

func PossibleLinuxVMGuestPatchModeValues

func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode

PossibleLinuxVMGuestPatchModeValues returns the possible values for the LinuxVMGuestPatchMode const type.

type ListUsagesResult

type ListUsagesResult struct {
	// REQUIRED; The list of compute resource usages.
	Value []*Usage `json:"value,omitempty"`

	// The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page
	// of compute resource usage information.
	NextLink *string `json:"nextLink,omitempty"`
}

ListUsagesResult - The List Usages operation response.

type LoadBalancerConfiguration

type LoadBalancerConfiguration struct {
	// REQUIRED; The name of the Load balancer
	Name *string `json:"name,omitempty"`

	// REQUIRED; Properties of the load balancer configuration.
	Properties *LoadBalancerConfigurationProperties `json:"properties,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`
}

LoadBalancerConfiguration - Describes the load balancer configuration.

type LoadBalancerConfigurationProperties

type LoadBalancerConfigurationProperties struct {
	// REQUIRED; Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each
	// load balancer configuration must have exactly one frontend IP configuration.
	FrontendIPConfigurations []*LoadBalancerFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
}

func (LoadBalancerConfigurationProperties) MarshalJSON

func (l LoadBalancerConfigurationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LoadBalancerConfigurationProperties.

type LoadBalancerFrontendIPConfiguration

type LoadBalancerFrontendIPConfiguration struct {
	// REQUIRED; The name of the resource that is unique within the set of frontend IP configurations used by the load balancer.
	// This name can be used to access the resource.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Properties of load balancer frontend ip configuration.
	Properties *LoadBalancerFrontendIPConfigurationProperties `json:"properties,omitempty"`
}

type LoadBalancerFrontendIPConfigurationProperties

type LoadBalancerFrontendIPConfigurationProperties struct {
	// The virtual network private IP address of the IP configuration.
	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`

	// The reference to the public ip address resource.
	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`

	// The reference to the virtual network subnet resource.
	Subnet *SubResource `json:"subnet,omitempty"`
}

LoadBalancerFrontendIPConfigurationProperties - Describes a cloud service IP Configuration

type LogAnalyticsClient

type LogAnalyticsClient struct {
	// contains filtered or unexported fields
}

LogAnalyticsClient contains the methods for the LogAnalytics group. Don't use this type directly, use NewLogAnalyticsClient() instead.

func NewLogAnalyticsClient

func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogAnalyticsClient, error)

NewLogAnalyticsClient creates a new instance of LogAnalyticsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LogAnalyticsClient) BeginExportRequestRateByInterval

BeginExportRequestRateByInterval - Export logs that show Api requests made by this subscription in the given time window to show throttling activities. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location upon which virtual-machine-sizes is queried. parameters - Parameters supplied to the LogAnalytics getRequestRateByInterval Api. options - LogAnalyticsClientBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalyticsClient.BeginExportRequestRateByInterval method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/logAnalyticExamples/LogAnalytics_RequestRateByInterval.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewLogAnalyticsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginExportRequestRateByInterval(ctx,
		"westus",
		armcompute.RequestRateByIntervalInput{
			BlobContainerSasURI: to.Ptr("https://somesasuri"),
			FromTime:            to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-21T01:54:06.862601Z"); return t }()),
			GroupByResourceName: to.Ptr(true),
			ToTime:              to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-23T01:54:06.862601Z"); return t }()),
			IntervalLength:      to.Ptr(armcompute.IntervalInMinsFiveMins),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LogAnalyticsClient) BeginExportThrottledRequests

BeginExportThrottledRequests - Export logs that show total throttled Api requests for this subscription in the given time window. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location upon which virtual-machine-sizes is queried. parameters - Parameters supplied to the LogAnalytics getThrottledRequests Api. options - LogAnalyticsClientBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalyticsClient.BeginExportThrottledRequests method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/logAnalyticExamples/LogAnalytics_ThrottledRequests.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewLogAnalyticsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginExportThrottledRequests(ctx,
		"westus",
		armcompute.ThrottledRequestsInput{
			BlobContainerSasURI:        to.Ptr("https://somesasuri"),
			FromTime:                   to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-21T01:54:06.862601Z"); return t }()),
			GroupByClientApplicationID: to.Ptr(false),
			GroupByOperationName:       to.Ptr(true),
			GroupByResourceName:        to.Ptr(false),
			GroupByUserAgent:           to.Ptr(false),
			ToTime:                     to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-23T01:54:06.862601Z"); return t }()),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

type LogAnalyticsClientBeginExportRequestRateByIntervalOptions added in v0.3.0

type LogAnalyticsClientBeginExportRequestRateByIntervalOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LogAnalyticsClientBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalyticsClient.BeginExportRequestRateByInterval method.

type LogAnalyticsClientBeginExportThrottledRequestsOptions added in v0.3.0

type LogAnalyticsClientBeginExportThrottledRequestsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LogAnalyticsClientBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalyticsClient.BeginExportThrottledRequests method.

type LogAnalyticsClientExportRequestRateByIntervalResponse added in v0.3.0

type LogAnalyticsClientExportRequestRateByIntervalResponse struct {
	LogAnalyticsOperationResult
}

LogAnalyticsClientExportRequestRateByIntervalResponse contains the response from method LogAnalyticsClient.ExportRequestRateByInterval.

type LogAnalyticsClientExportThrottledRequestsResponse added in v0.3.0

type LogAnalyticsClientExportThrottledRequestsResponse struct {
	LogAnalyticsOperationResult
}

LogAnalyticsClientExportThrottledRequestsResponse contains the response from method LogAnalyticsClient.ExportThrottledRequests.

type LogAnalyticsInputBase

type LogAnalyticsInputBase struct {
	// REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`

	// REQUIRED; From time of the query
	FromTime *time.Time `json:"fromTime,omitempty"`

	// REQUIRED; To time of the query
	ToTime *time.Time `json:"toTime,omitempty"`

	// Group query result by Client Application ID.
	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`

	// Group query result by Operation Name.
	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`

	// Group query result by Resource Name.
	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`

	// Group query result by Throttle Policy applied.
	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`

	// Group query result by User Agent.
	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
}

LogAnalyticsInputBase - Api input base class for LogAnalytics Api.

func (LogAnalyticsInputBase) MarshalJSON

func (l LogAnalyticsInputBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogAnalyticsInputBase.

func (*LogAnalyticsInputBase) UnmarshalJSON

func (l *LogAnalyticsInputBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsInputBase.

type LogAnalyticsOperationResult

type LogAnalyticsOperationResult struct {
	// READ-ONLY; LogAnalyticsOutput
	Properties *LogAnalyticsOutput `json:"properties,omitempty" azure:"ro"`
}

LogAnalyticsOperationResult - LogAnalytics operation status response

type LogAnalyticsOutput

type LogAnalyticsOutput struct {
	// READ-ONLY; Output file Uri path to blob container.
	Output *string `json:"output,omitempty" azure:"ro"`
}

LogAnalyticsOutput - LogAnalytics output properties

type MaintenanceOperationResultCodeTypes

type MaintenanceOperationResultCodeTypes string

MaintenanceOperationResultCodeTypes - The Last Maintenance Operation Result Code.

const (
	MaintenanceOperationResultCodeTypesNone                 MaintenanceOperationResultCodeTypes = "None"
	MaintenanceOperationResultCodeTypesRetryLater           MaintenanceOperationResultCodeTypes = "RetryLater"
	MaintenanceOperationResultCodeTypesMaintenanceAborted   MaintenanceOperationResultCodeTypes = "MaintenanceAborted"
	MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted"
)

func PossibleMaintenanceOperationResultCodeTypesValues

func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes

PossibleMaintenanceOperationResultCodeTypesValues returns the possible values for the MaintenanceOperationResultCodeTypes const type.

type MaintenanceRedeployStatus

type MaintenanceRedeployStatus struct {
	// True, if customer is allowed to perform Maintenance.
	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`

	// Message returned for the last Maintenance Operation.
	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`

	// The Last Maintenance Operation Result Code.
	LastOperationResultCode *MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`

	// End Time for the Maintenance Window.
	MaintenanceWindowEndTime *time.Time `json:"maintenanceWindowEndTime,omitempty"`

	// Start Time for the Maintenance Window.
	MaintenanceWindowStartTime *time.Time `json:"maintenanceWindowStartTime,omitempty"`

	// End Time for the Pre Maintenance Window.
	PreMaintenanceWindowEndTime *time.Time `json:"preMaintenanceWindowEndTime,omitempty"`

	// Start Time for the Pre Maintenance Window.
	PreMaintenanceWindowStartTime *time.Time `json:"preMaintenanceWindowStartTime,omitempty"`
}

MaintenanceRedeployStatus - Maintenance Operation Status.

func (MaintenanceRedeployStatus) MarshalJSON

func (m MaintenanceRedeployStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MaintenanceRedeployStatus.

func (*MaintenanceRedeployStatus) UnmarshalJSON

func (m *MaintenanceRedeployStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceRedeployStatus.

type ManagedArtifact

type ManagedArtifact struct {
	// REQUIRED; The managed artifact id.
	ID *string `json:"id,omitempty"`
}

ManagedArtifact - The managed artifact.

type ManagedDiskParameters

type ManagedDiskParameters struct {
	// Specifies the customer managed disk encryption set resource id for the managed disk.
	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`

	// Specifies the security profile for the managed disk.
	SecurityProfile *VMDiskSecurityProfile `json:"securityProfile,omitempty"`

	// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
	// be used with OS Disk.
	StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"`
}

ManagedDiskParameters - The parameters of a managed disk.

type NetworkAPIVersion

type NetworkAPIVersion string

NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations

const (
	NetworkAPIVersionTwoThousandTwenty1101 NetworkAPIVersion = "2020-11-01"
)

func PossibleNetworkAPIVersionValues

func PossibleNetworkAPIVersionValues() []NetworkAPIVersion

PossibleNetworkAPIVersionValues returns the possible values for the NetworkAPIVersion const type.

type NetworkAccessPolicy

type NetworkAccessPolicy string

NetworkAccessPolicy - Policy for accessing the disk via network.

const (
	// NetworkAccessPolicyAllowAll - The disk can be exported or uploaded to from any network.
	NetworkAccessPolicyAllowAll NetworkAccessPolicy = "AllowAll"
	// NetworkAccessPolicyAllowPrivate - The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.
	NetworkAccessPolicyAllowPrivate NetworkAccessPolicy = "AllowPrivate"
	// NetworkAccessPolicyDenyAll - The disk cannot be exported.
	NetworkAccessPolicyDenyAll NetworkAccessPolicy = "DenyAll"
)

func PossibleNetworkAccessPolicyValues

func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy

PossibleNetworkAccessPolicyValues returns the possible values for the NetworkAccessPolicy const type.

type NetworkInterfaceReference

type NetworkInterfaceReference struct {
	// Resource Id
	ID *string `json:"id,omitempty"`

	// Describes a network interface reference properties.
	Properties *NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
}

NetworkInterfaceReference - Describes a network interface reference.

type NetworkInterfaceReferenceProperties

type NetworkInterfaceReferenceProperties struct {
	// Specify what happens to the network interface when the VM is deleted
	DeleteOption *DeleteOptions `json:"deleteOption,omitempty"`

	// Specifies the primary network interface in case the virtual machine has more than 1 network interface.
	Primary *bool `json:"primary,omitempty"`
}

NetworkInterfaceReferenceProperties - Describes a network interface reference properties.

type NetworkProfile

type NetworkProfile struct {
	// specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations
	NetworkAPIVersion *NetworkAPIVersion `json:"networkApiVersion,omitempty"`

	// Specifies the networking configurations that will be used to create the virtual machine networking resources.
	NetworkInterfaceConfigurations []*VirtualMachineNetworkInterfaceConfiguration `json:"networkInterfaceConfigurations,omitempty"`

	// Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
	NetworkInterfaces []*NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
}

NetworkProfile - Specifies the network interfaces or the networking configuration of the virtual machine.

func (NetworkProfile) MarshalJSON

func (n NetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

type OSDisk

type OSDisk struct {
	// REQUIRED; Specifies how the virtual machine should be created.
	// Possible values are:
	// Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.
	// FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform
	// image, you also use the imageReference element described above. If you are
	// using a marketplace image, you also use the plan element previously described.
	CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage.
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies whether OS Disk should be deleted or detached upon VM deletion.
	// Possible values:
	// Delete If this value is used, the OS disk is deleted when VM is deleted.
	// Detach If this value is used, the os disk is retained after VM is deleted.
	// The default value is set to detach. For an ephemeral OS Disk, the default value is set to Delete. User cannot change the
	// delete option for ephemeral OS Disk.
	DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"`

	// Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`

	// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
	// virtual machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Specifies the encryption settings for the OS Disk.
	// Minimum api-version: 2015-06-15
	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`

	// The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
	// If SourceImage is provided, the destination virtual hard drive must not
	// exist.
	Image *VirtualHardDisk `json:"image,omitempty"`

	// The managed disk parameters.
	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`

	// The disk name.
	Name *string `json:"name,omitempty"`

	// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or
	// a specialized VHD.
	// Possible values are:
	// Windows
	// Linux
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// The virtual hard disk.
	Vhd *VirtualHardDisk `json:"vhd,omitempty"`

	// Specifies whether writeAccelerator should be enabled or disabled on the disk.
	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
}

OSDisk - Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].

type OSDiskImage

type OSDiskImage struct {
	// REQUIRED; The operating system of the osDiskImage.
	OperatingSystem *OperatingSystemTypes `json:"operatingSystem,omitempty"`
}

OSDiskImage - Contains the os disk image information.

type OSDiskImageEncryption

type OSDiskImageEncryption struct {
	// A relative URI containing the resource ID of the disk encryption set.
	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`

	// This property specifies the security profile of an OS disk image.
	SecurityProfile *OSDiskImageSecurityProfile `json:"securityProfile,omitempty"`
}

OSDiskImageEncryption - Contains encryption settings for an OS disk image.

type OSDiskImageSecurityProfile added in v0.4.0

type OSDiskImageSecurityProfile struct {
	// confidential VM encryption types
	ConfidentialVMEncryptionType *ConfidentialVMEncryptionType `json:"confidentialVMEncryptionType,omitempty"`

	// secure VM disk encryption set id
	SecureVMDiskEncryptionSetID *string `json:"secureVMDiskEncryptionSetId,omitempty"`
}

OSDiskImageSecurityProfile - Contains security profile for an OS disk image.

type OSFamily

type OSFamily struct {
	// OS family properties.
	Properties *OSFamilyProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

OSFamily - Describes a cloud service OS family.

type OSFamilyListResult

type OSFamilyListResult struct {
	// REQUIRED
	Value    []*OSFamily `json:"value,omitempty"`
	NextLink *string     `json:"nextLink,omitempty"`
}

type OSFamilyProperties

type OSFamilyProperties struct {
	// READ-ONLY; The OS family label.
	Label *string `json:"label,omitempty" azure:"ro"`

	// READ-ONLY; The OS family name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; List of OS versions belonging to this family.
	Versions []*OSVersionPropertiesBase `json:"versions,omitempty" azure:"ro"`
}

OSFamilyProperties - OS family properties.

type OSProfile

type OSProfile struct {
	// Specifies the password of the administrator account.
	// Minimum-length (Windows): 8 characters
	// Minimum-length (Linux): 6 characters
	// Max-length (Windows): 123 characters
	// Max-length (Linux): 72 characters
	// Complexity requirements: 3 out of 4 conditions below need to be fulfilled
	// Has lower characters
	// Has upper characters
	// Has a digit
	// Has a special character (Regex match [\W_])
	// Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "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]
	// 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]
	AdminPassword *string `json:"adminPassword,omitempty"`

	// Specifies the name of the administrator account.
	// This property cannot be updated after the VM is created.
	// Windows-only restriction: Cannot end in "."
	// Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
	// "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest",
	// "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
	// Minimum-length (Linux): 1 character
	// Max-length (Linux): 64 characters
	// Max-length (Windows): 20 characters.
	AdminUsername *string `json:"adminUsername,omitempty"`

	// Specifies whether extension operations should be allowed on the virtual machine.
	// This may only be set to False when no extensions are present on the virtual machine.
	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`

	// Specifies the host OS name of the virtual machine.
	// This name cannot be updated after the VM is created.
	// Max-length (Windows): 15 characters
	// Max-length (Linux): 64 characters.
	// For naming conventions and restrictions see Azure infrastructure services implementation guidelines [https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules].
	ComputerName *string `json:"computerName,omitempty"`

	// Specifies a base-64 encoded string of custom data. The base-64 encoded string 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.
	// Note: Do not pass any secrets or passwords in customData property
	// This property cannot be updated after the VM is created.
	// customData is passed to the VM to be saved as a file, for more information see Custom Data on Azure VMs [https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/]
	// For using cloud-init for your Linux VM, see Using cloud-init to customize a Linux VM during creation [https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init]
	CustomData *string `json:"customData,omitempty"`

	// 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].
	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`

	// Optional property which must either be set to True or omitted.
	RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`

	// Specifies set of certificates that should be installed onto the virtual machine. 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] or the Azure Key Vault virtual machine
	// extension for Windows
	// [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
	Secrets []*VaultSecretGroup `json:"secrets,omitempty"`

	// Specifies Windows operating system settings on the virtual machine.
	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
}

OSProfile - Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned.

func (OSProfile) MarshalJSON

func (o OSProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OSProfile.

type OSVersion

type OSVersion struct {
	// OS version properties.
	Properties *OSVersionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

OSVersion - Describes a cloud service OS version.

type OSVersionListResult

type OSVersionListResult struct {
	// REQUIRED
	Value    []*OSVersion `json:"value,omitempty"`
	NextLink *string      `json:"nextLink,omitempty"`
}

type OSVersionProperties

type OSVersionProperties struct {
	// READ-ONLY; The family of this OS version.
	Family *string `json:"family,omitempty" azure:"ro"`

	// READ-ONLY; The family label of this OS version.
	FamilyLabel *string `json:"familyLabel,omitempty" azure:"ro"`

	// READ-ONLY; Specifies whether this OS version is active.
	IsActive *bool `json:"isActive,omitempty" azure:"ro"`

	// READ-ONLY; Specifies whether this is the default OS version for its family.
	IsDefault *bool `json:"isDefault,omitempty" azure:"ro"`

	// READ-ONLY; The OS version label.
	Label *string `json:"label,omitempty" azure:"ro"`

	// READ-ONLY; The OS version.
	Version *string `json:"version,omitempty" azure:"ro"`
}

OSVersionProperties - OS version properties.

type OSVersionPropertiesBase

type OSVersionPropertiesBase struct {
	// READ-ONLY; Specifies whether this OS version is active.
	IsActive *bool `json:"isActive,omitempty" azure:"ro"`

	// READ-ONLY; Specifies whether this is the default OS version for its family.
	IsDefault *bool `json:"isDefault,omitempty" azure:"ro"`

	// READ-ONLY; The OS version label.
	Label *string `json:"label,omitempty" azure:"ro"`

	// READ-ONLY; The OS version.
	Version *string `json:"version,omitempty" azure:"ro"`
}

OSVersionPropertiesBase - Configuration view of an OS version.

type OperatingSystemStateTypes

type OperatingSystemStateTypes string

OperatingSystemStateTypes - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.

const (
	OperatingSystemStateTypesGeneralized OperatingSystemStateTypes = "Generalized"
	OperatingSystemStateTypesSpecialized OperatingSystemStateTypes = "Specialized"
)

func PossibleOperatingSystemStateTypesValues

func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes

PossibleOperatingSystemStateTypesValues returns the possible values for the OperatingSystemStateTypes const type.

type OperatingSystemType

type OperatingSystemType string

OperatingSystemType - Gets the Operating System type.

const (
	OperatingSystemTypeLinux   OperatingSystemType = "Linux"
	OperatingSystemTypeWindows OperatingSystemType = "Windows"
)

func PossibleOperatingSystemTypeValues

func PossibleOperatingSystemTypeValues() []OperatingSystemType

PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type.

type OperatingSystemTypes

type OperatingSystemTypes string

OperatingSystemTypes - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: Windows Linux

const (
	OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
	OperatingSystemTypesLinux   OperatingSystemTypes = "Linux"
)

func PossibleOperatingSystemTypesValues

func PossibleOperatingSystemTypesValues() []OperatingSystemTypes

PossibleOperatingSystemTypesValues returns the possible values for the OperatingSystemTypes const type.

type OperationListResult added in v0.3.0

type OperationListResult struct {
	// READ-ONLY; The list of compute operations
	Value []*OperationValue `json:"value,omitempty" azure:"ro"`
}

OperationListResult - The List Compute Operation operation response.

type OperationValue added in v0.3.0

type OperationValue struct {
	// Describes the properties of a Compute Operation Value Display.
	Display *OperationValueDisplay `json:"display,omitempty"`

	// READ-ONLY; The name of the compute operation.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The origin of the compute operation.
	Origin *string `json:"origin,omitempty" azure:"ro"`
}

OperationValue - Describes the properties of a Compute Operation value.

type OperationValueDisplay added in v0.3.0

type OperationValueDisplay struct {
	// READ-ONLY; The description of the operation.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the compute operation.
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The resource provider for the operation.
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the resource the operation applies to.
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationValueDisplay - Describes the properties of a Compute Operation Value Display.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.7.0

NewListPager - Gets a list of compute operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OrchestrationMode

type OrchestrationMode string

OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set.

const (
	OrchestrationModeFlexible OrchestrationMode = "Flexible"
	OrchestrationModeUniform  OrchestrationMode = "Uniform"
)

func PossibleOrchestrationModeValues

func PossibleOrchestrationModeValues() []OrchestrationMode

PossibleOrchestrationModeValues returns the possible values for the OrchestrationMode const type.

type OrchestrationServiceNames

type OrchestrationServiceNames string

OrchestrationServiceNames - The name of the service.

const (
	OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs"
)

func PossibleOrchestrationServiceNamesValues

func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames

PossibleOrchestrationServiceNamesValues returns the possible values for the OrchestrationServiceNames const type.

type OrchestrationServiceState

type OrchestrationServiceState string

OrchestrationServiceState - The current state of the service.

const (
	OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning"
	OrchestrationServiceStateRunning    OrchestrationServiceState = "Running"
	OrchestrationServiceStateSuspended  OrchestrationServiceState = "Suspended"
)

func PossibleOrchestrationServiceStateValues

func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState

PossibleOrchestrationServiceStateValues returns the possible values for the OrchestrationServiceState const type.

type OrchestrationServiceStateAction

type OrchestrationServiceStateAction string

OrchestrationServiceStateAction - The action to be performed.

const (
	OrchestrationServiceStateActionResume  OrchestrationServiceStateAction = "Resume"
	OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend"
)

func PossibleOrchestrationServiceStateActionValues

func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction

PossibleOrchestrationServiceStateActionValues returns the possible values for the OrchestrationServiceStateAction const type.

type OrchestrationServiceStateInput

type OrchestrationServiceStateInput struct {
	// REQUIRED; The action to be performed.
	Action *OrchestrationServiceStateAction `json:"action,omitempty"`

	// REQUIRED; The name of the service.
	ServiceName *OrchestrationServiceNames `json:"serviceName,omitempty"`
}

OrchestrationServiceStateInput - The input for OrchestrationServiceState

type OrchestrationServiceSummary

type OrchestrationServiceSummary struct {
	// READ-ONLY; The name of the service.
	ServiceName *OrchestrationServiceNames `json:"serviceName,omitempty" azure:"ro"`

	// READ-ONLY; The current state of the service.
	ServiceState *OrchestrationServiceState `json:"serviceState,omitempty" azure:"ro"`
}

OrchestrationServiceSummary - Summary for an orchestration service of a virtual machine scale set.

type PatchAssessmentState

type PatchAssessmentState string

PatchAssessmentState - Describes the availability of a given patch.

const (
	PatchAssessmentStateAvailable PatchAssessmentState = "Available"
	PatchAssessmentStateUnknown   PatchAssessmentState = "Unknown"
)

func PossiblePatchAssessmentStateValues

func PossiblePatchAssessmentStateValues() []PatchAssessmentState

PossiblePatchAssessmentStateValues returns the possible values for the PatchAssessmentState const type.

type PatchInstallationDetail

type PatchInstallationDetail struct {
	// READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
	Classifications []*string `json:"classifications,omitempty" azure:"ro"`

	// READ-ONLY; The state of the patch after the installation operation completed.
	InstallationState *PatchInstallationState `json:"installationState,omitempty" azure:"ro"`

	// READ-ONLY; The KBID of the patch. Only applies to Windows patches.
	KbID *string `json:"kbId,omitempty" azure:"ro"`

	// READ-ONLY; The friendly name of the patch.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; A unique identifier for the patch.
	PatchID *string `json:"patchId,omitempty" azure:"ro"`

	// READ-ONLY; The version string of the package. It may conform to Semantic Versioning. Only applies to Linux.
	Version *string `json:"version,omitempty" azure:"ro"`
}

PatchInstallationDetail - Information about a specific patch that was encountered during an installation action.

type PatchInstallationState

type PatchInstallationState string

PatchInstallationState - The state of the patch after the installation operation completed.

const (
	PatchInstallationStateExcluded    PatchInstallationState = "Excluded"
	PatchInstallationStateFailed      PatchInstallationState = "Failed"
	PatchInstallationStateInstalled   PatchInstallationState = "Installed"
	PatchInstallationStateNotSelected PatchInstallationState = "NotSelected"
	PatchInstallationStatePending     PatchInstallationState = "Pending"
	PatchInstallationStateUnknown     PatchInstallationState = "Unknown"
)

func PossiblePatchInstallationStateValues

func PossiblePatchInstallationStateValues() []PatchInstallationState

PossiblePatchInstallationStateValues returns the possible values for the PatchInstallationState const type.

type PatchOperationStatus

type PatchOperationStatus string

PatchOperationStatus - The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings."

const (
	PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings"
	PatchOperationStatusFailed                PatchOperationStatus = "Failed"
	PatchOperationStatusInProgress            PatchOperationStatus = "InProgress"
	PatchOperationStatusSucceeded             PatchOperationStatus = "Succeeded"
	PatchOperationStatusUnknown               PatchOperationStatus = "Unknown"
)

func PossiblePatchOperationStatusValues

func PossiblePatchOperationStatusValues() []PatchOperationStatus

PossiblePatchOperationStatusValues returns the possible values for the PatchOperationStatus const type.

type PatchSettings

type PatchSettings struct {
	// Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.
	// Possible values are:
	// ImageDefault - You control the timing of patch assessments on a virtual machine.
	// AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.
	AssessmentMode *WindowsPatchAssessmentMode `json:"assessmentMode,omitempty"`

	// Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.
	AutomaticByPlatformSettings *WindowsVMGuestPatchAutomaticByPlatformSettings `json:"automaticByPlatformSettings,omitempty"`

	// Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must
	// be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.
	EnableHotpatching *bool `json:"enableHotpatching,omitempty"`

	// Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale
	// set with OrchestrationMode as Flexible.
	// Possible values are:
	// Manual - You control the application of patches to a virtual machine. You do this by applying patches manually inside the
	// VM. In this mode, automatic updates are disabled; the property
	// WindowsConfiguration.enableAutomaticUpdates must be false
	// AutomaticByOS - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates
	// must be true.
	// AutomaticByPlatform - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and
	// WindowsConfiguration.enableAutomaticUpdates must be true
	PatchMode *WindowsVMGuestPatchMode `json:"patchMode,omitempty"`
}

PatchSettings - Specifies settings related to VM Guest Patching on Windows.

type PirCommunityGalleryResource added in v0.2.0

type PirCommunityGalleryResource struct {
	// The identifier information of community gallery.
	Identifier *CommunityGalleryIdentifier `json:"identifier,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

PirCommunityGalleryResource - Base information about the community gallery resource in pir.

type PirResource

type PirResource struct {
	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`
}

PirResource - The Resource model definition.

type PirSharedGalleryResource

type PirSharedGalleryResource struct {
	// The identifier information of shared gallery.
	Identifier *SharedGalleryIdentifier `json:"identifier,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`
}

PirSharedGalleryResource - Base information about the shared gallery resource in pir.

type Plan

type Plan struct {
	// The plan ID.
	Name *string `json:"name,omitempty"`

	// Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
	Product *string `json:"product,omitempty"`

	// The promotion code.
	PromotionCode *string `json:"promotionCode,omitempty"`

	// The publisher ID.
	Publisher *string `json:"publisher,omitempty"`
}

Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string `json:"id,omitempty" azure:"ro"`
}

PrivateEndpoint - The Private Endpoint resource.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; private endpoint connection Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; private endpoint connection name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; private endpoint connection type
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
	NextLink *string `json:"nextLink,omitempty"`

	// Array of private endpoint connections
	Value []*PrivateEndpointConnection `json:"value,omitempty"`
}

PrivateEndpointConnectionListResult - A list of private link resources

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between DiskAccess and Virtual Network.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// READ-ONLY; The resource of private end point.
	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`

	// READ-ONLY; private link resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; private link resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; private link resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateLinkResource - A private link resource

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource `json:"value,omitempty"`
}

PrivateLinkResourceListResult - A list of private link resources

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource DNS zone name.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"`

	// READ-ONLY; The private link resource group id.
	GroupID *string `json:"groupId,omitempty" azure:"ro"`

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"`
}

PrivateLinkResourceProperties - Properties of a private link resource.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string `json:"actionsRequired,omitempty"`

	// The reason for approval/rejection of the connection.
	Description *string `json:"description,omitempty"`

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

type PropertyUpdatesInProgress

type PropertyUpdatesInProgress struct {
	// The target performance tier of the disk if a tier change operation is in progress.
	TargetTier *string `json:"targetTier,omitempty"`
}

PropertyUpdatesInProgress - Properties of the disk for which update is pending.

type ProtocolTypes

type ProtocolTypes string

ProtocolTypes - Specifies the protocol of WinRM listener. Possible values are: http https

const (
	ProtocolTypesHTTP  ProtocolTypes = "Http"
	ProtocolTypesHTTPS ProtocolTypes = "Https"
)

func PossibleProtocolTypesValues

func PossibleProtocolTypesValues() []ProtocolTypes

PossibleProtocolTypesValues returns the possible values for the ProtocolTypes const type.

type ProximityPlacementGroup

type ProximityPlacementGroup struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a Proximity Placement Group.
	Properties *ProximityPlacementGroupProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the
	// proximity placement group can be created.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProximityPlacementGroup - Specifies information about the proximity placement group.

func (ProximityPlacementGroup) MarshalJSON

func (p ProximityPlacementGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroup.

type ProximityPlacementGroupListResult

type ProximityPlacementGroupListResult struct {
	// REQUIRED; The list of proximity placement groups
	Value []*ProximityPlacementGroup `json:"value,omitempty"`

	// The URI to fetch the next page of proximity placement groups.
	NextLink *string `json:"nextLink,omitempty"`
}

ProximityPlacementGroupListResult - The List Proximity Placement Group operation response.

type ProximityPlacementGroupProperties

type ProximityPlacementGroupProperties struct {
	// Describes colocation status of the Proximity Placement Group.
	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`

	// Specifies the user intent of the proximity placement group.
	Intent *ProximityPlacementGroupPropertiesIntent `json:"intent,omitempty"`

	// Specifies the type of the proximity placement group.
	// Possible values are:
	// Standard : Co-locate resources within an Azure region or Availability Zone.
	// Ultra : For future use.
	ProximityPlacementGroupType *ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`

	// READ-ONLY; A list of references to all availability sets in the proximity placement group.
	AvailabilitySets []*SubResourceWithColocationStatus `json:"availabilitySets,omitempty" azure:"ro"`

	// READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
	VirtualMachineScaleSets []*SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty" azure:"ro"`

	// READ-ONLY; A list of references to all virtual machines in the proximity placement group.
	VirtualMachines []*SubResourceWithColocationStatus `json:"virtualMachines,omitempty" azure:"ro"`
}

ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.

func (ProximityPlacementGroupProperties) MarshalJSON

func (p ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupProperties.

type ProximityPlacementGroupPropertiesIntent added in v1.0.0

type ProximityPlacementGroupPropertiesIntent struct {
	// Specifies possible sizes of virtual machines that can be created in the proximity placement group.
	VMSizes []*string `json:"vmSizes,omitempty"`
}

ProximityPlacementGroupPropertiesIntent - Specifies the user intent of the proximity placement group.

func (ProximityPlacementGroupPropertiesIntent) MarshalJSON added in v1.0.0

func (p ProximityPlacementGroupPropertiesIntent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupPropertiesIntent.

type ProximityPlacementGroupType

type ProximityPlacementGroupType string

ProximityPlacementGroupType - Specifies the type of the proximity placement group. Possible values are: Standard : Co-locate resources within an Azure region or Availability Zone. Ultra : For future use.

const (
	ProximityPlacementGroupTypeStandard ProximityPlacementGroupType = "Standard"
	ProximityPlacementGroupTypeUltra    ProximityPlacementGroupType = "Ultra"
)

func PossibleProximityPlacementGroupTypeValues

func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType

PossibleProximityPlacementGroupTypeValues returns the possible values for the ProximityPlacementGroupType const type.

type ProximityPlacementGroupUpdate

type ProximityPlacementGroupUpdate struct {
	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

ProximityPlacementGroupUpdate - Specifies information about the proximity placement group.

func (ProximityPlacementGroupUpdate) MarshalJSON added in v0.3.0

func (p ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupUpdate.

type ProximityPlacementGroupsClient

type ProximityPlacementGroupsClient struct {
	// contains filtered or unexported fields
}

ProximityPlacementGroupsClient contains the methods for the ProximityPlacementGroups group. Don't use this type directly, use NewProximityPlacementGroupsClient() instead.

func NewProximityPlacementGroupsClient

func NewProximityPlacementGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProximityPlacementGroupsClient, error)

NewProximityPlacementGroupsClient creates a new instance of ProximityPlacementGroupsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ProximityPlacementGroupsClient) CreateOrUpdate

CreateOrUpdate - Create or update a proximity placement group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. proximityPlacementGroupName - The name of the proximity placement group. parameters - Parameters supplied to the Create Proximity Placement Group operation. options - ProximityPlacementGroupsClientCreateOrUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewProximityPlacementGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroup",
		"myProximityPlacementGroup",
		armcompute.ProximityPlacementGroup{
			Location: to.Ptr("westus"),
			Properties: &armcompute.ProximityPlacementGroupProperties{
				Intent: &armcompute.ProximityPlacementGroupPropertiesIntent{
					VMSizes: []*string{
						to.Ptr("Basic_A0"),
						to.Ptr("Basic_A2")},
				},
				ProximityPlacementGroupType: to.Ptr(armcompute.ProximityPlacementGroupTypeStandard),
			},
			Zones: []*string{
				to.Ptr("1")},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ProximityPlacementGroupsClient) Delete

Delete - Delete a proximity placement group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. proximityPlacementGroupName - The name of the proximity placement group. options - ProximityPlacementGroupsClientDeleteOptions contains the optional parameters for the ProximityPlacementGroupsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewProximityPlacementGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"myResourceGroup",
		"myProximityPlacementGroup",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ProximityPlacementGroupsClient) Get

Get - Retrieves information about a proximity placement group . If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. proximityPlacementGroupName - The name of the proximity placement group. options - ProximityPlacementGroupsClientGetOptions contains the optional parameters for the ProximityPlacementGroupsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewProximityPlacementGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myProximityPlacementGroup",
		&armcompute.ProximityPlacementGroupsClientGetOptions{IncludeColocationStatus: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ProximityPlacementGroupsClient) NewListByResourceGroupPager added in v0.7.0

NewListByResourceGroupPager - Lists all proximity placement groups in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - ProximityPlacementGroupsClientListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroupsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewProximityPlacementGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ProximityPlacementGroupsClient) NewListBySubscriptionPager added in v0.7.0

NewListBySubscriptionPager - Lists all proximity placement groups in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - ProximityPlacementGroupsClientListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroupsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewProximityPlacementGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ProximityPlacementGroupsClient) Update

Update - Update a proximity placement group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. proximityPlacementGroupName - The name of the proximity placement group. parameters - Parameters supplied to the Update Proximity Placement Group operation. options - ProximityPlacementGroupsClientUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/proximityPlacementGroupExamples/ProximityPlacementGroup_Patch.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewProximityPlacementGroupsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"myResourceGroup",
		"myProximityPlacementGroup",
		armcompute.ProximityPlacementGroupUpdate{
			Tags: map[string]*string{
				"additionalProp1": to.Ptr("string"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ProximityPlacementGroupsClientCreateOrUpdateOptions added in v0.3.0

type ProximityPlacementGroupsClientCreateOrUpdateOptions struct {
}

ProximityPlacementGroupsClientCreateOrUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.CreateOrUpdate method.

type ProximityPlacementGroupsClientCreateOrUpdateResponse added in v0.3.0

type ProximityPlacementGroupsClientCreateOrUpdateResponse struct {
	ProximityPlacementGroup
}

ProximityPlacementGroupsClientCreateOrUpdateResponse contains the response from method ProximityPlacementGroupsClient.CreateOrUpdate.

type ProximityPlacementGroupsClientDeleteOptions added in v0.3.0

type ProximityPlacementGroupsClientDeleteOptions struct {
}

ProximityPlacementGroupsClientDeleteOptions contains the optional parameters for the ProximityPlacementGroupsClient.Delete method.

type ProximityPlacementGroupsClientDeleteResponse added in v0.3.0

type ProximityPlacementGroupsClientDeleteResponse struct {
}

ProximityPlacementGroupsClientDeleteResponse contains the response from method ProximityPlacementGroupsClient.Delete.

type ProximityPlacementGroupsClientGetOptions added in v0.3.0

type ProximityPlacementGroupsClientGetOptions struct {
	// includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group.
	IncludeColocationStatus *string
}

ProximityPlacementGroupsClientGetOptions contains the optional parameters for the ProximityPlacementGroupsClient.Get method.

type ProximityPlacementGroupsClientGetResponse added in v0.3.0

type ProximityPlacementGroupsClientGetResponse struct {
	ProximityPlacementGroup
}

ProximityPlacementGroupsClientGetResponse contains the response from method ProximityPlacementGroupsClient.Get.

type ProximityPlacementGroupsClientListByResourceGroupOptions added in v0.3.0

type ProximityPlacementGroupsClientListByResourceGroupOptions struct {
}

ProximityPlacementGroupsClientListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroupsClient.ListByResourceGroup method.

type ProximityPlacementGroupsClientListByResourceGroupResponse added in v0.3.0

type ProximityPlacementGroupsClientListByResourceGroupResponse struct {
	ProximityPlacementGroupListResult
}

ProximityPlacementGroupsClientListByResourceGroupResponse contains the response from method ProximityPlacementGroupsClient.ListByResourceGroup.

type ProximityPlacementGroupsClientListBySubscriptionOptions added in v0.3.0

type ProximityPlacementGroupsClientListBySubscriptionOptions struct {
}

ProximityPlacementGroupsClientListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroupsClient.ListBySubscription method.

type ProximityPlacementGroupsClientListBySubscriptionResponse added in v0.3.0

type ProximityPlacementGroupsClientListBySubscriptionResponse struct {
	ProximityPlacementGroupListResult
}

ProximityPlacementGroupsClientListBySubscriptionResponse contains the response from method ProximityPlacementGroupsClient.ListBySubscription.

type ProximityPlacementGroupsClientUpdateOptions added in v0.3.0

type ProximityPlacementGroupsClientUpdateOptions struct {
}

ProximityPlacementGroupsClientUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.Update method.

type ProximityPlacementGroupsClientUpdateResponse added in v0.3.0

type ProximityPlacementGroupsClientUpdateResponse struct {
	ProximityPlacementGroup
}

ProximityPlacementGroupsClientUpdateResponse contains the response from method ProximityPlacementGroupsClient.Update.

type ProxyOnlyResource

type ProxyOnlyResource struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyOnlyResource - The ProxyOnly Resource model definition.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - The resource model definition for an Azure Resource Manager proxy resource. It will not have tags and a location

type PublicIPAddressSKU

type PublicIPAddressSKU struct {
	// Specify public IP sku name
	Name *PublicIPAddressSKUName `json:"name,omitempty"`

	// Specify public IP sku tier
	Tier *PublicIPAddressSKUTier `json:"tier,omitempty"`
}

PublicIPAddressSKU - Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.

type PublicIPAddressSKUName

type PublicIPAddressSKUName string

PublicIPAddressSKUName - Specify public IP sku name

const (
	PublicIPAddressSKUNameBasic    PublicIPAddressSKUName = "Basic"
	PublicIPAddressSKUNameStandard PublicIPAddressSKUName = "Standard"
)

func PossiblePublicIPAddressSKUNameValues

func PossiblePublicIPAddressSKUNameValues() []PublicIPAddressSKUName

PossiblePublicIPAddressSKUNameValues returns the possible values for the PublicIPAddressSKUName const type.

type PublicIPAddressSKUTier

type PublicIPAddressSKUTier string

PublicIPAddressSKUTier - Specify public IP sku tier

const (
	PublicIPAddressSKUTierGlobal   PublicIPAddressSKUTier = "Global"
	PublicIPAddressSKUTierRegional PublicIPAddressSKUTier = "Regional"
)

func PossiblePublicIPAddressSKUTierValues

func PossiblePublicIPAddressSKUTierValues() []PublicIPAddressSKUTier

PossiblePublicIPAddressSKUTierValues returns the possible values for the PublicIPAddressSKUTier const type.

type PublicIPAllocationMethod

type PublicIPAllocationMethod string

PublicIPAllocationMethod - Specify the public IP allocation type

const (
	PublicIPAllocationMethodDynamic PublicIPAllocationMethod = "Dynamic"
	PublicIPAllocationMethodStatic  PublicIPAllocationMethod = "Static"
)

func PossiblePublicIPAllocationMethodValues

func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod

PossiblePublicIPAllocationMethodValues returns the possible values for the PublicIPAllocationMethod const type.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Policy for controlling export on the disk.

const (
	// PublicNetworkAccessDisabled - You cannot access the underlying data of the disk publicly on the internet even when NetworkAccessPolicy
	// is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy
	// is set to AllowPrivate.
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	// PublicNetworkAccessEnabled - You can generate a SAS URI to access the underlying data of the disk publicly on the internet
	// when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET
	// when NetworkAccessPolicy is set to AllowPrivate.
	PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type PurchasePlan

type PurchasePlan struct {
	// REQUIRED; The plan ID.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference
	// element.
	Product *string `json:"product,omitempty"`

	// REQUIRED; The publisher ID.
	Publisher *string `json:"publisher,omitempty"`
}

PurchasePlan - Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

type RecommendedMachineConfiguration

type RecommendedMachineConfiguration struct {
	// Describes the resource range.
	Memory *ResourceRange `json:"memory,omitempty"`

	// Describes the resource range.
	VCPUs *ResourceRange `json:"vCPUs,omitempty"`
}

RecommendedMachineConfiguration - The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.

type RecoveryWalkResponse

type RecoveryWalkResponse struct {
	// READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty" azure:"ro"`

	// READ-ONLY; Whether the recovery walk was performed
	WalkPerformed *bool `json:"walkPerformed,omitempty" azure:"ro"`
}

RecoveryWalkResponse - Response after calling a manual recovery walk

type RegionalReplicationStatus

type RegionalReplicationStatus struct {
	// READ-ONLY; The details of the replication status.
	Details *string `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; It indicates progress of the replication job.
	Progress *int32 `json:"progress,omitempty" azure:"ro"`

	// READ-ONLY; The region to which the gallery image version is being replicated to.
	Region *string `json:"region,omitempty" azure:"ro"`

	// READ-ONLY; This is the regional replication state.
	State *ReplicationState `json:"state,omitempty" azure:"ro"`
}

RegionalReplicationStatus - This is the regional replication status.

type RegionalSharingStatus added in v0.4.0

type RegionalSharingStatus struct {
	// Details of gallery regional sharing failure.
	Details *string `json:"details,omitempty"`

	// Region name
	Region *string `json:"region,omitempty"`

	// READ-ONLY; Gallery sharing state in current region
	State *SharingState `json:"state,omitempty" azure:"ro"`
}

RegionalSharingStatus - Gallery regional sharing status

type RepairAction added in v0.4.0

type RepairAction string

RepairAction - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.

const (
	RepairActionReimage RepairAction = "Reimage"
	RepairActionReplace RepairAction = "Replace"
	RepairActionRestart RepairAction = "Restart"
)

func PossibleRepairActionValues added in v0.4.0

func PossibleRepairActionValues() []RepairAction

PossibleRepairActionValues returns the possible values for the RepairAction const type.

type ReplicationMode

type ReplicationMode string

ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable.

const (
	ReplicationModeFull    ReplicationMode = "Full"
	ReplicationModeShallow ReplicationMode = "Shallow"
)

func PossibleReplicationModeValues

func PossibleReplicationModeValues() []ReplicationMode

PossibleReplicationModeValues returns the possible values for the ReplicationMode const type.

type ReplicationState

type ReplicationState string

ReplicationState - This is the regional replication state.

const (
	ReplicationStateCompleted   ReplicationState = "Completed"
	ReplicationStateFailed      ReplicationState = "Failed"
	ReplicationStateReplicating ReplicationState = "Replicating"
	ReplicationStateUnknown     ReplicationState = "Unknown"
)

func PossibleReplicationStateValues

func PossibleReplicationStateValues() []ReplicationState

PossibleReplicationStateValues returns the possible values for the ReplicationState const type.

type ReplicationStatus

type ReplicationStatus struct {
	// READ-ONLY; This is the aggregated replication status based on all the regional replication status flags.
	AggregatedState *AggregatedReplicationState `json:"aggregatedState,omitempty" azure:"ro"`

	// READ-ONLY; This is a summary of replication status for each region.
	Summary []*RegionalReplicationStatus `json:"summary,omitempty" azure:"ro"`
}

ReplicationStatus - This is the replication status of the gallery image version.

func (ReplicationStatus) MarshalJSON

func (r ReplicationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReplicationStatus.

type ReplicationStatusTypes

type ReplicationStatusTypes string
const (
	ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus"
)

func PossibleReplicationStatusTypesValues

func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes

PossibleReplicationStatusTypesValues returns the possible values for the ReplicationStatusTypes const type.

type RequestRateByIntervalInput

type RequestRateByIntervalInput struct {
	// REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`

	// REQUIRED; From time of the query
	FromTime *time.Time `json:"fromTime,omitempty"`

	// REQUIRED; Interval value in minutes used to create LogAnalytics call rate logs.
	IntervalLength *IntervalInMins `json:"intervalLength,omitempty"`

	// REQUIRED; To time of the query
	ToTime *time.Time `json:"toTime,omitempty"`

	// Group query result by Client Application ID.
	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`

	// Group query result by Operation Name.
	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`

	// Group query result by Resource Name.
	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`

	// Group query result by Throttle Policy applied.
	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`

	// Group query result by User Agent.
	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
}

RequestRateByIntervalInput - Api request input for LogAnalytics getRequestRateByInterval Api.

func (RequestRateByIntervalInput) MarshalJSON

func (r RequestRateByIntervalInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestRateByIntervalInput.

func (*RequestRateByIntervalInput) UnmarshalJSON

func (r *RequestRateByIntervalInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestRateByIntervalInput.

type Resource

type Resource struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - The Resource model definition.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set.

const (
	ResourceIdentityTypeSystemAssigned             ResourceIdentityType = "SystemAssigned"
	ResourceIdentityTypeUserAssigned               ResourceIdentityType = "UserAssigned"
	ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
	ResourceIdentityTypeNone                       ResourceIdentityType = "None"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

type ResourceInstanceViewStatus

type ResourceInstanceViewStatus struct {
	// The level code.
	Level *StatusLevelTypes `json:"level,omitempty"`

	// READ-ONLY; The status code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The short localizable label for the status.
	DisplayStatus *string `json:"displayStatus,omitempty" azure:"ro"`

	// READ-ONLY; The detailed status message, including for alerts and error messages.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The time of the status.
	Time *time.Time `json:"time,omitempty" azure:"ro"`
}

ResourceInstanceViewStatus - Instance view status.

func (*ResourceInstanceViewStatus) UnmarshalJSON

func (r *ResourceInstanceViewStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceInstanceViewStatus.

type ResourceRange

type ResourceRange struct {
	// The maximum number of the resource.
	Max *int32 `json:"max,omitempty"`

	// The minimum number of the resource.
	Min *int32 `json:"min,omitempty"`
}

ResourceRange - Describes the resource range.

type ResourceSKU

type ResourceSKU struct {
	// READ-ONLY; The api versions that support this SKU.
	APIVersions []*string `json:"apiVersions,omitempty" azure:"ro"`

	// READ-ONLY; A name value pair to describe the capability.
	Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the number of virtual machines in the scale set.
	Capacity *ResourceSKUCapacity `json:"capacity,omitempty" azure:"ro"`

	// READ-ONLY; Metadata for retrieving price info.
	Costs []*ResourceSKUCosts `json:"costs,omitempty" azure:"ro"`

	// READ-ONLY; The Family of this particular SKU.
	Family *string `json:"family,omitempty" azure:"ro"`

	// READ-ONLY; The Kind of resources that are supported in this SKU.
	Kind *string `json:"kind,omitempty" azure:"ro"`

	// READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
	LocationInfo []*ResourceSKULocationInfo `json:"locationInfo,omitempty" azure:"ro"`

	// READ-ONLY; The set of locations that the SKU is available.
	Locations []*string `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; The name of SKU.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`

	// READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
	Restrictions []*ResourceSKURestrictions `json:"restrictions,omitempty" azure:"ro"`

	// READ-ONLY; The Size of the SKU.
	Size *string `json:"size,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the tier of virtual machines in a scale set.
	// Possible Values:
	// Standard
	// Basic
	Tier *string `json:"tier,omitempty" azure:"ro"`
}

ResourceSKU - Describes an available Compute SKU.

type ResourceSKUCapabilities

type ResourceSKUCapabilities struct {
	// READ-ONLY; An invariant to describe the feature.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; An invariant if the feature is measured by quantity.
	Value *string `json:"value,omitempty" azure:"ro"`
}

ResourceSKUCapabilities - Describes The SKU capabilities object.

type ResourceSKUCapacity

type ResourceSKUCapacity struct {
	// READ-ONLY; The default capacity.
	Default *int64 `json:"default,omitempty" azure:"ro"`

	// READ-ONLY; The maximum capacity that can be set.
	Maximum *int64 `json:"maximum,omitempty" azure:"ro"`

	// READ-ONLY; The minimum capacity.
	Minimum *int64 `json:"minimum,omitempty" azure:"ro"`

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *ResourceSKUCapacityScaleType `json:"scaleType,omitempty" azure:"ro"`
}

ResourceSKUCapacity - Describes scaling information of a SKU.

type ResourceSKUCapacityScaleType

type ResourceSKUCapacityScaleType string

ResourceSKUCapacityScaleType - The scale type applicable to the sku.

const (
	ResourceSKUCapacityScaleTypeAutomatic ResourceSKUCapacityScaleType = "Automatic"
	ResourceSKUCapacityScaleTypeManual    ResourceSKUCapacityScaleType = "Manual"
	ResourceSKUCapacityScaleTypeNone      ResourceSKUCapacityScaleType = "None"
)

func PossibleResourceSKUCapacityScaleTypeValues

func PossibleResourceSKUCapacityScaleTypeValues() []ResourceSKUCapacityScaleType

PossibleResourceSKUCapacityScaleTypeValues returns the possible values for the ResourceSKUCapacityScaleType const type.

type ResourceSKUCosts

type ResourceSKUCosts struct {
	// READ-ONLY; An invariant to show the extended unit.
	ExtendedUnit *string `json:"extendedUnit,omitempty" azure:"ro"`

	// READ-ONLY; Used for querying price from commerce.
	MeterID *string `json:"meterID,omitempty" azure:"ro"`

	// READ-ONLY; The multiplier is needed to extend the base metered cost.
	Quantity *int64 `json:"quantity,omitempty" azure:"ro"`
}

ResourceSKUCosts - Describes metadata for retrieving price info.

type ResourceSKULocationInfo

type ResourceSKULocationInfo struct {
	// READ-ONLY; The names of extended locations.
	ExtendedLocations []*string `json:"extendedLocations,omitempty" azure:"ro"`

	// READ-ONLY; Location of the SKU
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The type of the extended location.
	Type *ExtendedLocationType `json:"type,omitempty" azure:"ro"`

	// READ-ONLY; Details of capabilities available to a SKU in specific zones.
	ZoneDetails []*ResourceSKUZoneDetails `json:"zoneDetails,omitempty" azure:"ro"`

	// READ-ONLY; List of availability zones where the SKU is supported.
	Zones []*string `json:"zones,omitempty" azure:"ro"`
}

ResourceSKULocationInfo - Describes an available Compute SKU Location Information.

type ResourceSKURestrictionInfo

type ResourceSKURestrictionInfo struct {
	// READ-ONLY; Locations where the SKU is restricted
	Locations []*string `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; List of availability zones where the SKU is restricted.
	Zones []*string `json:"zones,omitempty" azure:"ro"`
}

ResourceSKURestrictionInfo - Describes an available Compute SKU Restriction Information.

type ResourceSKURestrictions

type ResourceSKURestrictions struct {
	// READ-ONLY; The reason for restriction.
	ReasonCode *ResourceSKURestrictionsReasonCode `json:"reasonCode,omitempty" azure:"ro"`

	// READ-ONLY; The information about the restriction where the SKU cannot be used.
	RestrictionInfo *ResourceSKURestrictionInfo `json:"restrictionInfo,omitempty" azure:"ro"`

	// READ-ONLY; The type of restrictions.
	Type *ResourceSKURestrictionsType `json:"type,omitempty" azure:"ro"`

	// READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where
	// the SKU is restricted.
	Values []*string `json:"values,omitempty" azure:"ro"`
}

ResourceSKURestrictions - Describes scaling information of a SKU.

type ResourceSKURestrictionsReasonCode

type ResourceSKURestrictionsReasonCode string

ResourceSKURestrictionsReasonCode - The reason for restriction.

const (
	ResourceSKURestrictionsReasonCodeQuotaID                     ResourceSKURestrictionsReasonCode = "QuotaId"
	ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription"
)

func PossibleResourceSKURestrictionsReasonCodeValues

func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode

PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type.

type ResourceSKURestrictionsType

type ResourceSKURestrictionsType string

ResourceSKURestrictionsType - The type of restrictions.

const (
	ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location"
	ResourceSKURestrictionsTypeZone     ResourceSKURestrictionsType = "Zone"
)

func PossibleResourceSKURestrictionsTypeValues

func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType

PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type.

type ResourceSKUZoneDetails

type ResourceSKUZoneDetails struct {
	// READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
	Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty" azure:"ro"`

	// READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
	Name []*string `json:"name,omitempty" azure:"ro"`
}

ResourceSKUZoneDetails - Describes The zonal capabilities of a SKU.

type ResourceSKUsClient

type ResourceSKUsClient struct {
	// contains filtered or unexported fields
}

ResourceSKUsClient contains the methods for the ResourceSKUs group. Don't use this type directly, use NewResourceSKUsClient() instead.

func NewResourceSKUsClient

func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSKUsClient, error)

NewResourceSKUsClient creates a new instance of ResourceSKUsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ResourceSKUsClient) NewListPager added in v0.7.0

NewListPager - Gets the list of Microsoft.Compute SKUs available for your Subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 options - ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewResourceSKUsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armcompute.ResourceSKUsClientListOptions{Filter: nil,
		IncludeExtendedLocations: nil,
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ResourceSKUsClientListOptions added in v0.3.0

type ResourceSKUsClientListOptions struct {
	// The filter to apply on the operation. Only location filter is supported currently.
	Filter *string
	// To Include Extended Locations information or not in the response.
	IncludeExtendedLocations *string
}

ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.List method.

type ResourceSKUsClientListResponse added in v0.3.0

type ResourceSKUsClientListResponse struct {
	ResourceSKUsResult
}

ResourceSKUsClientListResponse contains the response from method ResourceSKUsClient.List.

type ResourceSKUsResult

type ResourceSKUsResult struct {
	// REQUIRED; The list of skus available for the subscription.
	Value []*ResourceSKU `json:"value,omitempty"`

	// The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
	NextLink *string `json:"nextLink,omitempty"`
}

ResourceSKUsResult - The List Resource Skus operation response.

type ResourceURIList

type ResourceURIList struct {
	// REQUIRED; A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
	Value []*string `json:"value,omitempty"`

	// The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources.
	NextLink *string `json:"nextLink,omitempty"`
}

ResourceURIList - The List resources which are encrypted with the disk encryption set.

type ResourceWithOptionalLocation added in v1.0.0

type ResourceWithOptionalLocation struct {
	// Resource location
	Location *string `json:"location,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ResourceWithOptionalLocation - The Resource model definition with location property as optional.

func (ResourceWithOptionalLocation) MarshalJSON added in v1.0.0

func (r ResourceWithOptionalLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceWithOptionalLocation.

type RestorePoint

type RestorePoint struct {
	// The restore point properties.
	Properties *RestorePointProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RestorePoint - Restore Point details.

type RestorePointCollection

type RestorePointCollection struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The restore point collection properties.
	Properties *RestorePointCollectionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RestorePointCollection - Create or update Restore Point collection parameters.

func (RestorePointCollection) MarshalJSON

func (r RestorePointCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestorePointCollection.

type RestorePointCollectionExpandOptions

type RestorePointCollectionExpandOptions string
const (
	RestorePointCollectionExpandOptionsRestorePoints RestorePointCollectionExpandOptions = "restorePoints"
)

func PossibleRestorePointCollectionExpandOptionsValues

func PossibleRestorePointCollectionExpandOptionsValues() []RestorePointCollectionExpandOptions

PossibleRestorePointCollectionExpandOptionsValues returns the possible values for the RestorePointCollectionExpandOptions const type.

type RestorePointCollectionListResult

type RestorePointCollectionListResult struct {
	// The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch the next page of RestorePointCollections
	NextLink *string `json:"nextLink,omitempty"`

	// Gets the list of restore point collections.
	Value []*RestorePointCollection `json:"value,omitempty"`
}

RestorePointCollectionListResult - The List restore point collection operation response.

type RestorePointCollectionProperties

type RestorePointCollectionProperties struct {
	// The properties of the source resource that this restore point collection is created from.
	Source *RestorePointCollectionSourceProperties `json:"source,omitempty"`

	// READ-ONLY; The provisioning state of the restore point collection.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The unique id of the restore point collection.
	RestorePointCollectionID *string `json:"restorePointCollectionId,omitempty" azure:"ro"`

	// READ-ONLY; A list containing all restore points created under this restore point collection.
	RestorePoints []*RestorePoint `json:"restorePoints,omitempty" azure:"ro"`
}

RestorePointCollectionProperties - The restore point collection properties.

func (RestorePointCollectionProperties) MarshalJSON

func (r RestorePointCollectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionProperties.

type RestorePointCollectionSourceProperties

type RestorePointCollectionSourceProperties struct {
	// Resource Id of the source resource used to create this restore point collection
	ID *string `json:"id,omitempty"`

	// READ-ONLY; Location of the source resource used to create this restore point collection.
	Location *string `json:"location,omitempty" azure:"ro"`
}

RestorePointCollectionSourceProperties - The properties of the source resource that this restore point collection is created from.

type RestorePointCollectionUpdate

type RestorePointCollectionUpdate struct {
	// The restore point collection properties.
	Properties *RestorePointCollectionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

RestorePointCollectionUpdate - Update Restore Point collection parameters.

func (RestorePointCollectionUpdate) MarshalJSON

func (r RestorePointCollectionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionUpdate.

type RestorePointCollectionsClient

type RestorePointCollectionsClient struct {
	// contains filtered or unexported fields
}

RestorePointCollectionsClient contains the methods for the RestorePointCollections group. Don't use this type directly, use NewRestorePointCollectionsClient() instead.

func NewRestorePointCollectionsClient

func NewRestorePointCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointCollectionsClient, error)

NewRestorePointCollectionsClient creates a new instance of RestorePointCollectionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorePointCollectionsClient) BeginDelete

BeginDelete - The operation to delete the restore point collection. This operation will also delete all the contained restore points. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the Restore Point Collection. options - RestorePointCollectionsClientBeginDeleteOptions contains the optional parameters for the RestorePointCollectionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePointCollections_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointCollectionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*RestorePointCollectionsClient) CreateOrUpdate

CreateOrUpdate - The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection. parameters - Parameters supplied to the Create or Update restore point collection operation. options - RestorePointCollectionsClientCreateOrUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePointCollection_CreateOrUpdate_ForCrossRegionCopy.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointCollectionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroup",
		"myRpc",
		armcompute.RestorePointCollection{
			Location: to.Ptr("norwayeast"),
			Tags: map[string]*string{
				"myTag1": to.Ptr("tagValue1"),
			},
			Properties: &armcompute.RestorePointCollectionProperties{
				Source: &armcompute.RestorePointCollectionSourceProperties{
					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*RestorePointCollectionsClient) Get

func (client *RestorePointCollectionsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientGetOptions) (RestorePointCollectionsClientGetResponse, error)

Get - The operation to get the restore point collection. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection. options - RestorePointCollectionsClientGetOptions contains the optional parameters for the RestorePointCollectionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePointCollection_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointCollectionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myRpc",
		&armcompute.RestorePointCollectionsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*RestorePointCollectionsClient) NewListAllPager added in v0.7.0

NewListAllPager - Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - RestorePointCollectionsClientListAllOptions contains the optional parameters for the RestorePointCollectionsClient.ListAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePointCollection_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointCollectionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAllPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*RestorePointCollectionsClient) NewListPager added in v0.7.0

NewListPager - Gets the list of restore point collections in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - RestorePointCollectionsClientListOptions contains the optional parameters for the RestorePointCollectionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePointCollection_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointCollectionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*RestorePointCollectionsClient) Update

Update - The operation to update the restore point collection. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection. parameters - Parameters supplied to the Update restore point collection operation. options - RestorePointCollectionsClientUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePointCollections_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointCollectionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		armcompute.RestorePointCollectionUpdate{
			Tags: map[string]*string{
				"key8536": to.Ptr("aaaaaaaaaaaaaaaaaaa"),
			},
			Properties: &armcompute.RestorePointCollectionProperties{
				Source: &armcompute.RestorePointCollectionSourceProperties{
					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type RestorePointCollectionsClientBeginDeleteOptions added in v0.3.0

type RestorePointCollectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RestorePointCollectionsClientBeginDeleteOptions contains the optional parameters for the RestorePointCollectionsClient.BeginDelete method.

type RestorePointCollectionsClientCreateOrUpdateOptions added in v0.3.0

type RestorePointCollectionsClientCreateOrUpdateOptions struct {
}

RestorePointCollectionsClientCreateOrUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.CreateOrUpdate method.

type RestorePointCollectionsClientCreateOrUpdateResponse added in v0.3.0

type RestorePointCollectionsClientCreateOrUpdateResponse struct {
	RestorePointCollection
}

RestorePointCollectionsClientCreateOrUpdateResponse contains the response from method RestorePointCollectionsClient.CreateOrUpdate.

type RestorePointCollectionsClientDeleteResponse added in v0.3.0

type RestorePointCollectionsClientDeleteResponse struct {
}

RestorePointCollectionsClientDeleteResponse contains the response from method RestorePointCollectionsClient.Delete.

type RestorePointCollectionsClientGetOptions added in v0.3.0

type RestorePointCollectionsClientGetOptions struct {
	// The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points
	// in the restorePointCollection.
	Expand *RestorePointCollectionExpandOptions
}

RestorePointCollectionsClientGetOptions contains the optional parameters for the RestorePointCollectionsClient.Get method.

type RestorePointCollectionsClientGetResponse added in v0.3.0

type RestorePointCollectionsClientGetResponse struct {
	RestorePointCollection
}

RestorePointCollectionsClientGetResponse contains the response from method RestorePointCollectionsClient.Get.

type RestorePointCollectionsClientListAllOptions added in v0.3.0

type RestorePointCollectionsClientListAllOptions struct {
}

RestorePointCollectionsClientListAllOptions contains the optional parameters for the RestorePointCollectionsClient.ListAll method.

type RestorePointCollectionsClientListAllResponse added in v0.3.0

type RestorePointCollectionsClientListAllResponse struct {
	RestorePointCollectionListResult
}

RestorePointCollectionsClientListAllResponse contains the response from method RestorePointCollectionsClient.ListAll.

type RestorePointCollectionsClientListOptions added in v0.3.0

type RestorePointCollectionsClientListOptions struct {
}

RestorePointCollectionsClientListOptions contains the optional parameters for the RestorePointCollectionsClient.List method.

type RestorePointCollectionsClientListResponse added in v0.3.0

type RestorePointCollectionsClientListResponse struct {
	RestorePointCollectionListResult
}

RestorePointCollectionsClientListResponse contains the response from method RestorePointCollectionsClient.List.

type RestorePointCollectionsClientUpdateOptions added in v0.3.0

type RestorePointCollectionsClientUpdateOptions struct {
}

RestorePointCollectionsClientUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.Update method.

type RestorePointCollectionsClientUpdateResponse added in v0.3.0

type RestorePointCollectionsClientUpdateResponse struct {
	RestorePointCollection
}

RestorePointCollectionsClientUpdateResponse contains the response from method RestorePointCollectionsClient.Update.

type RestorePointExpandOptions added in v0.4.0

type RestorePointExpandOptions string
const (
	RestorePointExpandOptionsInstanceView RestorePointExpandOptions = "instanceView"
)

func PossibleRestorePointExpandOptionsValues added in v0.4.0

func PossibleRestorePointExpandOptionsValues() []RestorePointExpandOptions

PossibleRestorePointExpandOptionsValues returns the possible values for the RestorePointExpandOptions const type.

type RestorePointInstanceView added in v0.4.0

type RestorePointInstanceView struct {
	// The disk restore points information.
	DiskRestorePoints []*DiskRestorePointInstanceView `json:"diskRestorePoints,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`
}

RestorePointInstanceView - The instance view of a restore point.

func (RestorePointInstanceView) MarshalJSON added in v0.4.0

func (r RestorePointInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestorePointInstanceView.

type RestorePointProperties

type RestorePointProperties struct {
	// ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent
	// is accepted as a valid input. Please refer to
	// https://aka.ms/RestorePoints for more details.
	ConsistencyMode *ConsistencyModeTypes `json:"consistencyMode,omitempty"`

	// List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks
	// will be included.
	ExcludeDisks []*APIEntityReference `json:"excludeDisks,omitempty"`

	// Resource Id of the source restore point from which a copy needs to be created.
	SourceRestorePoint *APIEntityReference `json:"sourceRestorePoint,omitempty"`

	// Gets the creation time of the restore point.
	TimeCreated *time.Time `json:"timeCreated,omitempty"`

	// READ-ONLY; The restore point instance view.
	InstanceView *RestorePointInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; Gets the provisioning state of the restore point.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Gets the details of the VM captured at the time of the restore point creation.
	SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty" azure:"ro"`
}

RestorePointProperties - The restore point properties.

func (RestorePointProperties) MarshalJSON

func (r RestorePointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestorePointProperties.

func (*RestorePointProperties) UnmarshalJSON added in v0.2.0

func (r *RestorePointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProperties.

type RestorePointSourceMetadata

type RestorePointSourceMetadata struct {
	// Gets the diagnostics profile.
	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`

	// Gets the hardware profile.
	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`

	// Gets the license type, which is for bring your own license scenario.
	LicenseType *string `json:"licenseType,omitempty"`

	// Location of the VM from which the restore point was created.
	Location *string `json:"location,omitempty"`

	// Gets the OS profile.
	OSProfile *OSProfile `json:"osProfile,omitempty"`

	// Gets the security profile.
	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`

	// Gets the storage profile.
	StorageProfile *RestorePointSourceVMStorageProfile `json:"storageProfile,omitempty"`

	// Gets the virtual machine unique id.
	VMID *string `json:"vmId,omitempty"`
}

RestorePointSourceMetadata - Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation.

type RestorePointSourceVMDataDisk

type RestorePointSourceVMDataDisk struct {
	// Gets the caching type.
	Caching *CachingTypes `json:"caching,omitempty"`

	// Gets the disk restore point Id.
	DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"`

	// Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks.
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Gets the logical unit number.
	Lun *int32 `json:"lun,omitempty"`

	// Gets the managed disk details
	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`

	// Gets the disk name.
	Name *string `json:"name,omitempty"`
}

RestorePointSourceVMDataDisk - Describes a data disk.

type RestorePointSourceVMOSDisk

type RestorePointSourceVMOSDisk struct {
	// Gets the caching type.
	Caching *CachingTypes `json:"caching,omitempty"`

	// Gets the disk restore point Id.
	DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"`

	// Gets the disk size in GB.
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Gets the disk encryption settings.
	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`

	// Gets the managed disk details
	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`

	// Gets the disk name.
	Name *string `json:"name,omitempty"`

	// Gets the Operating System type.
	OSType *OperatingSystemType `json:"osType,omitempty"`
}

RestorePointSourceVMOSDisk - Describes an Operating System disk.

type RestorePointSourceVMStorageProfile

type RestorePointSourceVMStorageProfile struct {
	// Gets the data disks of the VM captured at the time of the restore point creation.
	DataDisks []*RestorePointSourceVMDataDisk `json:"dataDisks,omitempty"`

	// Gets the OS disk of the VM captured at the time of the restore point creation.
	OSDisk *RestorePointSourceVMOSDisk `json:"osDisk,omitempty"`
}

RestorePointSourceVMStorageProfile - Describes the storage profile.

func (RestorePointSourceVMStorageProfile) MarshalJSON

func (r RestorePointSourceVMStorageProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestorePointSourceVMStorageProfile.

type RestorePointsClient

type RestorePointsClient struct {
	// contains filtered or unexported fields
}

RestorePointsClient contains the methods for the RestorePoints group. Don't use this type directly, use NewRestorePointsClient() instead.

func NewRestorePointsClient

func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointsClient, error)

NewRestorePointsClient creates a new instance of RestorePointsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorePointsClient) BeginCreate

func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint, options *RestorePointsClientBeginCreateOptions) (*runtime.Poller[RestorePointsClientCreateResponse], error)

BeginCreate - The operation to create the restore point. Updating properties of an existing restore point is not allowed If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection. restorePointName - The name of the restore point. parameters - Parameters supplied to the Create restore point operation. options - RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePoint_Copy_BetweenRegions.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"myResourceGroup",
		"rpcName",
		"rpName",
		armcompute.RestorePoint{
			Properties: &armcompute.RestorePointProperties{
				SourceRestorePoint: &armcompute.APIEntityReference{
					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName"),
				},
			},
		},
		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)
	}
}
Output:

func (*RestorePointsClient) BeginDelete

func (client *RestorePointsClient) BeginDelete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientBeginDeleteOptions) (*runtime.Poller[RestorePointsClientDeleteResponse], error)

BeginDelete - The operation to delete the restore point. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the Restore Point Collection. restorePointName - The name of the restore point. options - RestorePointsClientBeginDeleteOptions contains the optional parameters for the RestorePointsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePoints_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaa",
		"a",
		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)
	}
}
Output:

func (*RestorePointsClient) Get

func (client *RestorePointsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientGetOptions) (RestorePointsClientGetResponse, error)

Get - The operation to get the restore point. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. restorePointCollectionName - The name of the restore point collection. restorePointName - The name of the restore point. options - RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/restorePointExamples/RestorePoint_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewRestorePointsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"rpcName",
		"rpName",
		&armcompute.RestorePointsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type RestorePointsClientBeginCreateOptions added in v0.3.0

type RestorePointsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.

type RestorePointsClientBeginDeleteOptions added in v0.3.0

type RestorePointsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RestorePointsClientBeginDeleteOptions contains the optional parameters for the RestorePointsClient.BeginDelete method.

type RestorePointsClientCreateResponse added in v0.3.0

type RestorePointsClientCreateResponse struct {
	RestorePoint
}

RestorePointsClientCreateResponse contains the response from method RestorePointsClient.Create.

type RestorePointsClientDeleteResponse added in v0.3.0

type RestorePointsClientDeleteResponse struct {
}

RestorePointsClientDeleteResponse contains the response from method RestorePointsClient.Delete.

type RestorePointsClientGetOptions added in v0.3.0

type RestorePointsClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' retrieves information about the run-time state of a restore
	// point.
	Expand *RestorePointExpandOptions
}

RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.

type RestorePointsClientGetResponse added in v0.3.0

type RestorePointsClientGetResponse struct {
	RestorePoint
}

RestorePointsClientGetResponse contains the response from method RestorePointsClient.Get.

type RetrieveBootDiagnosticsDataResult

type RetrieveBootDiagnosticsDataResult struct {
	// READ-ONLY; The console screenshot blob URI
	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty" azure:"ro"`

	// READ-ONLY; The serial console log blob URI.
	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty" azure:"ro"`
}

RetrieveBootDiagnosticsDataResult - The SAS URIs of the console screenshot and serial log blobs.

type RoleInstance

type RoleInstance struct {
	Properties *RoleInstanceProperties `json:"properties,omitempty"`
	SKU        *InstanceSKU            `json:"sku,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource Location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource Name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags,omitempty" azure:"ro"`

	// READ-ONLY; Resource Type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

type RoleInstanceListResult

type RoleInstanceListResult struct {
	// REQUIRED
	Value    []*RoleInstance `json:"value,omitempty"`
	NextLink *string         `json:"nextLink,omitempty"`
}

type RoleInstanceNetworkProfile

type RoleInstanceNetworkProfile struct {
	// READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance.
	NetworkInterfaces []*SubResource `json:"networkInterfaces,omitempty" azure:"ro"`
}

RoleInstanceNetworkProfile - Describes the network profile for the role instance.

type RoleInstanceProperties

type RoleInstanceProperties struct {
	// The instance view of the role instance.
	InstanceView *RoleInstanceView `json:"instanceView,omitempty"`

	// Describes the network profile for the role instance.
	NetworkProfile *RoleInstanceNetworkProfile `json:"networkProfile,omitempty"`
}

type RoleInstanceView

type RoleInstanceView struct {
	// READ-ONLY; The Fault Domain.
	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty" azure:"ro"`

	// READ-ONLY; The Update Domain.
	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty" azure:"ro"`

	// READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance.
	// NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
	PrivateID *string `json:"privateId,omitempty" azure:"ro"`

	// READ-ONLY
	Statuses []*ResourceInstanceViewStatus `json:"statuses,omitempty" azure:"ro"`
}

RoleInstanceView - The instance view of the role instance.

type RoleInstances

type RoleInstances struct {
	// REQUIRED; List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.
	RoleInstances []*string `json:"roleInstances,omitempty"`
}

RoleInstances - Specifies a list of role instances from the cloud service.

func (RoleInstances) MarshalJSON

func (r RoleInstances) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleInstances.

type RollbackStatusInfo

type RollbackStatusInfo struct {
	// READ-ONLY; The number of instances which failed to rollback.
	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty" azure:"ro"`

	// READ-ONLY; Error details if OS rollback failed.
	RollbackError *APIError `json:"rollbackError,omitempty" azure:"ro"`

	// READ-ONLY; The number of instances which have been successfully rolled back.
	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty" azure:"ro"`
}

RollbackStatusInfo - Information about rollback on failed VM instances after a OS Upgrade operation.

type RollingUpgradeActionType

type RollingUpgradeActionType string

RollingUpgradeActionType - The last action performed on the rolling upgrade.

const (
	RollingUpgradeActionTypeStart  RollingUpgradeActionType = "Start"
	RollingUpgradeActionTypeCancel RollingUpgradeActionType = "Cancel"
)

func PossibleRollingUpgradeActionTypeValues

func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType

PossibleRollingUpgradeActionTypeValues returns the possible values for the RollingUpgradeActionType const type.

type RollingUpgradePolicy

type RollingUpgradePolicy struct {
	// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent
	// to determine the batch size.
	EnableCrossZoneUpgrade *bool `json:"enableCrossZoneUpgrade,omitempty"`

	// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one
	// batch. As this is a maximum, unhealthy instances in previous or future batches
	// can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter
	// is 20%.
	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`

	// The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either
	// as a result of being upgraded, or by being found in an unhealthy state by
	// the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting
	// any batch. The default value for this parameter is 20%.
	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`

	// The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check
	// will happen after each batch is upgraded. If this percentage is ever exceeded,
	// the rolling update aborts. The default value for this parameter is 20%.
	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`

	// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time
	// duration should be specified in ISO 8601 format. The default value is 0 seconds
	// (PT0S).
	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`

	// Upgrade all unhealthy instances in a scale set before any healthy instances.
	PrioritizeUnhealthyInstances *bool `json:"prioritizeUnhealthyInstances,omitempty"`
}

RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.

type RollingUpgradeProgressInfo

type RollingUpgradeProgressInfo struct {
	// READ-ONLY; The number of instances that have failed to be upgraded successfully.
	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty" azure:"ro"`

	// READ-ONLY; The number of instances that are currently being upgraded.
	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty" azure:"ro"`

	// READ-ONLY; The number of instances that have not yet begun to be upgraded.
	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty" azure:"ro"`

	// READ-ONLY; The number of instances that have been successfully upgraded.
	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty" azure:"ro"`
}

RollingUpgradeProgressInfo - Information about the number of virtual machine instances in each upgrade state.

type RollingUpgradeRunningStatus

type RollingUpgradeRunningStatus struct {
	// READ-ONLY; Code indicating the current status of the upgrade.
	Code *RollingUpgradeStatusCode `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The last action performed on the rolling upgrade.
	LastAction *RollingUpgradeActionType `json:"lastAction,omitempty" azure:"ro"`

	// READ-ONLY; Last action time of the upgrade.
	LastActionTime *time.Time `json:"lastActionTime,omitempty" azure:"ro"`

	// READ-ONLY; Start time of the upgrade.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`
}

RollingUpgradeRunningStatus - Information about the current running state of the overall upgrade.

func (RollingUpgradeRunningStatus) MarshalJSON

func (r RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RollingUpgradeRunningStatus.

func (*RollingUpgradeRunningStatus) UnmarshalJSON

func (r *RollingUpgradeRunningStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradeRunningStatus.

type RollingUpgradeStatusCode

type RollingUpgradeStatusCode string

RollingUpgradeStatusCode - Code indicating the current status of the upgrade.

const (
	RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward"
	RollingUpgradeStatusCodeCancelled      RollingUpgradeStatusCode = "Cancelled"
	RollingUpgradeStatusCodeCompleted      RollingUpgradeStatusCode = "Completed"
	RollingUpgradeStatusCodeFaulted        RollingUpgradeStatusCode = "Faulted"
)

func PossibleRollingUpgradeStatusCodeValues

func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode

PossibleRollingUpgradeStatusCodeValues returns the possible values for the RollingUpgradeStatusCode const type.

type RollingUpgradeStatusInfo

type RollingUpgradeStatusInfo struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The status of the latest virtual machine scale set rolling upgrade.
	Properties *RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RollingUpgradeStatusInfo - The status of the latest virtual machine scale set rolling upgrade.

func (RollingUpgradeStatusInfo) MarshalJSON

func (r RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RollingUpgradeStatusInfo.

type RollingUpgradeStatusInfoProperties

type RollingUpgradeStatusInfoProperties struct {
	// READ-ONLY; Error details for this upgrade, if there are any.
	Error *APIError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; The rolling upgrade policies applied for this upgrade.
	Policy *RollingUpgradePolicy `json:"policy,omitempty" azure:"ro"`

	// READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty" azure:"ro"`

	// READ-ONLY; Information about the current running state of the overall upgrade.
	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty" azure:"ro"`
}

RollingUpgradeStatusInfoProperties - The status of the latest virtual machine scale set rolling upgrade.

type RunCommandDocument

type RunCommandDocument struct {
	// REQUIRED; The VM run command description.
	Description *string `json:"description,omitempty"`

	// REQUIRED; The VM run command id.
	ID *string `json:"id,omitempty"`

	// REQUIRED; The VM run command label.
	Label *string `json:"label,omitempty"`

	// REQUIRED; The Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// REQUIRED; The VM run command schema.
	Schema *string `json:"$schema,omitempty"`

	// REQUIRED; The script to be executed.
	Script []*string `json:"script,omitempty"`

	// The parameters used by the script.
	Parameters []*RunCommandParameterDefinition `json:"parameters,omitempty"`
}

RunCommandDocument - Describes the properties of a Run Command.

type RunCommandDocumentBase

type RunCommandDocumentBase struct {
	// REQUIRED; The VM run command description.
	Description *string `json:"description,omitempty"`

	// REQUIRED; The VM run command id.
	ID *string `json:"id,omitempty"`

	// REQUIRED; The VM run command label.
	Label *string `json:"label,omitempty"`

	// REQUIRED; The Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// REQUIRED; The VM run command schema.
	Schema *string `json:"$schema,omitempty"`
}

RunCommandDocumentBase - Describes the properties of a Run Command metadata.

type RunCommandInput

type RunCommandInput struct {
	// REQUIRED; The run command id.
	CommandID *string `json:"commandId,omitempty"`

	// The run command parameters.
	Parameters []*RunCommandInputParameter `json:"parameters,omitempty"`

	// Optional. The script to be executed. When this value is given, the given script will override the default script of the
	// command.
	Script []*string `json:"script,omitempty"`
}

RunCommandInput - Capture Virtual Machine parameters.

func (RunCommandInput) MarshalJSON

func (r RunCommandInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RunCommandInput.

type RunCommandInputParameter

type RunCommandInputParameter struct {
	// REQUIRED; The run command parameter name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The run command parameter value.
	Value *string `json:"value,omitempty"`
}

RunCommandInputParameter - Describes the properties of a run command parameter.

type RunCommandListResult

type RunCommandListResult struct {
	// REQUIRED; The list of virtual machine run commands.
	Value []*RunCommandDocumentBase `json:"value,omitempty"`

	// The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
	NextLink *string `json:"nextLink,omitempty"`
}

RunCommandListResult - The List Virtual Machine operation response.

type RunCommandParameterDefinition

type RunCommandParameterDefinition struct {
	// REQUIRED; The run command parameter name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The run command parameter type.
	Type *string `json:"type,omitempty"`

	// The run command parameter default value.
	DefaultValue *string `json:"defaultValue,omitempty"`

	// The run command parameter required.
	Required *bool `json:"required,omitempty"`
}

RunCommandParameterDefinition - Describes the properties of a run command parameter.

type RunCommandResult

type RunCommandResult struct {
	// Run command operation response.
	Value []*InstanceViewStatus `json:"value,omitempty"`
}

type SKU

type SKU struct {
	// Specifies the number of virtual machines in the scale set.
	Capacity *int64 `json:"capacity,omitempty"`

	// The sku name.
	Name *string `json:"name,omitempty"`

	// Specifies the tier of virtual machines in a scale set.
	// Possible Values:
	// Standard
	// Basic
	Tier *string `json:"tier,omitempty"`
}

SKU - Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.

type SSHConfiguration

type SSHConfiguration struct {
	// The list of SSH public keys used to authenticate with linux based VMs.
	PublicKeys []*SSHPublicKey `json:"publicKeys,omitempty"`
}

SSHConfiguration - SSH configuration for Linux based VMs running on Azure

func (SSHConfiguration) MarshalJSON

func (s SSHConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SSHConfiguration.

type SSHPublicKey

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).
	KeyData *string `json:"keyData,omitempty"`

	// Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key
	// is appended to the file. Example: /home/user/.ssh/authorized_keys
	Path *string `json:"path,omitempty"`
}

SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.

type SSHPublicKeyGenerateKeyPairResult

type SSHPublicKeyGenerateKeyPairResult struct {
	// REQUIRED; The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
	ID *string `json:"id,omitempty"`

	// REQUIRED; Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is
	// returned in RFC3447 format and should be treated as a secret.
	PrivateKey *string `json:"privateKey,omitempty"`

	// REQUIRED; Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in
	// ssh-rsa format.
	PublicKey *string `json:"publicKey,omitempty"`
}

SSHPublicKeyGenerateKeyPairResult - Response from generation of an SSH key pair.

type SSHPublicKeyResource

type SSHPublicKeyResource struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Properties of the SSH public key.
	Properties *SSHPublicKeyResourceProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

SSHPublicKeyResource - Specifies information about the SSH public key.

func (SSHPublicKeyResource) MarshalJSON

func (s SSHPublicKeyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyResource.

type SSHPublicKeyResourceProperties

type SSHPublicKeyResourceProperties struct {
	// SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the
	// resource is created, the publicKey property will be populated when
	// generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at
	// least 2048-bit and in ssh-rsa format.
	PublicKey *string `json:"publicKey,omitempty"`
}

SSHPublicKeyResourceProperties - Properties of the SSH public key.

type SSHPublicKeyUpdateResource

type SSHPublicKeyUpdateResource struct {
	// Properties of the SSH public key.
	Properties *SSHPublicKeyResourceProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

SSHPublicKeyUpdateResource - Specifies information about the SSH public key.

func (SSHPublicKeyUpdateResource) MarshalJSON

func (s SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyUpdateResource.

type SSHPublicKeysClient

type SSHPublicKeysClient struct {
	// contains filtered or unexported fields
}

SSHPublicKeysClient contains the methods for the SSHPublicKeys group. Don't use this type directly, use NewSSHPublicKeysClient() instead.

func NewSSHPublicKeysClient

func NewSSHPublicKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SSHPublicKeysClient, error)

NewSSHPublicKeysClient creates a new instance of SSHPublicKeysClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SSHPublicKeysClient) Create

func (client *SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, sshPublicKeyName string, parameters SSHPublicKeyResource, options *SSHPublicKeysClientCreateOptions) (SSHPublicKeysClientCreateResponse, error)

Create - Creates a new SSH public key resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. sshPublicKeyName - The name of the SSH public key. parameters - Parameters supplied to create the SSH public key. options - SSHPublicKeysClientCreateOptions contains the optional parameters for the SSHPublicKeysClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKey_Create.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"myResourceGroup",
		"mySshPublicKeyName",
		armcompute.SSHPublicKeyResource{
			Location: to.Ptr("westus"),
			Properties: &armcompute.SSHPublicKeyResourceProperties{
				PublicKey: to.Ptr("{ssh-rsa public key}"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SSHPublicKeysClient) Delete

func (client *SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientDeleteOptions) (SSHPublicKeysClientDeleteResponse, error)

Delete - Delete an SSH public key. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. sshPublicKeyName - The name of the SSH public key. options - SSHPublicKeysClientDeleteOptions contains the optional parameters for the SSHPublicKeysClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKeys_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rgcompute",
		"aaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*SSHPublicKeysClient) GenerateKeyPair

func (client *SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientGenerateKeyPairOptions) (SSHPublicKeysClientGenerateKeyPairResponse, error)

GenerateKeyPair - Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. sshPublicKeyName - The name of the SSH public key. options - SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKeys_GenerateKeyPair.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GenerateKeyPair(ctx,
		"myResourceGroup",
		"mySshPublicKeyName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SSHPublicKeysClient) Get

func (client *SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientGetOptions) (SSHPublicKeysClientGetResponse, error)

Get - Retrieves information about an SSH public key. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. sshPublicKeyName - The name of the SSH public key. options - SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKey_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"mySshPublicKeyName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SSHPublicKeysClient) NewListByResourceGroupPager added in v0.7.0

NewListByResourceGroupPager - Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - SSHPublicKeysClientListByResourceGroupOptions contains the optional parameters for the SSHPublicKeysClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKeys_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("rgcompute",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SSHPublicKeysClient) NewListBySubscriptionPager added in v0.7.0

NewListBySubscriptionPager - Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - SSHPublicKeysClientListBySubscriptionOptions contains the optional parameters for the SSHPublicKeysClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKeys_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SSHPublicKeysClient) Update

func (client *SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, sshPublicKeyName string, parameters SSHPublicKeyUpdateResource, options *SSHPublicKeysClientUpdateOptions) (SSHPublicKeysClientUpdateResponse, error)

Update - Updates a new SSH public key resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. sshPublicKeyName - The name of the SSH public key. parameters - Parameters supplied to update the SSH public key. options - SSHPublicKeysClientUpdateOptions contains the optional parameters for the SSHPublicKeysClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/sshPublicKeyExamples/SshPublicKeys_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSSHPublicKeysClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"rgcompute",
		"aaaaaaaaaaaa",
		armcompute.SSHPublicKeyUpdateResource{
			Tags: map[string]*string{
				"key2854": to.Ptr("a"),
			},
			Properties: &armcompute.SSHPublicKeyResourceProperties{
				PublicKey: to.Ptr("{ssh-rsa public key}"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SSHPublicKeysClientCreateOptions added in v0.3.0

type SSHPublicKeysClientCreateOptions struct {
}

SSHPublicKeysClientCreateOptions contains the optional parameters for the SSHPublicKeysClient.Create method.

type SSHPublicKeysClientCreateResponse added in v0.3.0

type SSHPublicKeysClientCreateResponse struct {
	SSHPublicKeyResource
}

SSHPublicKeysClientCreateResponse contains the response from method SSHPublicKeysClient.Create.

type SSHPublicKeysClientDeleteOptions added in v0.3.0

type SSHPublicKeysClientDeleteOptions struct {
}

SSHPublicKeysClientDeleteOptions contains the optional parameters for the SSHPublicKeysClient.Delete method.

type SSHPublicKeysClientDeleteResponse added in v0.3.0

type SSHPublicKeysClientDeleteResponse struct {
}

SSHPublicKeysClientDeleteResponse contains the response from method SSHPublicKeysClient.Delete.

type SSHPublicKeysClientGenerateKeyPairOptions added in v0.3.0

type SSHPublicKeysClientGenerateKeyPairOptions struct {
}

SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair method.

type SSHPublicKeysClientGenerateKeyPairResponse added in v0.3.0

type SSHPublicKeysClientGenerateKeyPairResponse struct {
	SSHPublicKeyGenerateKeyPairResult
}

SSHPublicKeysClientGenerateKeyPairResponse contains the response from method SSHPublicKeysClient.GenerateKeyPair.

type SSHPublicKeysClientGetOptions added in v0.3.0

type SSHPublicKeysClientGetOptions struct {
}

SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.

type SSHPublicKeysClientGetResponse added in v0.3.0

type SSHPublicKeysClientGetResponse struct {
	SSHPublicKeyResource
}

SSHPublicKeysClientGetResponse contains the response from method SSHPublicKeysClient.Get.

type SSHPublicKeysClientListByResourceGroupOptions added in v0.3.0

type SSHPublicKeysClientListByResourceGroupOptions struct {
}

SSHPublicKeysClientListByResourceGroupOptions contains the optional parameters for the SSHPublicKeysClient.ListByResourceGroup method.

type SSHPublicKeysClientListByResourceGroupResponse added in v0.3.0

type SSHPublicKeysClientListByResourceGroupResponse struct {
	SSHPublicKeysGroupListResult
}

SSHPublicKeysClientListByResourceGroupResponse contains the response from method SSHPublicKeysClient.ListByResourceGroup.

type SSHPublicKeysClientListBySubscriptionOptions added in v0.3.0

type SSHPublicKeysClientListBySubscriptionOptions struct {
}

SSHPublicKeysClientListBySubscriptionOptions contains the optional parameters for the SSHPublicKeysClient.ListBySubscription method.

type SSHPublicKeysClientListBySubscriptionResponse added in v0.3.0

type SSHPublicKeysClientListBySubscriptionResponse struct {
	SSHPublicKeysGroupListResult
}

SSHPublicKeysClientListBySubscriptionResponse contains the response from method SSHPublicKeysClient.ListBySubscription.

type SSHPublicKeysClientUpdateOptions added in v0.3.0

type SSHPublicKeysClientUpdateOptions struct {
}

SSHPublicKeysClientUpdateOptions contains the optional parameters for the SSHPublicKeysClient.Update method.

type SSHPublicKeysClientUpdateResponse added in v0.3.0

type SSHPublicKeysClientUpdateResponse struct {
	SSHPublicKeyResource
}

SSHPublicKeysClientUpdateResponse contains the response from method SSHPublicKeysClient.Update.

type SSHPublicKeysGroupListResult

type SSHPublicKeysGroupListResult struct {
	// REQUIRED; The list of SSH public keys
	Value []*SSHPublicKeyResource `json:"value,omitempty"`

	// The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
	NextLink *string `json:"nextLink,omitempty"`
}

SSHPublicKeysGroupListResult - The list SSH public keys operation response.

type ScaleInPolicy

type ScaleInPolicy struct {
	// This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine
	// scale set is being scaled-in.(Feature in Preview)
	ForceDeletion *bool `json:"forceDeletion,omitempty"`

	// The rules to be followed when scaling-in a virtual machine scale set.
	// Possible values are:
	// Default When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal
	// scale set. Then, it will be balanced across Fault Domains as far as possible.
	// Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.
	// OldestVM When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in
	// will be chosen for removal. For zonal virtual machine scale sets, the
	// scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will
	// be chosen for removal.
	// NewestVM When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in
	// will be chosen for removal. For zonal virtual machine scale sets, the
	// scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will
	// be chosen for removal.
	Rules []*VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
}

ScaleInPolicy - Describes a scale-in policy for a virtual machine scale set.

func (ScaleInPolicy) MarshalJSON

func (s ScaleInPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScaleInPolicy.

type ScheduledEventsProfile

type ScheduledEventsProfile struct {
	// Specifies Terminate Scheduled Event related configurations.
	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
}

type SecurityEncryptionTypes added in v0.4.0

type SecurityEncryptionTypes string

SecurityEncryptionTypes - Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. NOTE: It can be set for only Confidential VMs.

const (
	SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState"
	SecurityEncryptionTypesVMGuestStateOnly     SecurityEncryptionTypes = "VMGuestStateOnly"
)

func PossibleSecurityEncryptionTypesValues added in v0.4.0

func PossibleSecurityEncryptionTypesValues() []SecurityEncryptionTypes

PossibleSecurityEncryptionTypesValues returns the possible values for the SecurityEncryptionTypes const type.

type SecurityProfile

type SecurityProfile struct {
	// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual
	// machine scale set. This will enable the encryption for all the disks
	// including Resource/Temp disk at host itself.
	// Default: The Encryption at host will be disabled unless this property is set to true for the resource.
	EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`

	// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.
	// Default: UefiSettings will not be enabled unless this property is set.
	SecurityType *SecurityTypes `json:"securityType,omitempty"`

	// Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
	// Minimum api-version: 2020-12-01
	UefiSettings *UefiSettings `json:"uefiSettings,omitempty"`
}

SecurityProfile - Specifies the Security profile settings for the virtual machine or virtual machine scale set.

type SecurityTypes

type SecurityTypes string

SecurityTypes - Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. Default: UefiSettings will not be enabled unless this property is set.

const (
	SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM"
	SecurityTypesTrustedLaunch  SecurityTypes = "TrustedLaunch"
)

func PossibleSecurityTypesValues

func PossibleSecurityTypesValues() []SecurityTypes

PossibleSecurityTypesValues returns the possible values for the SecurityTypes const type.

type SelectPermissions

type SelectPermissions string
const (
	SelectPermissionsPermissions SelectPermissions = "Permissions"
)

func PossibleSelectPermissionsValues

func PossibleSelectPermissionsValues() []SelectPermissions

PossibleSelectPermissionsValues returns the possible values for the SelectPermissions const type.

type SettingNames

type SettingNames string

SettingNames - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.

const (
	SettingNamesAutoLogon          SettingNames = "AutoLogon"
	SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands"
)

func PossibleSettingNamesValues

func PossibleSettingNamesValues() []SettingNames

PossibleSettingNamesValues returns the possible values for the SettingNames const type.

type ShareInfoElement

type ShareInfoElement struct {
	// READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
	VMURI *string `json:"vmUri,omitempty" azure:"ro"`
}

type SharedGalleriesClient

type SharedGalleriesClient struct {
	// contains filtered or unexported fields
}

SharedGalleriesClient contains the methods for the SharedGalleries group. Don't use this type directly, use NewSharedGalleriesClient() instead.

func NewSharedGalleriesClient

func NewSharedGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleriesClient, error)

NewSharedGalleriesClient creates a new instance of SharedGalleriesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SharedGalleriesClient) Get

Get - Get a shared gallery by subscription id or tenant id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. galleryUniqueName - The unique name of the Shared Gallery. options - SharedGalleriesClientGetOptions contains the optional parameters for the SharedGalleriesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/sharedGallery/GetASharedGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSharedGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myLocation",
		"galleryUniqueName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SharedGalleriesClient) NewListPager added in v0.7.0

NewListPager - List shared galleries by subscription id or tenant id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. options - SharedGalleriesClientListOptions contains the optional parameters for the SharedGalleriesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/sharedGallery/ListSharedGalleries.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSharedGalleriesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myLocation",
		&armcompute.SharedGalleriesClientListOptions{SharedTo: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SharedGalleriesClientGetOptions added in v0.3.0

type SharedGalleriesClientGetOptions struct {
}

SharedGalleriesClientGetOptions contains the optional parameters for the SharedGalleriesClient.Get method.

type SharedGalleriesClientGetResponse added in v0.3.0

type SharedGalleriesClientGetResponse struct {
	SharedGallery
}

SharedGalleriesClientGetResponse contains the response from method SharedGalleriesClient.Get.

type SharedGalleriesClientListOptions added in v0.3.0

type SharedGalleriesClientListOptions struct {
	// The query parameter to decide what shared galleries to fetch when doing listing operations.
	SharedTo *SharedToValues
}

SharedGalleriesClientListOptions contains the optional parameters for the SharedGalleriesClient.List method.

type SharedGalleriesClientListResponse added in v0.3.0

type SharedGalleriesClientListResponse struct {
	SharedGalleryList
}

SharedGalleriesClientListResponse contains the response from method SharedGalleriesClient.List.

type SharedGallery

type SharedGallery struct {
	// The identifier information of shared gallery.
	Identifier *SharedGalleryIdentifier `json:"identifier,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`
}

SharedGallery - Specifies information about the Shared Gallery that you want to create or update.

type SharedGalleryIdentifier

type SharedGalleryIdentifier struct {
	// The unique id of this shared gallery.
	UniqueID *string `json:"uniqueId,omitempty"`
}

SharedGalleryIdentifier - The identifier information of shared gallery.

type SharedGalleryImage

type SharedGalleryImage struct {
	// The identifier information of shared gallery.
	Identifier *SharedGalleryIdentifier `json:"identifier,omitempty"`

	// Describes the properties of a gallery image definition.
	Properties *SharedGalleryImageProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`
}

SharedGalleryImage - Specifies information about the gallery image definition that you want to create or update.

type SharedGalleryImageList

type SharedGalleryImageList struct {
	// REQUIRED; A list of shared gallery images.
	Value []*SharedGalleryImage `json:"value,omitempty"`

	// The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch the next page of shared gallery
	// images.
	NextLink *string `json:"nextLink,omitempty"`
}

SharedGalleryImageList - The List Shared Gallery Images operation response.

type SharedGalleryImageProperties

type SharedGalleryImageProperties struct {
	// REQUIRED; This is the gallery image definition identifier.
	Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`

	// REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized'
	// or 'Specialized'.
	OSState *OperatingSystemStateTypes `json:"osState,omitempty"`

	// REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
	// managed image.
	// Possible values are:
	// Windows
	// Linux
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Describes the disallowed disk types.
	Disallowed *Disallowed `json:"disallowed,omitempty"`

	// The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
	// is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// A list of gallery image features.
	Features []*GalleryImageFeature `json:"features,omitempty"`

	// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// Describes the gallery image definition purchase plan. This is used by marketplace images.
	PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`

	// The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
	Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
}

SharedGalleryImageProperties - Describes the properties of a gallery image definition.

func (*SharedGalleryImageProperties) UnmarshalJSON

func (s *SharedGalleryImageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageProperties.

type SharedGalleryImageVersion

type SharedGalleryImageVersion struct {
	// The identifier information of shared gallery.
	Identifier *SharedGalleryIdentifier `json:"identifier,omitempty"`

	// Describes the properties of a gallery image version.
	Properties *SharedGalleryImageVersionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`
}

SharedGalleryImageVersion - Specifies information about the gallery image version that you want to create or update.

type SharedGalleryImageVersionList

type SharedGalleryImageVersionList struct {
	// REQUIRED; A list of shared gallery images versions.
	Value []*SharedGalleryImageVersion `json:"value,omitempty"`

	// The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to fetch the next page of shared
	// gallery image versions.
	NextLink *string `json:"nextLink,omitempty"`
}

SharedGalleryImageVersionList - The List Shared Gallery Image versions operation response.

type SharedGalleryImageVersionProperties

type SharedGalleryImageVersionProperties struct {
	// The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This
	// property is updatable.
	EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"`

	// The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This
	// property is updatable.
	PublishedDate *time.Time `json:"publishedDate,omitempty"`
}

SharedGalleryImageVersionProperties - Describes the properties of a gallery image version.

func (*SharedGalleryImageVersionProperties) UnmarshalJSON

func (s *SharedGalleryImageVersionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageVersionProperties.

type SharedGalleryImageVersionsClient

type SharedGalleryImageVersionsClient struct {
	// contains filtered or unexported fields
}

SharedGalleryImageVersionsClient contains the methods for the SharedGalleryImageVersions group. Don't use this type directly, use NewSharedGalleryImageVersionsClient() instead.

func NewSharedGalleryImageVersionsClient

func NewSharedGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleryImageVersionsClient, error)

NewSharedGalleryImageVersionsClient creates a new instance of SharedGalleryImageVersionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SharedGalleryImageVersionsClient) Get

func (client *SharedGalleryImageVersionsClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string, options *SharedGalleryImageVersionsClientGetOptions) (SharedGalleryImageVersionsClientGetResponse, error)

Get - Get a shared gallery image version by subscription id or tenant id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. galleryUniqueName - The unique name of the Shared Gallery. galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. galleryImageVersionName - The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. options - SharedGalleryImageVersionsClientGetOptions contains the optional parameters for the SharedGalleryImageVersionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/sharedGallery/GetASharedGalleryImageVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSharedGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myLocation",
		"galleryUniqueName",
		"myGalleryImageName",
		"myGalleryImageVersionName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SharedGalleryImageVersionsClient) NewListPager added in v0.7.0

NewListPager - List shared gallery image versions by subscription id or tenant id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. galleryUniqueName - The unique name of the Shared Gallery. galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. options - SharedGalleryImageVersionsClientListOptions contains the optional parameters for the SharedGalleryImageVersionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/sharedGallery/ListSharedGalleryImageVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSharedGalleryImageVersionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myLocation",
		"galleryUniqueName",
		"myGalleryImageName",
		&armcompute.SharedGalleryImageVersionsClientListOptions{SharedTo: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SharedGalleryImageVersionsClientGetOptions added in v0.3.0

type SharedGalleryImageVersionsClientGetOptions struct {
}

SharedGalleryImageVersionsClientGetOptions contains the optional parameters for the SharedGalleryImageVersionsClient.Get method.

type SharedGalleryImageVersionsClientGetResponse added in v0.3.0

type SharedGalleryImageVersionsClientGetResponse struct {
	SharedGalleryImageVersion
}

SharedGalleryImageVersionsClientGetResponse contains the response from method SharedGalleryImageVersionsClient.Get.

type SharedGalleryImageVersionsClientListOptions added in v0.3.0

type SharedGalleryImageVersionsClientListOptions struct {
	// The query parameter to decide what shared galleries to fetch when doing listing operations.
	SharedTo *SharedToValues
}

SharedGalleryImageVersionsClientListOptions contains the optional parameters for the SharedGalleryImageVersionsClient.List method.

type SharedGalleryImageVersionsClientListResponse added in v0.3.0

type SharedGalleryImageVersionsClientListResponse struct {
	SharedGalleryImageVersionList
}

SharedGalleryImageVersionsClientListResponse contains the response from method SharedGalleryImageVersionsClient.List.

type SharedGalleryImagesClient

type SharedGalleryImagesClient struct {
	// contains filtered or unexported fields
}

SharedGalleryImagesClient contains the methods for the SharedGalleryImages group. Don't use this type directly, use NewSharedGalleryImagesClient() instead.

func NewSharedGalleryImagesClient

func NewSharedGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleryImagesClient, error)

NewSharedGalleryImagesClient creates a new instance of SharedGalleryImagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SharedGalleryImagesClient) Get

func (client *SharedGalleryImagesClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, options *SharedGalleryImagesClientGetOptions) (SharedGalleryImagesClientGetResponse, error)

Get - Get a shared gallery image by subscription id or tenant id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. galleryUniqueName - The unique name of the Shared Gallery. galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. options - SharedGalleryImagesClientGetOptions contains the optional parameters for the SharedGalleryImagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/sharedGallery/GetASharedGalleryImage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSharedGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myLocation",
		"galleryUniqueName",
		"myGalleryImageName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SharedGalleryImagesClient) NewListPager added in v0.7.0

NewListPager - List shared gallery images by subscription id or tenant id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 location - Resource location. galleryUniqueName - The unique name of the Shared Gallery. options - SharedGalleryImagesClientListOptions contains the optional parameters for the SharedGalleryImagesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/sharedGallery/ListSharedGalleryImages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSharedGalleryImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myLocation",
		"galleryUniqueName",
		&armcompute.SharedGalleryImagesClientListOptions{SharedTo: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SharedGalleryImagesClientGetOptions added in v0.3.0

type SharedGalleryImagesClientGetOptions struct {
}

SharedGalleryImagesClientGetOptions contains the optional parameters for the SharedGalleryImagesClient.Get method.

type SharedGalleryImagesClientGetResponse added in v0.3.0

type SharedGalleryImagesClientGetResponse struct {
	SharedGalleryImage
}

SharedGalleryImagesClientGetResponse contains the response from method SharedGalleryImagesClient.Get.

type SharedGalleryImagesClientListOptions added in v0.3.0

type SharedGalleryImagesClientListOptions struct {
	// The query parameter to decide what shared galleries to fetch when doing listing operations.
	SharedTo *SharedToValues
}

SharedGalleryImagesClientListOptions contains the optional parameters for the SharedGalleryImagesClient.List method.

type SharedGalleryImagesClientListResponse added in v0.3.0

type SharedGalleryImagesClientListResponse struct {
	SharedGalleryImageList
}

SharedGalleryImagesClientListResponse contains the response from method SharedGalleryImagesClient.List.

type SharedGalleryList

type SharedGalleryList struct {
	// REQUIRED; A list of shared galleries.
	Value []*SharedGallery `json:"value,omitempty"`

	// The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the next page of shared galleries.
	NextLink *string `json:"nextLink,omitempty"`
}

SharedGalleryList - The List Shared Galleries operation response.

type SharedToValues

type SharedToValues string
const (
	SharedToValuesTenant SharedToValues = "tenant"
)

func PossibleSharedToValuesValues

func PossibleSharedToValuesValues() []SharedToValues

PossibleSharedToValuesValues returns the possible values for the SharedToValues const type.

type SharingProfile

type SharingProfile struct {
	// Information of community gallery if current gallery is shared to community.
	CommunityGalleryInfo interface{} `json:"communityGalleryInfo,omitempty"`

	// This property allows you to specify the permission of sharing gallery.
	// Possible values are:
	// Private
	// Groups
	Permissions *GallerySharingPermissionTypes `json:"permissions,omitempty"`

	// READ-ONLY; A list of sharing profile groups.
	Groups []*SharingProfileGroup `json:"groups,omitempty" azure:"ro"`
}

SharingProfile - Profile for gallery sharing to subscription or tenant

func (SharingProfile) MarshalJSON

func (s SharingProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SharingProfile.

type SharingProfileGroup

type SharingProfileGroup struct {
	// A list of subscription/tenant ids the gallery is aimed to be shared to.
	IDs []*string `json:"ids,omitempty"`

	// This property allows you to specify the type of sharing group.
	// Possible values are:
	// Subscriptions
	// AADTenants
	// Community
	Type *SharingProfileGroupTypes `json:"type,omitempty"`
}

SharingProfileGroup - Group of the gallery sharing profile

func (SharingProfileGroup) MarshalJSON

func (s SharingProfileGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SharingProfileGroup.

type SharingProfileGroupTypes

type SharingProfileGroupTypes string

SharingProfileGroupTypes - This property allows you to specify the type of sharing group. Possible values are: Subscriptions AADTenants Community

const (
	SharingProfileGroupTypesAADTenants    SharingProfileGroupTypes = "AADTenants"
	SharingProfileGroupTypesCommunity     SharingProfileGroupTypes = "Community"
	SharingProfileGroupTypesSubscriptions SharingProfileGroupTypes = "Subscriptions"
)

func PossibleSharingProfileGroupTypesValues

func PossibleSharingProfileGroupTypesValues() []SharingProfileGroupTypes

PossibleSharingProfileGroupTypesValues returns the possible values for the SharingProfileGroupTypes const type.

type SharingState added in v0.4.0

type SharingState string

SharingState - The sharing state of the gallery, which only appears in the response.

const (
	SharingStateFailed     SharingState = "Failed"
	SharingStateInProgress SharingState = "InProgress"
	SharingStateSucceeded  SharingState = "Succeeded"
	SharingStateUnknown    SharingState = "Unknown"
)

func PossibleSharingStateValues added in v0.4.0

func PossibleSharingStateValues() []SharingState

PossibleSharingStateValues returns the possible values for the SharingState const type.

type SharingStatus added in v0.4.0

type SharingStatus struct {
	// Summary of all regional sharing status.
	Summary []*RegionalSharingStatus `json:"summary,omitempty"`

	// READ-ONLY; Aggregated sharing state of current gallery.
	AggregatedState *SharingState `json:"aggregatedState,omitempty" azure:"ro"`
}

SharingStatus - Sharing status of current gallery.

func (SharingStatus) MarshalJSON added in v0.4.0

func (s SharingStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SharingStatus.

type SharingUpdate

type SharingUpdate struct {
	// REQUIRED; This property allows you to specify the operation type of gallery sharing update.
	// Possible values are:
	// Add
	// Remove
	// Reset
	OperationType *SharingUpdateOperationTypes `json:"operationType,omitempty"`

	// A list of sharing profile groups.
	Groups []*SharingProfileGroup `json:"groups,omitempty"`
}

SharingUpdate - Specifies information about the gallery sharing profile update.

func (SharingUpdate) MarshalJSON

func (s SharingUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SharingUpdate.

type SharingUpdateOperationTypes

type SharingUpdateOperationTypes string

SharingUpdateOperationTypes - This property allows you to specify the operation type of gallery sharing update. Possible values are: Add Remove Reset

const (
	SharingUpdateOperationTypesAdd             SharingUpdateOperationTypes = "Add"
	SharingUpdateOperationTypesEnableCommunity SharingUpdateOperationTypes = "EnableCommunity"
	SharingUpdateOperationTypesRemove          SharingUpdateOperationTypes = "Remove"
	SharingUpdateOperationTypesReset           SharingUpdateOperationTypes = "Reset"
)

func PossibleSharingUpdateOperationTypesValues

func PossibleSharingUpdateOperationTypesValues() []SharingUpdateOperationTypes

PossibleSharingUpdateOperationTypesValues returns the possible values for the SharingUpdateOperationTypes const type.

type Snapshot

type Snapshot struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The extended location where the snapshot will be created. Extended location cannot be changed.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// Snapshot resource properties.
	Properties *SnapshotProperties `json:"properties,omitempty"`

	// The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental
	// snapshot and the default behavior is the SKU will be set to the same sku as the
	// previous snapshot
	SKU *SnapshotSKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Unused. Always Null.
	ManagedBy *string `json:"managedBy,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Snapshot resource.

func (Snapshot) MarshalJSON

func (s Snapshot) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Snapshot.

type SnapshotList

type SnapshotList struct {
	// REQUIRED; A list of snapshots.
	Value []*Snapshot `json:"value,omitempty"`

	// The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
	NextLink *string `json:"nextLink,omitempty"`
}

SnapshotList - The List Snapshots operation response.

type SnapshotProperties

type SnapshotProperties struct {
	// REQUIRED; Disk source information. CreationData information cannot be changed after the disk has been created.
	CreationData *CreationData `json:"creationData,omitempty"`

	// Percentage complete for the background copy when a resource is created via the CopyStart operation.
	CompletionPercent *float32 `json:"completionPercent,omitempty"`

	// Additional authentication requirements when exporting or uploading to a disk or snapshot.
	DataAccessAuthMode *DataAccessAuthMode `json:"dataAccessAuthMode,omitempty"`

	// ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessID *string `json:"diskAccessId,omitempty"`

	// If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
	// field is present for updates or creation with other options, it indicates a
	// resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption `json:"encryption,omitempty"`

	// Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`

	// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can
	// be diffed.
	Incremental *bool `json:"incremental,omitempty"`

	// Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`

	// The Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Policy for controlling export on the disk.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Purchase plan information for the image from which the source disk for the snapshot was originally created.
	PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"`

	// Contains the security related information for the resource.
	SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"`

	// List of supported capabilities for the image from which the source disk from the snapshot was originally created.
	SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`

	// Indicates the OS on a snapshot supports hibernation.
	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`

	// READ-ONLY; The size of the disk in bytes. This field is read only.
	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty" azure:"ro"`

	// READ-ONLY; The state of the snapshot.
	DiskState *DiskState `json:"diskState,omitempty" azure:"ro"`

	// READ-ONLY; The disk provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The time when the snapshot was created.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`

	// READ-ONLY; Unique Guid identifying the resource.
	UniqueID *string `json:"uniqueId,omitempty" azure:"ro"`
}

SnapshotProperties - Snapshot resource properties.

func (SnapshotProperties) MarshalJSON

func (s SnapshotProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SnapshotProperties.

func (*SnapshotProperties) UnmarshalJSON

func (s *SnapshotProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties.

type SnapshotSKU

type SnapshotSKU struct {
	// The sku name.
	Name *SnapshotStorageAccountTypes `json:"name,omitempty"`

	// READ-ONLY; The sku tier.
	Tier *string `json:"tier,omitempty" azure:"ro"`
}

SnapshotSKU - The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot

type SnapshotStorageAccountTypes

type SnapshotStorageAccountTypes string

SnapshotStorageAccountTypes - The sku name.

const (
	// SnapshotStorageAccountTypesPremiumLRS - Premium SSD locally redundant storage
	SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS"
	// SnapshotStorageAccountTypesStandardLRS - Standard HDD locally redundant storage
	SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS"
	// SnapshotStorageAccountTypesStandardZRS - Standard zone redundant storage
	SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS"
)

func PossibleSnapshotStorageAccountTypesValues

func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes

PossibleSnapshotStorageAccountTypesValues returns the possible values for the SnapshotStorageAccountTypes const type.

type SnapshotUpdate

type SnapshotUpdate struct {
	// Snapshot resource update properties.
	Properties *SnapshotUpdateProperties `json:"properties,omitempty"`

	// The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental
	// snapshot and the default behavior is the SKU will be set to the same sku as the
	// previous snapshot
	SKU *SnapshotSKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

SnapshotUpdate - Snapshot update resource.

func (SnapshotUpdate) MarshalJSON

func (s SnapshotUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SnapshotUpdate.

type SnapshotUpdateProperties

type SnapshotUpdateProperties struct {
	// Additional authentication requirements when exporting or uploading to a disk or snapshot.
	DataAccessAuthMode *DataAccessAuthMode `json:"dataAccessAuthMode,omitempty"`

	// ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessID *string `json:"diskAccessId,omitempty"`

	// If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
	// field is present for updates or creation with other options, it indicates a
	// resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption `json:"encryption,omitempty"`

	// Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`

	// Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`

	// the Operating System type.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Policy for controlling export on the disk.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// List of supported capabilities for the image from which the OS disk was created.
	SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`

	// Indicates the OS on a snapshot supports hibernation.
	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
}

SnapshotUpdateProperties - Snapshot resource update properties.

type SnapshotsClient

type SnapshotsClient struct {
	// contains filtered or unexported fields
}

SnapshotsClient contains the methods for the Snapshots group. Don't use this type directly, use NewSnapshotsClient() instead.

func NewSnapshotsClient

func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotsClient, error)

NewSnapshotsClient creates a new instance of SnapshotsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SnapshotsClient) BeginCreateOrUpdate

func (client *SnapshotsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot, options *SnapshotsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SnapshotsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a snapshot. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. snapshot - Snapshot object supplied in the body of the Put disk operation. options - SnapshotsClientBeginCreateOrUpdateOptions contains the optional parameters for the SnapshotsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"mySnapshot1",
		armcompute.Snapshot{
			Location: to.Ptr("West US"),
			Properties: &armcompute.SnapshotProperties{
				CreationData: &armcompute.CreationData{
					CreateOption:     to.Ptr(armcompute.DiskCreateOptionImport),
					SourceURI:        to.Ptr("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
					StorageAccountID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SnapshotsClient) BeginDelete

func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*runtime.Poller[SnapshotsClientDeleteResponse], error)

BeginDelete - Deletes a snapshot. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. options - SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/DeleteASnapshot.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"mySnapshot",
		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)
	}
}
Output:

func (*SnapshotsClient) BeginGrantAccess

func (client *SnapshotsClient) BeginGrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, options *SnapshotsClientBeginGrantAccessOptions) (*runtime.Poller[SnapshotsClientGrantAccessResponse], error)

BeginGrantAccess - Grants access to a snapshot. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. grantAccessData - Access data object supplied in the body of the get snapshot access operation. options - SnapshotsClientBeginGrantAccessOptions contains the optional parameters for the SnapshotsClient.BeginGrantAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/BeginGetAccessSnapshot.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGrantAccess(ctx,
		"myResourceGroup",
		"mySnapshot",
		armcompute.GrantAccessData{
			Access:            to.Ptr(armcompute.AccessLevelRead),
			DurationInSeconds: to.Ptr[int32](300),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SnapshotsClient) BeginRevokeAccess

func (client *SnapshotsClient) BeginRevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginRevokeAccessOptions) (*runtime.Poller[SnapshotsClientRevokeAccessResponse], error)

BeginRevokeAccess - Revokes access to a snapshot. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. options - SnapshotsClientBeginRevokeAccessOptions contains the optional parameters for the SnapshotsClient.BeginRevokeAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/EndGetAccessSnapshot.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRevokeAccess(ctx,
		"myResourceGroup",
		"mySnapshot",
		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)
	}
}
Output:

func (*SnapshotsClient) BeginUpdate

func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, options *SnapshotsClientBeginUpdateOptions) (*runtime.Poller[SnapshotsClientUpdateResponse], error)

BeginUpdate - Updates (patches) a snapshot. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. snapshot - Snapshot object supplied in the body of the Patch snapshot operation. options - SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/UpdateASnapshotWithAcceleratedNetwork.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"mySnapshot",
		armcompute.SnapshotUpdate{
			Properties: &armcompute.SnapshotUpdateProperties{
				DiskSizeGB: to.Ptr[int32](20),
				SupportedCapabilities: &armcompute.SupportedCapabilities{
					AcceleratedNetwork: to.Ptr(false),
				},
			},
			Tags: map[string]*string{
				"department": to.Ptr("Development"),
				"project":    to.Ptr("UpdateSnapshots"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SnapshotsClient) Get

func (client *SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientGetOptions) (SnapshotsClientGetResponse, error)

Get - Gets information about a snapshot. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. options - SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/GetInformationAboutASnapshot.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"mySnapshot",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SnapshotsClient) NewListByResourceGroupPager added in v0.7.0

func (client *SnapshotsClient) NewListByResourceGroupPager(resourceGroupName string, options *SnapshotsClientListByResourceGroupOptions) *runtime.Pager[SnapshotsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists snapshots under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 resourceGroupName - The name of the resource group. options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListSnapshotsInAResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SnapshotsClient) NewListPager added in v0.7.0

NewListPager - Lists snapshots under a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-12-01 options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/ListSnapshotsInASubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewSnapshotsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SnapshotsClientBeginCreateOrUpdateOptions added in v0.3.0

type SnapshotsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SnapshotsClientBeginCreateOrUpdateOptions contains the optional parameters for the SnapshotsClient.BeginCreateOrUpdate method.

type SnapshotsClientBeginDeleteOptions added in v0.3.0

type SnapshotsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method.

type SnapshotsClientBeginGrantAccessOptions added in v0.3.0

type SnapshotsClientBeginGrantAccessOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SnapshotsClientBeginGrantAccessOptions contains the optional parameters for the SnapshotsClient.BeginGrantAccess method.

type SnapshotsClientBeginRevokeAccessOptions added in v0.3.0

type SnapshotsClientBeginRevokeAccessOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SnapshotsClientBeginRevokeAccessOptions contains the optional parameters for the SnapshotsClient.BeginRevokeAccess method.

type SnapshotsClientBeginUpdateOptions added in v0.3.0

type SnapshotsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method.

type SnapshotsClientCreateOrUpdateResponse added in v0.3.0

type SnapshotsClientCreateOrUpdateResponse struct {
	Snapshot
}

SnapshotsClientCreateOrUpdateResponse contains the response from method SnapshotsClient.CreateOrUpdate.

type SnapshotsClientDeleteResponse added in v0.3.0

type SnapshotsClientDeleteResponse struct {
}

SnapshotsClientDeleteResponse contains the response from method SnapshotsClient.Delete.

type SnapshotsClientGetOptions added in v0.3.0

type SnapshotsClientGetOptions struct {
}

SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method.

type SnapshotsClientGetResponse added in v0.3.0

type SnapshotsClientGetResponse struct {
	Snapshot
}

SnapshotsClientGetResponse contains the response from method SnapshotsClient.Get.

type SnapshotsClientGrantAccessResponse added in v0.3.0

type SnapshotsClientGrantAccessResponse struct {
	AccessURI
}

SnapshotsClientGrantAccessResponse contains the response from method SnapshotsClient.GrantAccess.

type SnapshotsClientListByResourceGroupOptions added in v0.3.0

type SnapshotsClientListByResourceGroupOptions struct {
}

SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.ListByResourceGroup method.

type SnapshotsClientListByResourceGroupResponse added in v0.3.0

type SnapshotsClientListByResourceGroupResponse struct {
	SnapshotList
}

SnapshotsClientListByResourceGroupResponse contains the response from method SnapshotsClient.ListByResourceGroup.

type SnapshotsClientListOptions added in v0.3.0

type SnapshotsClientListOptions struct {
}

SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.List method.

type SnapshotsClientListResponse added in v0.3.0

type SnapshotsClientListResponse struct {
	SnapshotList
}

SnapshotsClientListResponse contains the response from method SnapshotsClient.List.

type SnapshotsClientRevokeAccessResponse added in v0.3.0

type SnapshotsClientRevokeAccessResponse struct {
}

SnapshotsClientRevokeAccessResponse contains the response from method SnapshotsClient.RevokeAccess.

type SnapshotsClientUpdateResponse added in v0.3.0

type SnapshotsClientUpdateResponse struct {
	Snapshot
}

SnapshotsClientUpdateResponse contains the response from method SnapshotsClient.Update.

type SoftDeletePolicy

type SoftDeletePolicy struct {
	// Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.
	IsSoftDeleteEnabled *bool `json:"isSoftDeleteEnabled,omitempty"`
}

SoftDeletePolicy - Contains information about the soft deletion policy of the gallery.

type SourceVault

type SourceVault struct {
	// Resource Id
	ID *string `json:"id,omitempty"`
}

SourceVault - The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}

type SpotRestorePolicy

type SpotRestorePolicy struct {
	// Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based
	// on capacity availability and pricing constraints
	Enabled *bool `json:"enabled,omitempty"`

	// Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances
	RestoreTimeout *string `json:"restoreTimeout,omitempty"`
}

SpotRestorePolicy - Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint.

type StatusCodeCount

type StatusCodeCount struct {
	// READ-ONLY; The instance view status code
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Number of instances having this status code
	Count *int32 `json:"count,omitempty" azure:"ro"`
}

type StatusLevelTypes

type StatusLevelTypes string

StatusLevelTypes - The level code.

const (
	StatusLevelTypesInfo    StatusLevelTypes = "Info"
	StatusLevelTypesWarning StatusLevelTypes = "Warning"
	StatusLevelTypesError   StatusLevelTypes = "Error"
)

func PossibleStatusLevelTypesValues

func PossibleStatusLevelTypesValues() []StatusLevelTypes

PossibleStatusLevelTypesValues returns the possible values for the StatusLevelTypes const type.

type StorageAccountType

type StorageAccountType string

StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable.

const (
	StorageAccountTypePremiumLRS  StorageAccountType = "Premium_LRS"
	StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
	StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS"
)

func PossibleStorageAccountTypeValues

func PossibleStorageAccountTypeValues() []StorageAccountType

PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.

type StorageAccountTypes

type StorageAccountTypes string

StorageAccountTypes - Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSDLRS can only be used with data disks. It cannot be used with OS Disk. StandardLRS uses Standard HDD. StandardSSDLRS uses Standard SSD. PremiumLRS uses Premium SSD. UltraSSDLRS uses Ultra disk. PremiumZRS uses Premium SSD 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 Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types

const (
	StorageAccountTypesPremiumLRS     StorageAccountTypes = "Premium_LRS"
	StorageAccountTypesPremiumV2LRS   StorageAccountTypes = "PremiumV2_LRS"
	StorageAccountTypesPremiumZRS     StorageAccountTypes = "Premium_ZRS"
	StorageAccountTypesStandardLRS    StorageAccountTypes = "Standard_LRS"
	StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS"
	StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS"
	StorageAccountTypesUltraSSDLRS    StorageAccountTypes = "UltraSSD_LRS"
)

func PossibleStorageAccountTypesValues

func PossibleStorageAccountTypesValues() []StorageAccountTypes

PossibleStorageAccountTypesValues returns the possible values for the StorageAccountTypes const type.

type StorageProfile

type StorageProfile struct {
	// Specifies the parameters that are used to add a data disk to a virtual machine.
	// For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
	DataDisks []*DataDisk `json:"dataDisks,omitempty"`

	// Specifies information about the image to use. You can specify information about platform images, marketplace images, or
	// virtual machine images. This element is required when you want to use a platform
	// image, marketplace image, or virtual machine image, but is not used in other creation operations.
	ImageReference *ImageReference `json:"imageReference,omitempty"`

	// Specifies information about the operating system disk used by the virtual machine.
	// For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
	OSDisk *OSDisk `json:"osDisk,omitempty"`
}

StorageProfile - Specifies the storage settings for the virtual machine disks.

func (StorageProfile) MarshalJSON

func (s StorageProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageProfile.

type SubResource

type SubResource struct {
	// Resource Id
	ID *string `json:"id,omitempty"`
}

type SubResourceReadOnly

type SubResourceReadOnly struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`
}

type SubResourceWithColocationStatus

type SubResourceWithColocationStatus struct {
	// Describes colocation status of a resource in the Proximity Placement Group.
	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`
}

type SupportedCapabilities

type SupportedCapabilities struct {
	// True if the image from which the OS disk is created supports accelerated networking.
	AcceleratedNetwork *bool `json:"acceleratedNetwork,omitempty"`

	// CPU architecture supported by an OS disk.
	Architecture *Architecture `json:"architecture,omitempty"`
}

SupportedCapabilities - List of supported capabilities persisted on the disk resource for VM use.

type TargetRegion

type TargetRegion struct {
	// REQUIRED; The name of the region.
	Name *string `json:"name,omitempty"`

	// Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
	Encryption *EncryptionImages `json:"encryption,omitempty"`

	// The number of replicas of the Image Version to be created per region. This property is updatable.
	RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`

	// Specifies the storage account type to be used to store the image. This property is not updatable.
	StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"`
}

TargetRegion - Describes the target region information.

type TerminateNotificationProfile

type TerminateNotificationProfile struct {
	// Specifies whether the Terminate Scheduled event is enabled or disabled.
	Enable *bool `json:"enable,omitempty"`

	// Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event
	// before the event is auto approved (timed out). The configuration must be
	// specified in ISO 8601 format, the default value is 5 minutes (PT5M)
	NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
}

type ThrottledRequestsInput

type ThrottledRequestsInput struct {
	// REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`

	// REQUIRED; From time of the query
	FromTime *time.Time `json:"fromTime,omitempty"`

	// REQUIRED; To time of the query
	ToTime *time.Time `json:"toTime,omitempty"`

	// Group query result by Client Application ID.
	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`

	// Group query result by Operation Name.
	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`

	// Group query result by Resource Name.
	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`

	// Group query result by Throttle Policy applied.
	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`

	// Group query result by User Agent.
	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
}

ThrottledRequestsInput - Api request input for LogAnalytics getThrottledRequests Api.

func (ThrottledRequestsInput) MarshalJSON added in v0.3.0

func (t ThrottledRequestsInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ThrottledRequestsInput.

func (*ThrottledRequestsInput) UnmarshalJSON added in v0.3.0

func (t *ThrottledRequestsInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ThrottledRequestsInput.

type UefiSettings

type UefiSettings struct {
	// Specifies whether secure boot should be enabled on the virtual machine.
	// Minimum api-version: 2020-12-01
	SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"`

	// Specifies whether vTPM should be enabled on the virtual machine.
	// Minimum api-version: 2020-12-01
	VTpmEnabled *bool `json:"vTpmEnabled,omitempty"`
}

UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01

type UpdateDomain

type UpdateDomain struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource Name
	Name *string `json:"name,omitempty" azure:"ro"`
}

UpdateDomain - Defines an update domain for the cloud service.

type UpdateDomainListResult

type UpdateDomainListResult struct {
	// REQUIRED
	Value    []*UpdateDomain `json:"value,omitempty"`
	NextLink *string         `json:"nextLink,omitempty"`
}

type UpdateResource

type UpdateResource struct {
	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

UpdateResource - The Update Resource model definition.

func (UpdateResource) MarshalJSON

func (u UpdateResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateResource.

type UpdateResourceDefinition

type UpdateResourceDefinition struct {
	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

UpdateResourceDefinition - The Update Resource model definition.

func (UpdateResourceDefinition) MarshalJSON

func (u UpdateResourceDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateResourceDefinition.

type UpgradeMode

type UpgradeMode string

UpgradeMode - Specifies the mode of an upgrade to virtual machines in the scale set. Possible values are: Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. Automatic - All virtual machines in the scale set are automatically updated at the same time.

const (
	UpgradeModeAutomatic UpgradeMode = "Automatic"
	UpgradeModeManual    UpgradeMode = "Manual"
	UpgradeModeRolling   UpgradeMode = "Rolling"
)

func PossibleUpgradeModeValues

func PossibleUpgradeModeValues() []UpgradeMode

PossibleUpgradeModeValues returns the possible values for the UpgradeMode const type.

type UpgradeOperationHistoricalStatusInfo

type UpgradeOperationHistoricalStatusInfo struct {
	// READ-ONLY; Resource location
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Information about the properties of the upgrade operation.
	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

UpgradeOperationHistoricalStatusInfo - Virtual Machine Scale Set OS Upgrade History operation response.

type UpgradeOperationHistoricalStatusInfoProperties

type UpgradeOperationHistoricalStatusInfoProperties struct {
	// READ-ONLY; Error Details for this upgrade if there are any.
	Error *APIError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; Counts of the VMs in each state.
	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty" azure:"ro"`

	// READ-ONLY; Information about OS rollback if performed
	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty" azure:"ro"`

	// READ-ONLY; Information about the overall status of the upgrade operation.
	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty" azure:"ro"`

	// READ-ONLY; Invoker of the Upgrade Operation
	StartedBy *UpgradeOperationInvoker `json:"startedBy,omitempty" azure:"ro"`

	// READ-ONLY; Image Reference details
	TargetImageReference *ImageReference `json:"targetImageReference,omitempty" azure:"ro"`
}

UpgradeOperationHistoricalStatusInfoProperties - Describes each OS upgrade on the Virtual Machine Scale Set.

type UpgradeOperationHistoryStatus

type UpgradeOperationHistoryStatus struct {
	// READ-ONLY; Code indicating the current status of the upgrade.
	Code *UpgradeState `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; End time of the upgrade.
	EndTime *time.Time `json:"endTime,omitempty" azure:"ro"`

	// READ-ONLY; Start time of the upgrade.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`
}

UpgradeOperationHistoryStatus - Information about the current running state of the overall upgrade.

func (*UpgradeOperationHistoryStatus) UnmarshalJSON

func (u *UpgradeOperationHistoryStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeOperationHistoryStatus.

type UpgradeOperationInvoker

type UpgradeOperationInvoker string

UpgradeOperationInvoker - Invoker of the Upgrade Operation

const (
	UpgradeOperationInvokerUnknown  UpgradeOperationInvoker = "Unknown"
	UpgradeOperationInvokerUser     UpgradeOperationInvoker = "User"
	UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform"
)

func PossibleUpgradeOperationInvokerValues

func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker

PossibleUpgradeOperationInvokerValues returns the possible values for the UpgradeOperationInvoker const type.

type UpgradePolicy

type UpgradePolicy struct {
	// Configuration parameters used for performing automatic OS Upgrade.
	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`

	// Specifies the mode of an upgrade to virtual machines in the scale set.
	// Possible values are:
	// Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade
	// action.
	// Automatic - All virtual machines in the scale set are automatically updated at the same time.
	Mode *UpgradeMode `json:"mode,omitempty"`

	// The configuration parameters used while performing a rolling upgrade.
	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
}

UpgradePolicy - Describes an upgrade policy - automatic, manual, or rolling.

type UpgradeState

type UpgradeState string

UpgradeState - Code indicating the current status of the upgrade.

const (
	UpgradeStateRollingForward UpgradeState = "RollingForward"
	UpgradeStateCancelled      UpgradeState = "Cancelled"
	UpgradeStateCompleted      UpgradeState = "Completed"
	UpgradeStateFaulted        UpgradeState = "Faulted"
)

func PossibleUpgradeStateValues

func PossibleUpgradeStateValues() []UpgradeState

PossibleUpgradeStateValues returns the possible values for the UpgradeState const type.

type Usage

type Usage struct {
	// REQUIRED; The current usage of the resource.
	CurrentValue *int32 `json:"currentValue,omitempty"`

	// REQUIRED; The maximum permitted usage of the resource.
	Limit *int64 `json:"limit,omitempty"`

	// REQUIRED; The name of the type of usage.
	Name *UsageName `json:"name,omitempty"`

	// REQUIRED; An enum describing the unit of usage measurement.
	Unit *string `json:"unit,omitempty"`
}

Usage - Describes Compute Resource Usage.

type UsageClient

type UsageClient struct {
	// contains filtered or unexported fields
}

UsageClient contains the methods for the Usage group. Don't use this type directly, use NewUsageClient() instead.

func NewUsageClient

func NewUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageClient, error)

NewUsageClient creates a new instance of UsageClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UsageClient) NewListPager added in v0.7.0

func (client *UsageClient) NewListPager(location string, options *UsageClientListOptions) *runtime.Pager[UsageClientListResponse]

NewListPager - Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location for which resource usage is queried. options - UsageClientListOptions contains the optional parameters for the UsageClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/computeRPCommonExamples/Usage_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewUsageClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("4_.",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type UsageClientListOptions added in v0.3.0

type UsageClientListOptions struct {
}

UsageClientListOptions contains the optional parameters for the UsageClient.List method.

type UsageClientListResponse added in v0.3.0

type UsageClientListResponse struct {
	ListUsagesResult
}

UsageClientListResponse contains the response from method UsageClient.List.

type UsageName

type UsageName struct {
	// The localized name of the resource.
	LocalizedValue *string `json:"localizedValue,omitempty"`

	// The name of the resource.
	Value *string `json:"value,omitempty"`
}

UsageName - The Usage Names.

type UserArtifactManage

type UserArtifactManage struct {
	// REQUIRED; Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
	Install *string `json:"install,omitempty"`

	// REQUIRED; Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
	Remove *string `json:"remove,omitempty"`

	// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove
	// command on the previous version and install command on the current version
	// of the gallery application. This is limited to 4096 characters.
	Update *string `json:"update,omitempty"`
}

type UserArtifactSource

type UserArtifactSource struct {
	// REQUIRED; Required. The mediaLink of the artifact, must be a readable storage page blob.
	MediaLink *string `json:"mediaLink,omitempty"`

	// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
	DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"`
}

UserArtifactSource - The source image from which the Image Version is going to be created.

type UserAssignedIdentitiesValue

type UserAssignedIdentitiesValue struct {
	// READ-ONLY; The client id of user assigned identity.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

type VMDiskSecurityProfile added in v0.4.0

type VMDiskSecurityProfile struct {
	// Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key
	// encrypted ConfidentialVM OS Disk and VMGuest blob.
	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`

	// Specifies the EncryptionType of the managed disk.
	// It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly
	// for encryption of just the VMGuestState blob.
	// NOTE: It can be set for only Confidential VMs.
	SecurityEncryptionType *SecurityEncryptionTypes `json:"securityEncryptionType,omitempty"`
}

VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. NOTE: It can only be set for Confidential VMs

type VMDiskTypes

type VMDiskTypes string

VMDiskTypes - VM disk types which are disallowed.

const (
	VMDiskTypesNone      VMDiskTypes = "None"
	VMDiskTypesUnmanaged VMDiskTypes = "Unmanaged"
)

func PossibleVMDiskTypesValues

func PossibleVMDiskTypesValues() []VMDiskTypes

PossibleVMDiskTypesValues returns the possible values for the VMDiskTypes const type.

type VMGalleryApplication

type VMGalleryApplication struct {
	// REQUIRED; Specifies the GalleryApplicationVersion resource id on the form of
	// /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}
	PackageReferenceID *string `json:"packageReferenceId,omitempty"`

	// Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided
	ConfigurationReference *string `json:"configurationReference,omitempty"`

	// If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the
	// VM/VMSS
	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`

	// Optional, Specifies the order in which the packages have to be installed
	Order *int32 `json:"order,omitempty"`

	// Optional, Specifies a passthrough value for more generic context.
	Tags *string `json:"tags,omitempty"`

	// Optional, If true, any failure for any operation in the VmApplication will fail the deployment
	TreatFailureAsDeploymentFailure *bool `json:"treatFailureAsDeploymentFailure,omitempty"`
}

VMGalleryApplication - Specifies the required information to reference a compute gallery application version

type VMGuestPatchClassificationLinux

type VMGuestPatchClassificationLinux string
const (
	VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical"
	VMGuestPatchClassificationLinuxOther    VMGuestPatchClassificationLinux = "Other"
	VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security"
)

func PossibleVMGuestPatchClassificationLinuxValues

func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux

PossibleVMGuestPatchClassificationLinuxValues returns the possible values for the VMGuestPatchClassificationLinux const type.

type VMGuestPatchClassificationWindows

type VMGuestPatchClassificationWindows string
const (
	VMGuestPatchClassificationWindowsCritical     VMGuestPatchClassificationWindows = "Critical"
	VMGuestPatchClassificationWindowsDefinition   VMGuestPatchClassificationWindows = "Definition"
	VMGuestPatchClassificationWindowsFeaturePack  VMGuestPatchClassificationWindows = "FeaturePack"
	VMGuestPatchClassificationWindowsSecurity     VMGuestPatchClassificationWindows = "Security"
	VMGuestPatchClassificationWindowsServicePack  VMGuestPatchClassificationWindows = "ServicePack"
	VMGuestPatchClassificationWindowsTools        VMGuestPatchClassificationWindows = "Tools"
	VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp"
	VMGuestPatchClassificationWindowsUpdates      VMGuestPatchClassificationWindows = "Updates"
)

func PossibleVMGuestPatchClassificationWindowsValues

func PossibleVMGuestPatchClassificationWindowsValues() []VMGuestPatchClassificationWindows

PossibleVMGuestPatchClassificationWindowsValues returns the possible values for the VMGuestPatchClassificationWindows const type.

type VMGuestPatchRebootBehavior

type VMGuestPatchRebootBehavior string

VMGuestPatchRebootBehavior - Describes the reboot requirements of the patch.

const (
	VMGuestPatchRebootBehaviorAlwaysRequiresReboot VMGuestPatchRebootBehavior = "AlwaysRequiresReboot"
	VMGuestPatchRebootBehaviorCanRequestReboot     VMGuestPatchRebootBehavior = "CanRequestReboot"
	VMGuestPatchRebootBehaviorNeverReboots         VMGuestPatchRebootBehavior = "NeverReboots"
	VMGuestPatchRebootBehaviorUnknown              VMGuestPatchRebootBehavior = "Unknown"
)

func PossibleVMGuestPatchRebootBehaviorValues

func PossibleVMGuestPatchRebootBehaviorValues() []VMGuestPatchRebootBehavior

PossibleVMGuestPatchRebootBehaviorValues returns the possible values for the VMGuestPatchRebootBehavior const type.

type VMGuestPatchRebootSetting

type VMGuestPatchRebootSetting string

VMGuestPatchRebootSetting - Defines when it is acceptable to reboot a VM during a software update operation.

const (
	VMGuestPatchRebootSettingAlways     VMGuestPatchRebootSetting = "Always"
	VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired"
	VMGuestPatchRebootSettingNever      VMGuestPatchRebootSetting = "Never"
)

func PossibleVMGuestPatchRebootSettingValues

func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting

PossibleVMGuestPatchRebootSettingValues returns the possible values for the VMGuestPatchRebootSetting const type.

type VMGuestPatchRebootStatus

type VMGuestPatchRebootStatus string

VMGuestPatchRebootStatus - The reboot state of the VM following completion of the operation.

const (
	VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed"
	VMGuestPatchRebootStatusFailed    VMGuestPatchRebootStatus = "Failed"
	VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded"
	VMGuestPatchRebootStatusRequired  VMGuestPatchRebootStatus = "Required"
	VMGuestPatchRebootStatusStarted   VMGuestPatchRebootStatus = "Started"
	VMGuestPatchRebootStatusUnknown   VMGuestPatchRebootStatus = "Unknown"
)

func PossibleVMGuestPatchRebootStatusValues

func PossibleVMGuestPatchRebootStatusValues() []VMGuestPatchRebootStatus

PossibleVMGuestPatchRebootStatusValues returns the possible values for the VMGuestPatchRebootStatus const type.

type VMScaleSetConvertToSinglePlacementGroupInput

type VMScaleSetConvertToSinglePlacementGroupInput struct {
	// Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id,
	// please use Virtual Machine Scale Set VMs - Get API. If not provided, the
	// platform will choose one with maximum number of virtual machine instances.
	ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
}

type VMSizeProperties

type VMSizeProperties struct {
	// Specifies the number of vCPUs available for the VM.
	// When this property is not 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] .
	VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty"`

	// 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]
	// Setting this property to 1 also means that hyper-threading is disabled.
	VCPUsPerCore *int32 `json:"vCPUsPerCore,omitempty"`
}

VMSizeProperties - Specifies VM Size Property settings on the virtual machine.

type VaultCertificate

type VaultCertificate struct {
	// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified
	// certificate store is implicitly in the LocalMachine account.
	// For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt
	// for the X509 certificate file and <UppercaseThumbprint>.prv for private
	// key. Both of these files are .pem formatted.
	CertificateStore *string `json:"certificateStore,omitempty"`

	// 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]. 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] or the Azure Key Vault virtual machine extension
	// for Windows
	// [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
	CertificateURL *string `json:"certificateUrl,omitempty"`
}

VaultCertificate - Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.

type VaultSecretGroup

type VaultSecretGroup struct {
	// The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
	SourceVault *SubResource `json:"sourceVault,omitempty"`

	// The list of key vault references in SourceVault which contain certificates.
	VaultCertificates []*VaultCertificate `json:"vaultCertificates,omitempty"`
}

VaultSecretGroup - Describes a set of certificates which are all in the same Key Vault.

func (VaultSecretGroup) MarshalJSON

func (v VaultSecretGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VaultSecretGroup.

type VirtualHardDisk

type VirtualHardDisk struct {
	// Specifies the virtual hard disk's uri.
	URI *string `json:"uri,omitempty"`
}

VirtualHardDisk - Describes the uri of a disk.

type VirtualMachine

type VirtualMachine struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The extended location of the Virtual Machine.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// The identity of the virtual machine, if configured.
	Identity *VirtualMachineIdentity `json:"identity,omitempty"`

	// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
	// images. Before you can use a marketplace image from an API, you must
	// enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
	// Want to deploy programmatically, Get Started ->. Enter any required
	// information and then click Save.
	Plan *Plan `json:"plan,omitempty"`

	// Describes the properties of a Virtual Machine.
	Properties *VirtualMachineProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// The virtual machine zones.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The virtual machine child extension resources.
	Resources []*VirtualMachineExtension `json:"resources,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachine - Describes a Virtual Machine.

func (VirtualMachine) MarshalJSON

func (v VirtualMachine) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachine.

type VirtualMachineAgentInstanceView

type VirtualMachineAgentInstanceView struct {
	// The virtual machine extension handler instance view.
	ExtensionHandlers []*VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// The VM Agent full version.
	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
}

VirtualMachineAgentInstanceView - The instance view of the VM Agent running on the virtual machine.

func (VirtualMachineAgentInstanceView) MarshalJSON

func (v VirtualMachineAgentInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineAgentInstanceView.

type VirtualMachineAssessPatchesResult

type VirtualMachineAssessPatchesResult struct {
	// READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
	// logs.
	AssessmentActivityID *string `json:"assessmentActivityId,omitempty" azure:"ro"`

	// READ-ONLY; The list of patches that have been detected as available for installation.
	AvailablePatches []*VirtualMachineSoftwarePatchProperties `json:"availablePatches,omitempty" azure:"ro"`

	// READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
	Error *APIError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; The number of all available patches excluding critical and security.
	OtherPatchCount *int32 `json:"otherPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete
	// installation but the reboot has not yet occurred.
	RebootPending *bool `json:"rebootPending,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the operation began.
	StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"`

	// READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
	// At that point it will become "Unknown", "Failed", "Succeeded", or
	// "CompletedWithWarnings."
	Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"`
}

VirtualMachineAssessPatchesResult - Describes the properties of an AssessPatches result.

func (*VirtualMachineAssessPatchesResult) UnmarshalJSON

func (v *VirtualMachineAssessPatchesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineAssessPatchesResult.

type VirtualMachineCaptureParameters

type VirtualMachineCaptureParameters struct {
	// REQUIRED; The destination container name.
	DestinationContainerName *string `json:"destinationContainerName,omitempty"`

	// REQUIRED; Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`

	// REQUIRED; The captured virtual hard disk's name prefix.
	VhdPrefix *string `json:"vhdPrefix,omitempty"`
}

VirtualMachineCaptureParameters - Capture Virtual Machine parameters.

type VirtualMachineCaptureResult

type VirtualMachineCaptureResult struct {
	// Resource Id
	ID *string `json:"id,omitempty"`

	// READ-ONLY; the version of the content
	ContentVersion *string `json:"contentVersion,omitempty" azure:"ro"`

	// READ-ONLY; parameters of the captured virtual machine
	Parameters interface{} `json:"parameters,omitempty" azure:"ro"`

	// READ-ONLY; a list of resource items of the captured virtual machine
	Resources []interface{} `json:"resources,omitempty" azure:"ro"`

	// READ-ONLY; the schema of the captured virtual machine
	Schema *string `json:"$schema,omitempty" azure:"ro"`
}

VirtualMachineCaptureResult - Output of virtual machine capture operation.

func (VirtualMachineCaptureResult) MarshalJSON

func (v VirtualMachineCaptureResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineCaptureResult.

type VirtualMachineEvictionPolicyTypes

type VirtualMachineEvictionPolicyTypes string

VirtualMachineEvictionPolicyTypes - Specifies the eviction policy for the Azure Spot VM/VMSS

const (
	VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
	VirtualMachineEvictionPolicyTypesDelete     VirtualMachineEvictionPolicyTypes = "Delete"
)

func PossibleVirtualMachineEvictionPolicyTypesValues

func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes

PossibleVirtualMachineEvictionPolicyTypesValues returns the possible values for the VirtualMachineEvictionPolicyTypes const type.

type VirtualMachineExtension

type VirtualMachineExtension struct {
	// Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a Virtual Machine Extension.
	Properties *VirtualMachineExtensionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineExtension - Describes a Virtual Machine Extension.

func (VirtualMachineExtension) MarshalJSON

func (v VirtualMachineExtension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtension.

type VirtualMachineExtensionHandlerInstanceView

type VirtualMachineExtensionHandlerInstanceView struct {
	// The extension handler status.
	Status *InstanceViewStatus `json:"status,omitempty"`

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string `json:"type,omitempty"`

	// Specifies the version of the script handler.
	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
}

VirtualMachineExtensionHandlerInstanceView - The instance view of a virtual machine extension handler.

type VirtualMachineExtensionImage

type VirtualMachineExtensionImage struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a Virtual Machine Extension Image.
	Properties *VirtualMachineExtensionImageProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineExtensionImage - Describes a Virtual Machine Extension Image.

func (VirtualMachineExtensionImage) MarshalJSON

func (v VirtualMachineExtensionImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionImage.

type VirtualMachineExtensionImageProperties

type VirtualMachineExtensionImageProperties struct {
	// REQUIRED; The type of role (IaaS or PaaS) this extension supports.
	ComputeRole *string `json:"computeRole,omitempty"`

	// REQUIRED; The schema defined by publisher, where extension consumers should provide settings in a matching schema.
	HandlerSchema *string `json:"handlerSchema,omitempty"`

	// REQUIRED; The operating system this extension supports.
	OperatingSystem *string `json:"operatingSystem,omitempty"`

	// Whether the handler can support multiple extensions.
	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`

	// Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there
	// might be cases where a publisher wants to explicitly indicate the extension is
	// only enabled for CRP VMs but not VMSS.
	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
}

VirtualMachineExtensionImageProperties - Describes the properties of a Virtual Machine Extension Image.

type VirtualMachineExtensionImagesClient

type VirtualMachineExtensionImagesClient struct {
	// contains filtered or unexported fields
}

VirtualMachineExtensionImagesClient contains the methods for the VirtualMachineExtensionImages group. Don't use this type directly, use NewVirtualMachineExtensionImagesClient() instead.

func NewVirtualMachineExtensionImagesClient

func NewVirtualMachineExtensionImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineExtensionImagesClient, error)

NewVirtualMachineExtensionImagesClient creates a new instance of VirtualMachineExtensionImagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineExtensionImagesClient) Get

Get - Gets a virtual machine extension image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. options - VirtualMachineExtensionImagesClientGetOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImages_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"aaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineExtensionImagesClient) ListTypes

ListTypes - Gets a list of virtual machine extension image types. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. options - VirtualMachineExtensionImagesClientListTypesOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListTypes method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImages_ListTypes_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListTypes(ctx,
		"aaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineExtensionImagesClient) ListVersions

ListVersions - Gets a list of virtual machine extension image versions. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. options - VirtualMachineExtensionImagesClientListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListVersions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImages_ListVersions_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListVersions(ctx,
		"aaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineExtensionImagesClientListVersionsOptions{Filter: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"),
			Top:     to.Ptr[int32](22),
			Orderby: to.Ptr("a"),
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type VirtualMachineExtensionImagesClientGetOptions added in v0.3.0

type VirtualMachineExtensionImagesClientGetOptions struct {
}

VirtualMachineExtensionImagesClientGetOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.Get method.

type VirtualMachineExtensionImagesClientGetResponse added in v0.3.0

type VirtualMachineExtensionImagesClientGetResponse struct {
	VirtualMachineExtensionImage
}

VirtualMachineExtensionImagesClientGetResponse contains the response from method VirtualMachineExtensionImagesClient.Get.

type VirtualMachineExtensionImagesClientListTypesOptions added in v0.3.0

type VirtualMachineExtensionImagesClientListTypesOptions struct {
}

VirtualMachineExtensionImagesClientListTypesOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListTypes method.

type VirtualMachineExtensionImagesClientListTypesResponse added in v0.3.0

type VirtualMachineExtensionImagesClientListTypesResponse struct {
	// Array of VirtualMachineExtensionImage
	VirtualMachineExtensionImageArray []*VirtualMachineExtensionImage
}

VirtualMachineExtensionImagesClientListTypesResponse contains the response from method VirtualMachineExtensionImagesClient.ListTypes.

type VirtualMachineExtensionImagesClientListVersionsOptions added in v0.3.0

type VirtualMachineExtensionImagesClientListVersionsOptions struct {
	// The filter to apply on the operation.
	Filter  *string
	Orderby *string
	Top     *int32
}

VirtualMachineExtensionImagesClientListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListVersions method.

type VirtualMachineExtensionImagesClientListVersionsResponse added in v0.3.0

type VirtualMachineExtensionImagesClientListVersionsResponse struct {
	// Array of VirtualMachineExtensionImage
	VirtualMachineExtensionImageArray []*VirtualMachineExtensionImage
}

VirtualMachineExtensionImagesClientListVersionsResponse contains the response from method VirtualMachineExtensionImagesClient.ListVersions.

type VirtualMachineExtensionInstanceView

type VirtualMachineExtensionInstanceView struct {
	// The virtual machine extension name.
	Name *string `json:"name,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// The resource status information.
	Substatuses []*InstanceViewStatus `json:"substatuses,omitempty"`

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string `json:"type,omitempty"`

	// Specifies the version of the script handler.
	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
}

VirtualMachineExtensionInstanceView - The instance view of a virtual machine extension.

func (VirtualMachineExtensionInstanceView) MarshalJSON

func (v VirtualMachineExtensionInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionInstanceView.

type VirtualMachineExtensionProperties

type VirtualMachineExtensionProperties struct {
	// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
	// however, the extension will not upgrade minor versions unless redeployed, even
	// with this property set to true.
	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`

	// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
	// available.
	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`

	// How the extension handler should be forced to update even if the extension configuration has not changed.
	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`

	// The virtual machine extension instance view.
	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`

	// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`

	// The extensions protected settings that are passed by reference, and consumed from key vault
	ProtectedSettingsFromKeyVault interface{} `json:"protectedSettingsFromKeyVault,omitempty"`

	// The name of the extension handler publisher.
	Publisher *string `json:"publisher,omitempty"`

	// Json formatted public settings for the extension.
	Settings interface{} `json:"settings,omitempty"`

	// Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting
	// to the VM will not be suppressed regardless of this value). The default is false.
	SuppressFailures *bool `json:"suppressFailures,omitempty"`

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string `json:"type,omitempty"`

	// Specifies the version of the script handler.
	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

VirtualMachineExtensionProperties - Describes the properties of a Virtual Machine Extension.

type VirtualMachineExtensionUpdate

type VirtualMachineExtensionUpdate struct {
	// Describes the properties of a Virtual Machine Extension.
	Properties *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

VirtualMachineExtensionUpdate - Describes a Virtual Machine Extension.

func (VirtualMachineExtensionUpdate) MarshalJSON

func (v VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionUpdate.

type VirtualMachineExtensionUpdateProperties

type VirtualMachineExtensionUpdateProperties struct {
	// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
	// however, the extension will not upgrade minor versions unless redeployed, even
	// with this property set to true.
	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`

	// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
	// available.
	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`

	// How the extension handler should be forced to update even if the extension configuration has not changed.
	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`

	// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`

	// The extensions protected settings that are passed by reference, and consumed from key vault
	ProtectedSettingsFromKeyVault interface{} `json:"protectedSettingsFromKeyVault,omitempty"`

	// The name of the extension handler publisher.
	Publisher *string `json:"publisher,omitempty"`

	// Json formatted public settings for the extension.
	Settings interface{} `json:"settings,omitempty"`

	// Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting
	// to the VM will not be suppressed regardless of this value). The default is false.
	SuppressFailures *bool `json:"suppressFailures,omitempty"`

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string `json:"type,omitempty"`

	// Specifies the version of the script handler.
	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
}

VirtualMachineExtensionUpdateProperties - Describes the properties of a Virtual Machine Extension.

type VirtualMachineExtensionsClient

type VirtualMachineExtensionsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineExtensionsClient contains the methods for the VirtualMachineExtensions group. Don't use this type directly, use NewVirtualMachineExtensionsClient() instead.

func NewVirtualMachineExtensionsClient

func NewVirtualMachineExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineExtensionsClient, error)

NewVirtualMachineExtensionsClient creates a new instance of VirtualMachineExtensionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineExtensionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation to create or update the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine where the extension should be created or updated. vmExtensionName - The name of the virtual machine extension. extensionParameters - Parameters supplied to the Create Virtual Machine Extension operation. options - VirtualMachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachineExtensions_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaa",
		armcompute.VirtualMachineExtension{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"key9183": to.Ptr("aa"),
			},
			Properties: &armcompute.VirtualMachineExtensionProperties{
				Type:                    to.Ptr("extType"),
				AutoUpgradeMinorVersion: to.Ptr(true),
				EnableAutomaticUpgrade:  to.Ptr(true),
				ForceUpdateTag:          to.Ptr("a"),
				InstanceView: &armcompute.VirtualMachineExtensionInstanceView{
					Name: to.Ptr("aaaaaaaaaaaaaaaaa"),
					Type: to.Ptr("aaaaaaaaa"),
					Statuses: []*armcompute.InstanceViewStatus{
						{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						}},
					Substatuses: []*armcompute.InstanceViewStatus{
						{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						}},
					TypeHandlerVersion: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"),
				},
				ProtectedSettings:  map[string]interface{}{},
				Publisher:          to.Ptr("extPublisher"),
				Settings:           map[string]interface{}{},
				SuppressFailures:   to.Ptr(true),
				TypeHandlerVersion: to.Ptr("1.2"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineExtensionsClient) BeginDelete

BeginDelete - The operation to delete the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine where the extension should be deleted. vmExtensionName - The name of the virtual machine extension. options - VirtualMachineExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachineExtensions_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineExtensionsClient) BeginUpdate

BeginUpdate - The operation to update the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine where the extension should be updated. vmExtensionName - The name of the virtual machine extension. extensionParameters - Parameters supplied to the Update Virtual Machine Extension operation. options - VirtualMachineExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachineExtensions_Update.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myVM",
		"myVMExtension",
		armcompute.VirtualMachineExtensionUpdate{
			Properties: &armcompute.VirtualMachineExtensionUpdateProperties{
				Type:                    to.Ptr("extType"),
				AutoUpgradeMinorVersion: to.Ptr(true),
				ProtectedSettingsFromKeyVault: map[string]interface{}{
					"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
					"sourceVault": map[string]interface{}{
						"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
					},
				},
				Publisher: to.Ptr("extPublisher"),
				Settings: map[string]interface{}{
					"UserName": "xyz@microsoft.com",
				},
				SuppressFailures:   to.Ptr(true),
				TypeHandlerVersion: to.Ptr("1.2"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineExtensionsClient) Get

Get - The operation to get the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine containing the extension. vmExtensionName - The name of the virtual machine extension. options - VirtualMachineExtensionsClientGetOptions contains the optional parameters for the VirtualMachineExtensionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachineExtensions_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaa",
		&armcompute.VirtualMachineExtensionsClientGetOptions{Expand: to.Ptr("aaaaaa")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineExtensionsClient) List

List - The operation to get all extensions of a Virtual Machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine containing the extension. options - VirtualMachineExtensionsClientListOptions contains the optional parameters for the VirtualMachineExtensionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachineExtensions_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"rgcompute",
		"aaaaaaaaaaaaa",
		&armcompute.VirtualMachineExtensionsClientListOptions{Expand: to.Ptr("aaaaaaaaaaaaaaaaa")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type VirtualMachineExtensionsClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachineExtensionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginCreateOrUpdate method.

type VirtualMachineExtensionsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineExtensionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginDelete method.

type VirtualMachineExtensionsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineExtensionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginUpdate method.

type VirtualMachineExtensionsClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachineExtensionsClientCreateOrUpdateResponse struct {
	VirtualMachineExtension
}

VirtualMachineExtensionsClientCreateOrUpdateResponse contains the response from method VirtualMachineExtensionsClient.CreateOrUpdate.

type VirtualMachineExtensionsClientDeleteResponse added in v0.3.0

type VirtualMachineExtensionsClientDeleteResponse struct {
}

VirtualMachineExtensionsClientDeleteResponse contains the response from method VirtualMachineExtensionsClient.Delete.

type VirtualMachineExtensionsClientGetOptions added in v0.3.0

type VirtualMachineExtensionsClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineExtensionsClientGetOptions contains the optional parameters for the VirtualMachineExtensionsClient.Get method.

type VirtualMachineExtensionsClientGetResponse added in v0.3.0

type VirtualMachineExtensionsClientGetResponse struct {
	VirtualMachineExtension
}

VirtualMachineExtensionsClientGetResponse contains the response from method VirtualMachineExtensionsClient.Get.

type VirtualMachineExtensionsClientListOptions added in v0.3.0

type VirtualMachineExtensionsClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineExtensionsClientListOptions contains the optional parameters for the VirtualMachineExtensionsClient.List method.

type VirtualMachineExtensionsClientListResponse added in v0.3.0

type VirtualMachineExtensionsClientListResponse struct {
	VirtualMachineExtensionsListResult
}

VirtualMachineExtensionsClientListResponse contains the response from method VirtualMachineExtensionsClient.List.

type VirtualMachineExtensionsClientUpdateResponse added in v0.3.0

type VirtualMachineExtensionsClientUpdateResponse struct {
	VirtualMachineExtension
}

VirtualMachineExtensionsClientUpdateResponse contains the response from method VirtualMachineExtensionsClient.Update.

type VirtualMachineExtensionsListResult

type VirtualMachineExtensionsListResult struct {
	// The list of extensions
	Value []*VirtualMachineExtension `json:"value,omitempty"`
}

VirtualMachineExtensionsListResult - The List Extension operation response

type VirtualMachineHealthStatus

type VirtualMachineHealthStatus struct {
	// READ-ONLY; The health status information for the VM.
	Status *InstanceViewStatus `json:"status,omitempty" azure:"ro"`
}

VirtualMachineHealthStatus - The health status of the VM.

type VirtualMachineIPTag

type VirtualMachineIPTag struct {
	// IP tag type. Example: FirstPartyUsage.
	IPTagType *string `json:"ipTagType,omitempty"`

	// IP tag associated with the public IP. Example: SQL, Storage etc.
	Tag *string `json:"tag,omitempty"`
}

VirtualMachineIPTag - Contains the IP tag associated with the public IP address.

type VirtualMachineIdentity

type VirtualMachineIdentity struct {
	// The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly
	// created identity and a set of user assigned identities. The type 'None' will
	// remove any identities from the virtual machine.
	Type *ResourceIdentityType `json:"type,omitempty"`

	// The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned
	// identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

VirtualMachineIdentity - Identity for the virtual machine.

func (VirtualMachineIdentity) MarshalJSON

func (v VirtualMachineIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineIdentity.

type VirtualMachineImage

type VirtualMachineImage struct {
	// REQUIRED; The supported Azure location of the resource.
	Location *string `json:"location,omitempty"`

	// REQUIRED; The name of the resource.
	Name *string `json:"name,omitempty"`

	// The extended location of the Virtual Machine.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`

	// Describes the properties of a Virtual Machine Image.
	Properties *VirtualMachineImageProperties `json:"properties,omitempty"`

	// Specifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize
	// your Azure resources
	// [https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md].
	Tags map[string]*string `json:"tags,omitempty"`
}

VirtualMachineImage - Describes a Virtual Machine Image.

func (VirtualMachineImage) MarshalJSON

func (v VirtualMachineImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineImage.

type VirtualMachineImageFeature

type VirtualMachineImageFeature struct {
	// The name of the feature.
	Name *string `json:"name,omitempty"`

	// The corresponding value for the feature.
	Value *string `json:"value,omitempty"`
}

VirtualMachineImageFeature - Specifies additional capabilities supported by the image

type VirtualMachineImageProperties

type VirtualMachineImageProperties struct {
	// Specifies the Architecture Type
	Architecture *ArchitectureTypes `json:"architecture,omitempty"`

	// Describes automatic OS upgrade properties on the image.
	AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
	DataDiskImages               []*DataDiskImage              `json:"dataDiskImages,omitempty"`

	// Specifies disallowed configuration for the VirtualMachine created from the image
	Disallowed *DisallowedConfiguration      `json:"disallowed,omitempty"`
	Features   []*VirtualMachineImageFeature `json:"features,omitempty"`

	// Specifies the HyperVGeneration Type
	HyperVGeneration *HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`

	// Contains the os disk image information.
	OSDiskImage *OSDiskImage `json:"osDiskImage,omitempty"`

	// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
	Plan *PurchasePlan `json:"plan,omitempty"`
}

VirtualMachineImageProperties - Describes the properties of a Virtual Machine Image.

func (VirtualMachineImageProperties) MarshalJSON

func (v VirtualMachineImageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageProperties.

type VirtualMachineImageResource

type VirtualMachineImageResource struct {
	// REQUIRED; The supported Azure location of the resource.
	Location *string `json:"location,omitempty"`

	// REQUIRED; The name of the resource.
	Name *string `json:"name,omitempty"`

	// The extended location of the Virtual Machine.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`

	// Specifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize
	// your Azure resources
	// [https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md].
	Tags map[string]*string `json:"tags,omitempty"`
}

VirtualMachineImageResource - Virtual machine image resource information.

func (VirtualMachineImageResource) MarshalJSON

func (v VirtualMachineImageResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageResource.

type VirtualMachineImagesClient

type VirtualMachineImagesClient struct {
	// contains filtered or unexported fields
}

VirtualMachineImagesClient contains the methods for the VirtualMachineImages group. Don't use this type directly, use NewVirtualMachineImagesClient() instead.

func NewVirtualMachineImagesClient

func NewVirtualMachineImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImagesClient, error)

NewVirtualMachineImagesClient creates a new instance of VirtualMachineImagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineImagesClient) Get

Get - Gets a virtual machine image. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. publisherName - A valid image publisher. offer - A valid image publisher offer. skus - A valid image SKU. version - A valid image SKU version. options - VirtualMachineImagesClientGetOptions contains the optional parameters for the VirtualMachineImagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"aaaaaa",
		"aaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesClient) List

List - Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. publisherName - A valid image publisher. offer - A valid image publisher offer. skus - A valid image SKU. options - VirtualMachineImagesClientListOptions contains the optional parameters for the VirtualMachineImagesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImages_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"aaaaaaaaaaaaaaa",
		"aaaaaa",
		"aaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineImagesClientListOptions{Expand: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"),
			Top:     to.Ptr[int32](18),
			Orderby: to.Ptr("aa"),
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesClient) ListOffers

ListOffers - Gets a list of virtual machine image offers for the specified location and publisher. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. publisherName - A valid image publisher. options - VirtualMachineImagesClientListOffersOptions contains the optional parameters for the VirtualMachineImagesClient.ListOffers method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImages_ListOffers_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListOffers(ctx,
		"aaaaaaa",
		"aaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesClient) ListPublishers

ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. options - VirtualMachineImagesClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesClient.ListPublishers method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImages_ListPublishers_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListPublishers(ctx,
		"aaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesClient) ListSKUs

ListSKUs - Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. publisherName - A valid image publisher. offer - A valid image publisher offer. options - VirtualMachineImagesClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesClient.ListSKUs method.

type VirtualMachineImagesClientGetOptions added in v0.3.0

type VirtualMachineImagesClientGetOptions struct {
}

VirtualMachineImagesClientGetOptions contains the optional parameters for the VirtualMachineImagesClient.Get method.

type VirtualMachineImagesClientGetResponse added in v0.3.0

type VirtualMachineImagesClientGetResponse struct {
	VirtualMachineImage
}

VirtualMachineImagesClientGetResponse contains the response from method VirtualMachineImagesClient.Get.

type VirtualMachineImagesClientListOffersOptions added in v0.3.0

type VirtualMachineImagesClientListOffersOptions struct {
}

VirtualMachineImagesClientListOffersOptions contains the optional parameters for the VirtualMachineImagesClient.ListOffers method.

type VirtualMachineImagesClientListOffersResponse added in v0.3.0

type VirtualMachineImagesClientListOffersResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesClientListOffersResponse contains the response from method VirtualMachineImagesClient.ListOffers.

type VirtualMachineImagesClientListOptions added in v0.3.0

type VirtualMachineImagesClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand  *string
	Orderby *string
	Top     *int32
}

VirtualMachineImagesClientListOptions contains the optional parameters for the VirtualMachineImagesClient.List method.

type VirtualMachineImagesClientListPublishersOptions added in v0.3.0

type VirtualMachineImagesClientListPublishersOptions struct {
}

VirtualMachineImagesClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesClient.ListPublishers method.

type VirtualMachineImagesClientListPublishersResponse added in v0.3.0

type VirtualMachineImagesClientListPublishersResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesClientListPublishersResponse contains the response from method VirtualMachineImagesClient.ListPublishers.

type VirtualMachineImagesClientListResponse added in v0.3.0

type VirtualMachineImagesClientListResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesClientListResponse contains the response from method VirtualMachineImagesClient.List.

type VirtualMachineImagesClientListSKUsOptions added in v0.3.0

type VirtualMachineImagesClientListSKUsOptions struct {
}

VirtualMachineImagesClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesClient.ListSKUs method.

type VirtualMachineImagesClientListSKUsResponse added in v0.3.0

type VirtualMachineImagesClientListSKUsResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesClientListSKUsResponse contains the response from method VirtualMachineImagesClient.ListSKUs.

type VirtualMachineImagesEdgeZoneClient

type VirtualMachineImagesEdgeZoneClient struct {
	// contains filtered or unexported fields
}

VirtualMachineImagesEdgeZoneClient contains the methods for the VirtualMachineImagesEdgeZone group. Don't use this type directly, use NewVirtualMachineImagesEdgeZoneClient() instead.

func NewVirtualMachineImagesEdgeZoneClient

func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImagesEdgeZoneClient, error)

NewVirtualMachineImagesEdgeZoneClient creates a new instance of VirtualMachineImagesEdgeZoneClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineImagesEdgeZoneClient) Get

Get - Gets a virtual machine image in an edge zone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. edgeZone - The name of the edge zone. publisherName - A valid image publisher. offer - A valid image publisher offer. skus - A valid image SKU. version - A valid image SKU version. options - VirtualMachineImagesEdgeZoneClientGetOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesEdgeZoneClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesEdgeZoneClient) List

List - Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. edgeZone - The name of the edge zone. publisherName - A valid image publisher. offer - A valid image publisher offer. skus - A valid image SKU. options - VirtualMachineImagesEdgeZoneClientListOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesEdgeZoneClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"aaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineImagesEdgeZoneClientListOptions{Expand: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"),
			Top:     to.Ptr[int32](12),
			Orderby: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesEdgeZoneClient) ListOffers

ListOffers - Gets a list of virtual machine image offers for the specified location, edge zone and publisher. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. edgeZone - The name of the edge zone. publisherName - A valid image publisher. options - VirtualMachineImagesEdgeZoneClientListOffersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListOffers method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListOffers_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesEdgeZoneClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListOffers(ctx,
		"aaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesEdgeZoneClient) ListPublishers

ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location and edge zone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. edgeZone - The name of the edge zone. options - VirtualMachineImagesEdgeZoneClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListPublishers method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListPublishers_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineImagesEdgeZoneClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListPublishers(ctx,
		"aaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineImagesEdgeZoneClient) ListSKUs

ListSKUs - Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The name of a supported Azure region. edgeZone - The name of the edge zone. publisherName - A valid image publisher. offer - A valid image publisher offer. options - VirtualMachineImagesEdgeZoneClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListSKUs method.

type VirtualMachineImagesEdgeZoneClientGetOptions added in v0.3.0

type VirtualMachineImagesEdgeZoneClientGetOptions struct {
}

VirtualMachineImagesEdgeZoneClientGetOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.Get method.

type VirtualMachineImagesEdgeZoneClientGetResponse added in v0.3.0

type VirtualMachineImagesEdgeZoneClientGetResponse struct {
	VirtualMachineImage
}

VirtualMachineImagesEdgeZoneClientGetResponse contains the response from method VirtualMachineImagesEdgeZoneClient.Get.

type VirtualMachineImagesEdgeZoneClientListOffersOptions added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListOffersOptions struct {
}

VirtualMachineImagesEdgeZoneClientListOffersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListOffers method.

type VirtualMachineImagesEdgeZoneClientListOffersResponse added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListOffersResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesEdgeZoneClientListOffersResponse contains the response from method VirtualMachineImagesEdgeZoneClient.ListOffers.

type VirtualMachineImagesEdgeZoneClientListOptions added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
	// Specifies the order of the results returned. Formatted as an OData query.
	Orderby *string
	// An integer value specifying the number of images to return that matches supplied values.
	Top *int32
}

VirtualMachineImagesEdgeZoneClientListOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.List method.

type VirtualMachineImagesEdgeZoneClientListPublishersOptions added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListPublishersOptions struct {
}

VirtualMachineImagesEdgeZoneClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListPublishers method.

type VirtualMachineImagesEdgeZoneClientListPublishersResponse added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListPublishersResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesEdgeZoneClientListPublishersResponse contains the response from method VirtualMachineImagesEdgeZoneClient.ListPublishers.

type VirtualMachineImagesEdgeZoneClientListResponse added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesEdgeZoneClientListResponse contains the response from method VirtualMachineImagesEdgeZoneClient.List.

type VirtualMachineImagesEdgeZoneClientListSKUsOptions added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListSKUsOptions struct {
}

VirtualMachineImagesEdgeZoneClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListSKUs method.

type VirtualMachineImagesEdgeZoneClientListSKUsResponse added in v0.3.0

type VirtualMachineImagesEdgeZoneClientListSKUsResponse struct {
	// Array of VirtualMachineImageResource
	VirtualMachineImageResourceArray []*VirtualMachineImageResource
}

VirtualMachineImagesEdgeZoneClientListSKUsResponse contains the response from method VirtualMachineImagesEdgeZoneClient.ListSKUs.

type VirtualMachineInstallPatchesParameters

type VirtualMachineInstallPatchesParameters struct {
	// REQUIRED; Defines when it is acceptable to reboot a VM during a software update operation.
	RebootSetting *VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"`

	// Input for InstallPatches on a Linux VM, as directly received by the API
	LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"`

	// Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such
	// as PT4H (4 hours)
	MaximumDuration *string `json:"maximumDuration,omitempty"`

	// Input for InstallPatches on a Windows VM, as directly received by the API
	WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"`
}

VirtualMachineInstallPatchesParameters - Input for InstallPatches as directly received by the API

type VirtualMachineInstallPatchesResult

type VirtualMachineInstallPatchesResult struct {
	// READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
	Error *APIError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; The number of patches that were not installed due to the user blocking their installation.
	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details.
	FailedPatchCount *int32 `json:"failedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
	// logs.
	InstallationActivityID *string `json:"installationActivityId,omitempty" azure:"ro"`

	// READ-ONLY; The number of patches successfully installed.
	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; Whether the operation ran out of time before it completed all its intended actions.
	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty" azure:"ro"`

	// READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria.
	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The patches that were installed during the operation.
	Patches []*PatchInstallationDetail `json:"patches,omitempty" azure:"ro"`

	// READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed.
	// Typically this happens when maintenanceWindowExceeded == true.
	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty" azure:"ro"`

	// READ-ONLY; The reboot state of the VM following completion of the operation.
	RebootStatus *VMGuestPatchRebootStatus `json:"rebootStatus,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the operation began.
	StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"`

	// READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
	// At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings."
	Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"`
}

VirtualMachineInstallPatchesResult - The result summary of an installation operation.

func (*VirtualMachineInstallPatchesResult) UnmarshalJSON

func (v *VirtualMachineInstallPatchesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstallPatchesResult.

type VirtualMachineInstanceView

type VirtualMachineInstanceView struct {
	// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
	// You can easily view the output of your console log.
	// Azure also enables you to see a screenshot of the VM from the hypervisor.
	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`

	// The computer name assigned to the virtual machine.
	ComputerName *string `json:"computerName,omitempty"`

	// The virtual machine disk information.
	Disks []*DiskInstanceView `json:"disks,omitempty"`

	// The extensions information.
	Extensions []*VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`

	// Specifies the HyperVGeneration Type associated with a resource
	HyperVGeneration *HyperVGenerationType `json:"hyperVGeneration,omitempty"`

	// The Maintenance Operation status on the virtual machine.
	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`

	// The Operating System running on the virtual machine.
	OSName *string `json:"osName,omitempty"`

	// The version of Operating System running on the virtual machine.
	OSVersion *string `json:"osVersion,omitempty"`

	// [Preview Feature] The status of virtual machine patch operations.
	PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"`

	// Specifies the fault domain of the virtual machine.
	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`

	// Specifies the update domain of the virtual machine.
	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`

	// The Remote desktop certificate thumbprint.
	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// The VM Agent running on the virtual machine.
	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`

	// READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when
	// the virtual machine is associated with a dedicated host group that has automatic
	// placement enabled.
	// Minimum api-version: 2020-06-01.
	AssignedHost *string `json:"assignedHost,omitempty" azure:"ro"`

	// READ-ONLY; The health status for the VM.
	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty" azure:"ro"`
}

VirtualMachineInstanceView - The instance view of a virtual machine.

func (VirtualMachineInstanceView) MarshalJSON

func (v VirtualMachineInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceView.

type VirtualMachineListResult

type VirtualMachineListResult struct {
	// REQUIRED; The list of virtual machines.
	Value []*VirtualMachine `json:"value,omitempty"`

	// The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineListResult - The List Virtual Machine operation response.

type VirtualMachineNetworkInterfaceConfiguration

type VirtualMachineNetworkInterfaceConfiguration struct {
	// REQUIRED; The network interface configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machine network profile's IP configuration.
	Properties *VirtualMachineNetworkInterfaceConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineNetworkInterfaceConfiguration - Describes a virtual machine network interface configurations.

type VirtualMachineNetworkInterfaceConfigurationProperties

type VirtualMachineNetworkInterfaceConfigurationProperties struct {
	// REQUIRED; Specifies the IP configurations of the network interface.
	IPConfigurations []*VirtualMachineNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`

	// The dns settings to be applied on the network interfaces.
	DNSSettings *VirtualMachineNetworkInterfaceDNSSettingsConfiguration `json:"dnsSettings,omitempty"`

	// Specify what happens to the network interface when the VM is deleted
	DeleteOption      *DeleteOptions `json:"deleteOption,omitempty"`
	DscpConfiguration *SubResource   `json:"dscpConfiguration,omitempty"`

	// Specifies whether the network interface is accelerated networking-enabled.
	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`

	// Specifies whether the network interface is FPGA networking-enabled.
	EnableFpga *bool `json:"enableFpga,omitempty"`

	// Whether IP forwarding enabled on this NIC.
	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`

	// The network security group.
	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`

	// Specifies the primary network interface in case the virtual machine has more than 1 network interface.
	Primary *bool `json:"primary,omitempty"`
}

VirtualMachineNetworkInterfaceConfigurationProperties - Describes a virtual machine network profile's IP configuration.

func (VirtualMachineNetworkInterfaceConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceConfigurationProperties.

type VirtualMachineNetworkInterfaceDNSSettingsConfiguration

type VirtualMachineNetworkInterfaceDNSSettingsConfiguration struct {
	// List of DNS servers IP addresses
	DNSServers []*string `json:"dnsServers,omitempty"`
}

VirtualMachineNetworkInterfaceDNSSettingsConfiguration - Describes a virtual machines network configuration's DNS settings.

func (VirtualMachineNetworkInterfaceDNSSettingsConfiguration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceDNSSettingsConfiguration.

type VirtualMachineNetworkInterfaceIPConfiguration

type VirtualMachineNetworkInterfaceIPConfiguration struct {
	// REQUIRED; The IP configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machine network interface IP configuration properties.
	Properties *VirtualMachineNetworkInterfaceIPConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineNetworkInterfaceIPConfiguration - Describes a virtual machine network profile's IP configuration.

type VirtualMachineNetworkInterfaceIPConfigurationProperties

type VirtualMachineNetworkInterfaceIPConfigurationProperties struct {
	// Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend
	// address pools of multiple application gateways. Multiple virtual machines
	// cannot use the same application gateway.
	ApplicationGatewayBackendAddressPools []*SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`

	// Specifies an array of references to application security group.
	ApplicationSecurityGroups []*SubResource `json:"applicationSecurityGroups,omitempty"`

	// Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address
	// pools of one public and one internal load balancer. [Multiple virtual
	// machines cannot use the same basic sku load balancer].
	LoadBalancerBackendAddressPools []*SubResource `json:"loadBalancerBackendAddressPools,omitempty"`

	// Specifies the primary network interface in case the virtual machine has more than 1 network interface.
	Primary *bool `json:"primary,omitempty"`

	// 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'.
	PrivateIPAddressVersion *IPVersions `json:"privateIPAddressVersion,omitempty"`

	// The publicIPAddressConfiguration.
	PublicIPAddressConfiguration *VirtualMachinePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`

	// Specifies the identifier of the subnet.
	Subnet *SubResource `json:"subnet,omitempty"`
}

VirtualMachineNetworkInterfaceIPConfigurationProperties - Describes a virtual machine network interface IP configuration properties.

func (VirtualMachineNetworkInterfaceIPConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceIPConfigurationProperties.

type VirtualMachinePatchStatus

type VirtualMachinePatchStatus struct {
	// The available patch summary of the latest assessment operation for the virtual machine.
	AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"`

	// The installation summary of the latest installation operation for the virtual machine.
	LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"`

	// READ-ONLY; The enablement status of the specified patchMode
	ConfigurationStatuses []*InstanceViewStatus `json:"configurationStatuses,omitempty" azure:"ro"`
}

VirtualMachinePatchStatus - The status of virtual machine patch operations.

func (VirtualMachinePatchStatus) MarshalJSON

func (v VirtualMachinePatchStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachinePatchStatus.

type VirtualMachinePriorityTypes

type VirtualMachinePriorityTypes string

VirtualMachinePriorityTypes - Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS.

const (
	VirtualMachinePriorityTypesLow     VirtualMachinePriorityTypes = "Low"
	VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular"
	VirtualMachinePriorityTypesSpot    VirtualMachinePriorityTypes = "Spot"
)

func PossibleVirtualMachinePriorityTypesValues

func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes

PossibleVirtualMachinePriorityTypesValues returns the possible values for the VirtualMachinePriorityTypes const type.

type VirtualMachineProperties

type VirtualMachineProperties struct {
	// Specifies additional capabilities enabled or disabled on the virtual machine.
	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`

	// Specifies the gallery applications that should be made available to the VM/VMSS
	ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"`

	// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
	// in the same availability set are allocated to different nodes to maximize
	// availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview].
	// For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates]
	// Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added
	// should be under the same resource group as the availability set resource. An
	// existing VM cannot be added to an availability set.
	// This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`

	// Specifies the billing related details of a Azure Spot virtual machine.
	// Minimum api-version: 2019-03-01.
	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`

	// Specifies information about the capacity reservation that is used to allocate virtual machine.
	// Minimum api-version: 2021-04-01.
	CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"`

	// Specifies the boot diagnostic settings state.
	// Minimum api-version: 2015-06-15.
	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`

	// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
	// For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
	// For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
	EvictionPolicy *VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`

	// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes
	// (inclusive) and should be specified in ISO 8601 format. The default value is 90
	// minutes (PT1H30M).
	// Minimum api-version: 2020-06-01
	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`

	// Specifies the hardware settings for the virtual machine.
	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`

	// Specifies information about the dedicated host that the virtual machine resides in.
	// Minimum api-version: 2018-10-01.
	Host *SubResource `json:"host,omitempty"`

	// Specifies information about the dedicated host group that the virtual machine resides in.
	// Minimum api-version: 2020-06-01.
	// NOTE: User cannot specify both host and hostGroup properties.
	HostGroup *SubResource `json:"hostGroup,omitempty"`

	// Specifies that the image or disk that is being used was licensed on-premises.
	// Possible values for Windows Server operating system are:
	// WindowsClient
	// WindowsServer
	// Possible values for Linux Server operating system are:
	// RHELBYOS (for RHEL)
	// SLESBYOS (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]
	// Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux]
	// Minimum api-version: 2015-06-15
	LicenseType *string `json:"licenseType,omitempty"`

	// Specifies the network interfaces of the virtual machine.
	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`

	// Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed
	// once VM is provisioned.
	OSProfile *OSProfile `json:"osProfile,omitempty"`

	// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine
	// will by automatically assigned to a fault domain that best maintains
	// balance across available fault domains.
	// This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.The Virtual Machine Scale
	// Set that is referenced, must have 'platformFaultDomainCount' > 1.This property
	// cannot be updated once the Virtual Machine is created.Fault domain assignment can be viewed in the Virtual Machine Instance
	// View.
	// Minimum api‐version: 2020‐12‐01
	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`

	// Specifies the priority for the virtual machine.
	// Minimum api-version: 2019-03-01
	Priority *VirtualMachinePriorityTypes `json:"priority,omitempty"`

	// Specifies information about the proximity placement group that the virtual machine should be assigned to.
	// Minimum api-version: 2018-04-01.
	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`

	// Specifies Scheduled Event related configurations.
	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`

	// Specifies the Security related profile settings for the virtual machine.
	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`

	// Specifies the storage settings for the virtual machine disks.
	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`

	// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
	// Minimum api-version: 2021-03-01
	UserData *string `json:"userData,omitempty"`

	// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines
	// specified in the same virtual machine scale set are allocated to different
	// nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing
	// VM cannot be added to a virtual machine scale set.
	// This property cannot exist along with a non-null properties.availabilitySet reference.
	// Minimum api‐version: 2019‐03‐01
	VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`

	// READ-ONLY; The virtual machine instance view.
	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the time at which the Virtual Machine resource was created.
	// Minimum api-version: 2022-03-01.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS
	// and can be read using platform BIOS commands.
	VMID *string `json:"vmId,omitempty" azure:"ro"`
}

VirtualMachineProperties - Describes the properties of a Virtual Machine.

func (VirtualMachineProperties) MarshalJSON added in v0.4.0

func (v VirtualMachineProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.

func (*VirtualMachineProperties) UnmarshalJSON added in v0.4.0

func (v *VirtualMachineProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProperties.

type VirtualMachinePublicIPAddressConfiguration

type VirtualMachinePublicIPAddressConfiguration struct {
	// REQUIRED; The publicIP address configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machines IP Configuration's PublicIPAddress configuration
	Properties *VirtualMachinePublicIPAddressConfigurationProperties `json:"properties,omitempty"`

	// Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
	SKU *PublicIPAddressSKU `json:"sku,omitempty"`
}

VirtualMachinePublicIPAddressConfiguration - Describes a virtual machines IP Configuration's PublicIPAddress configuration

type VirtualMachinePublicIPAddressConfigurationProperties

type VirtualMachinePublicIPAddressConfigurationProperties struct {
	// The dns settings to be applied on the publicIP addresses .
	DNSSettings *VirtualMachinePublicIPAddressDNSSettingsConfiguration `json:"dnsSettings,omitempty"`

	// Specify what happens to the public IP address when the VM is deleted
	DeleteOption *DeleteOptions `json:"deleteOption,omitempty"`

	// The list of IP tags associated with the public IP address.
	IPTags []*VirtualMachineIPTag `json:"ipTags,omitempty"`

	// The idle timeout of the public IP address.
	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`

	// Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
	// is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
	PublicIPAddressVersion *IPVersions `json:"publicIPAddressVersion,omitempty"`

	// Specify the public IP allocation type
	PublicIPAllocationMethod *PublicIPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`

	// The PublicIPPrefix from which to allocate publicIP addresses.
	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
}

VirtualMachinePublicIPAddressConfigurationProperties - Describes a virtual machines IP Configuration's PublicIPAddress configuration

func (VirtualMachinePublicIPAddressConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachinePublicIPAddressConfigurationProperties.

type VirtualMachinePublicIPAddressDNSSettingsConfiguration

type VirtualMachinePublicIPAddressDNSSettingsConfiguration struct {
	// REQUIRED; The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label
	// is the concatenation of the domain name label and vm network profile unique ID.
	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
}

VirtualMachinePublicIPAddressDNSSettingsConfiguration - Describes a virtual machines network configuration's DNS settings.

type VirtualMachineReimageParameters

type VirtualMachineReimageParameters struct {
	// Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported
	// for VM/VMSS with Ephemeral OS disk.
	TempDisk *bool `json:"tempDisk,omitempty"`
}

VirtualMachineReimageParameters - Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged

type VirtualMachineRunCommand

type VirtualMachineRunCommand struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Describes the properties of a Virtual Machine run command.
	Properties *VirtualMachineRunCommandProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineRunCommand - Describes a Virtual Machine run command.

func (VirtualMachineRunCommand) MarshalJSON

func (v VirtualMachineRunCommand) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommand.

type VirtualMachineRunCommandInstanceView

type VirtualMachineRunCommandInstanceView struct {
	// Script end time.
	EndTime *time.Time `json:"endTime,omitempty"`

	// Script error stream.
	Error *string `json:"error,omitempty"`

	// Communicate script configuration errors or execution messages.
	ExecutionMessage *string `json:"executionMessage,omitempty"`

	// Script execution status.
	ExecutionState *ExecutionState `json:"executionState,omitempty"`

	// Exit code returned from script execution.
	ExitCode *int32 `json:"exitCode,omitempty"`

	// Script output stream.
	Output *string `json:"output,omitempty"`

	// Script start time.
	StartTime *time.Time `json:"startTime,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`
}

VirtualMachineRunCommandInstanceView - The instance view of a virtual machine run command.

func (VirtualMachineRunCommandInstanceView) MarshalJSON

func (v VirtualMachineRunCommandInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandInstanceView.

func (*VirtualMachineRunCommandInstanceView) UnmarshalJSON

func (v *VirtualMachineRunCommandInstanceView) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandInstanceView.

type VirtualMachineRunCommandProperties

type VirtualMachineRunCommandProperties struct {
	// Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
	AsyncExecution *bool `json:"asyncExecution,omitempty"`

	// Specifies the Azure storage blob where script error stream will be uploaded.
	ErrorBlobURI *string `json:"errorBlobUri,omitempty"`

	// Specifies the Azure storage blob where script output stream will be uploaded.
	OutputBlobURI *string `json:"outputBlobUri,omitempty"`

	// The parameters used by the script.
	Parameters []*RunCommandInputParameter `json:"parameters,omitempty"`

	// The parameters used by the script.
	ProtectedParameters []*RunCommandInputParameter `json:"protectedParameters,omitempty"`

	// Specifies the user account password on the VM when executing the run command.
	RunAsPassword *string `json:"runAsPassword,omitempty"`

	// Specifies the user account on the VM when executing the run command.
	RunAsUser *string `json:"runAsUser,omitempty"`

	// The source of the run command script.
	Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`

	// The timeout in seconds to execute the run command.
	TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"`

	// READ-ONLY; The virtual machine run command instance view.
	InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

VirtualMachineRunCommandProperties - Describes the properties of a Virtual Machine run command.

func (VirtualMachineRunCommandProperties) MarshalJSON

func (v VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandProperties.

type VirtualMachineRunCommandScriptSource

type VirtualMachineRunCommandScriptSource struct {
	// Specifies a commandId of predefined built-in script.
	CommandID *string `json:"commandId,omitempty"`

	// Specifies the script content to be executed on the VM.
	Script *string `json:"script,omitempty"`

	// Specifies the script download location.
	ScriptURI *string `json:"scriptUri,omitempty"`
}

VirtualMachineRunCommandScriptSource - Describes the script sources for run command.

type VirtualMachineRunCommandUpdate

type VirtualMachineRunCommandUpdate struct {
	// Describes the properties of a Virtual Machine run command.
	Properties *VirtualMachineRunCommandProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

VirtualMachineRunCommandUpdate - Describes a Virtual Machine run command.

func (VirtualMachineRunCommandUpdate) MarshalJSON

func (v VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandUpdate.

type VirtualMachineRunCommandsClient

type VirtualMachineRunCommandsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineRunCommandsClient contains the methods for the VirtualMachineRunCommands group. Don't use this type directly, use NewVirtualMachineRunCommandsClient() instead.

func NewVirtualMachineRunCommandsClient

func NewVirtualMachineRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineRunCommandsClient, error)

NewVirtualMachineRunCommandsClient creates a new instance of VirtualMachineRunCommandsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineRunCommandsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation to create or update the run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine where the run command should be created or updated. runCommandName - The name of the virtual machine run command. runCommand - Parameters supplied to the Create Virtual Machine RunCommand operation. options - VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineRunCommand_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myVM",
		"myRunCommand",
		armcompute.VirtualMachineRunCommand{
			Location: to.Ptr("West US"),
			Properties: &armcompute.VirtualMachineRunCommandProperties{
				AsyncExecution: to.Ptr(false),
				Parameters: []*armcompute.RunCommandInputParameter{
					{
						Name:  to.Ptr("param1"),
						Value: to.Ptr("value1"),
					},
					{
						Name:  to.Ptr("param2"),
						Value: to.Ptr("value2"),
					}},
				RunAsPassword: to.Ptr("<runAsPassword>"),
				RunAsUser:     to.Ptr("user1"),
				Source: &armcompute.VirtualMachineRunCommandScriptSource{
					Script: to.Ptr("Write-Host Hello World!"),
				},
				TimeoutInSeconds: to.Ptr[int32](3600),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineRunCommandsClient) BeginDelete

BeginDelete - The operation to delete the run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine where the run command should be deleted. runCommandName - The name of the virtual machine run command. options - VirtualMachineRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineRunCommand_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myVM",
		"myRunCommand",
		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)
	}
}
Output:

func (*VirtualMachineRunCommandsClient) BeginUpdate

BeginUpdate - The operation to update the run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine where the run command should be updated. runCommandName - The name of the virtual machine run command. runCommand - Parameters supplied to the Update Virtual Machine RunCommand operation. options - VirtualMachineRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineRunCommand_Update.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myVM",
		"myRunCommand",
		armcompute.VirtualMachineRunCommandUpdate{
			Properties: &armcompute.VirtualMachineRunCommandProperties{
				Source: &armcompute.VirtualMachineRunCommandScriptSource{
					Script: to.Ptr("Write-Host Script Source Updated!"),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineRunCommandsClient) Get

Get - Gets specific run command for a subscription in a location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location upon which run commands is queried. commandID - The command id. options - VirtualMachineRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineRunCommandsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/RunCommand_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("24fb23e3-6ba3-41f0-9b6e-e41131d5d61e", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SoutheastAsia",
		"RunPowerShellScript",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineRunCommandsClient) GetByVirtualMachine

GetByVirtualMachine - The operation to get the run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine containing the run command. runCommandName - The name of the virtual machine run command. options - VirtualMachineRunCommandsClientGetByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.GetByVirtualMachine method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineRunCommand_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetByVirtualMachine(ctx,
		"myResourceGroup",
		"myVM",
		"myRunCommand",
		&armcompute.VirtualMachineRunCommandsClientGetByVirtualMachineOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineRunCommandsClient) NewListByVirtualMachinePager added in v0.7.0

NewListByVirtualMachinePager - The operation to get all run commands of a Virtual Machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine containing the run command. options - VirtualMachineRunCommandsClientListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.ListByVirtualMachine method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineRunCommand_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByVirtualMachinePager("myResourceGroup",
		"myVM",
		&armcompute.VirtualMachineRunCommandsClientListByVirtualMachineOptions{Expand: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachineRunCommandsClient) NewListPager added in v0.7.0

NewListPager - Lists all available run commands for a subscription in a location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location upon which run commands is queried. options - VirtualMachineRunCommandsClientListOptions contains the optional parameters for the VirtualMachineRunCommandsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/RunCommand_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineRunCommandsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("SoutheastAsia",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginCreateOrUpdate method.

type VirtualMachineRunCommandsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineRunCommandsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginDelete method.

type VirtualMachineRunCommandsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineRunCommandsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginUpdate method.

type VirtualMachineRunCommandsClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachineRunCommandsClientCreateOrUpdateResponse struct {
	VirtualMachineRunCommand
}

VirtualMachineRunCommandsClientCreateOrUpdateResponse contains the response from method VirtualMachineRunCommandsClient.CreateOrUpdate.

type VirtualMachineRunCommandsClientDeleteResponse added in v0.3.0

type VirtualMachineRunCommandsClientDeleteResponse struct {
}

VirtualMachineRunCommandsClientDeleteResponse contains the response from method VirtualMachineRunCommandsClient.Delete.

type VirtualMachineRunCommandsClientGetByVirtualMachineOptions added in v0.3.0

type VirtualMachineRunCommandsClientGetByVirtualMachineOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineRunCommandsClientGetByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.GetByVirtualMachine method.

type VirtualMachineRunCommandsClientGetByVirtualMachineResponse added in v0.3.0

type VirtualMachineRunCommandsClientGetByVirtualMachineResponse struct {
	VirtualMachineRunCommand
}

VirtualMachineRunCommandsClientGetByVirtualMachineResponse contains the response from method VirtualMachineRunCommandsClient.GetByVirtualMachine.

type VirtualMachineRunCommandsClientGetOptions added in v0.3.0

type VirtualMachineRunCommandsClientGetOptions struct {
}

VirtualMachineRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineRunCommandsClient.Get method.

type VirtualMachineRunCommandsClientGetResponse added in v0.3.0

type VirtualMachineRunCommandsClientGetResponse struct {
	RunCommandDocument
}

VirtualMachineRunCommandsClientGetResponse contains the response from method VirtualMachineRunCommandsClient.Get.

type VirtualMachineRunCommandsClientListByVirtualMachineOptions added in v0.3.0

type VirtualMachineRunCommandsClientListByVirtualMachineOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineRunCommandsClientListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.ListByVirtualMachine method.

type VirtualMachineRunCommandsClientListByVirtualMachineResponse added in v0.3.0

type VirtualMachineRunCommandsClientListByVirtualMachineResponse struct {
	VirtualMachineRunCommandsListResult
}

VirtualMachineRunCommandsClientListByVirtualMachineResponse contains the response from method VirtualMachineRunCommandsClient.ListByVirtualMachine.

type VirtualMachineRunCommandsClientListOptions added in v0.3.0

type VirtualMachineRunCommandsClientListOptions struct {
}

VirtualMachineRunCommandsClientListOptions contains the optional parameters for the VirtualMachineRunCommandsClient.List method.

type VirtualMachineRunCommandsClientListResponse added in v0.3.0

type VirtualMachineRunCommandsClientListResponse struct {
	RunCommandListResult
}

VirtualMachineRunCommandsClientListResponse contains the response from method VirtualMachineRunCommandsClient.List.

type VirtualMachineRunCommandsClientUpdateResponse added in v0.3.0

type VirtualMachineRunCommandsClientUpdateResponse struct {
	VirtualMachineRunCommand
}

VirtualMachineRunCommandsClientUpdateResponse contains the response from method VirtualMachineRunCommandsClient.Update.

type VirtualMachineRunCommandsListResult

type VirtualMachineRunCommandsListResult struct {
	// REQUIRED; The list of run commands
	Value []*VirtualMachineRunCommand `json:"value,omitempty"`

	// The uri to fetch the next page of run commands.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineRunCommandsListResult - The List run command operation response

type VirtualMachineScaleSet

type VirtualMachineScaleSet struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The extended location of the Virtual Machine Scale Set.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// The identity of the virtual machine scale set, if configured.
	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`

	// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
	// images. Before you can use a marketplace image from an API, you must
	// enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
	// Want to deploy programmatically, Get Started ->. Enter any required
	// information and then click Save.
	Plan *Plan `json:"plan,omitempty"`

	// Describes the properties of a Virtual Machine Scale Set.
	Properties *VirtualMachineScaleSetProperties `json:"properties,omitempty"`

	// The virtual machine scale set sku.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineScaleSet - Describes a Virtual Machine Scale Set.

func (VirtualMachineScaleSet) MarshalJSON

func (v VirtualMachineScaleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSet.

type VirtualMachineScaleSetDataDisk

type VirtualMachineScaleSetDataDisk struct {
	// REQUIRED; The create option.
	CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"`

	// REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
	// therefore must be unique for each data disk attached to a VM.
	Lun *int32 `json:"lun,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with
	// Flexible OrchestrationMode only).
	// Possible values:
	// Delete If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.
	// Detach If this value is used, the data disk is retained after VMSS Flex VM is deleted.
	// The default value is set to Delete.
	DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"`

	// Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not
	// specified, a default value would be assigned based on diskSizeGB.
	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`

	// Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS.
	// If not specified, a default value would be assigned based on diskSizeGB.
	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`

	// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
	// virtual machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// The managed disk parameters.
	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`

	// The disk name.
	Name *string `json:"name,omitempty"`

	// Specifies whether writeAccelerator should be enabled or disabled on the disk.
	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
}

VirtualMachineScaleSetDataDisk - Describes a virtual machine scale set data disk.

type VirtualMachineScaleSetExtension

type VirtualMachineScaleSetExtension struct {
	// The name of the extension.
	Name *string `json:"name,omitempty"`

	// Describes the properties of a Virtual Machine Scale Set Extension.
	Properties *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineScaleSetExtension - Describes a Virtual Machine Scale Set Extension.

type VirtualMachineScaleSetExtensionListResult

type VirtualMachineScaleSetExtensionListResult struct {
	// REQUIRED; The list of VM scale set extensions.
	Value []*VirtualMachineScaleSetExtension `json:"value,omitempty"`

	// The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale
	// set extensions.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineScaleSetExtensionListResult - The List VM scale set extension operation response.

type VirtualMachineScaleSetExtensionProfile

type VirtualMachineScaleSetExtensionProfile struct {
	// The virtual machine scale set child extension resources.
	Extensions []*VirtualMachineScaleSetExtension `json:"extensions,omitempty"`

	// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes
	// (inclusive) and should be specified in ISO 8601 format. The default value is 90
	// minutes (PT1H30M).
	// Minimum api-version: 2020-06-01
	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
}

VirtualMachineScaleSetExtensionProfile - Describes a virtual machine scale set extension profile.

func (VirtualMachineScaleSetExtensionProfile) MarshalJSON

func (v VirtualMachineScaleSetExtensionProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionProfile.

type VirtualMachineScaleSetExtensionProperties

type VirtualMachineScaleSetExtensionProperties struct {
	// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
	// however, the extension will not upgrade minor versions unless redeployed, even
	// with this property set to true.
	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`

	// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
	// available.
	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`

	// If a value is provided and is different from the previous value, the extension handler will be forced to update even if
	// the extension configuration has not changed.
	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`

	// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`

	// The extensions protected settings that are passed by reference, and consumed from key vault
	ProtectedSettingsFromKeyVault interface{} `json:"protectedSettingsFromKeyVault,omitempty"`

	// Collection of extension names after which this extension needs to be provisioned.
	ProvisionAfterExtensions []*string `json:"provisionAfterExtensions,omitempty"`

	// The name of the extension handler publisher.
	Publisher *string `json:"publisher,omitempty"`

	// Json formatted public settings for the extension.
	Settings interface{} `json:"settings,omitempty"`

	// Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting
	// to the VM will not be suppressed regardless of this value). The default is false.
	SuppressFailures *bool `json:"suppressFailures,omitempty"`

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string `json:"type,omitempty"`

	// Specifies the version of the script handler.
	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

VirtualMachineScaleSetExtensionProperties - Describes the properties of a Virtual Machine Scale Set Extension.

func (VirtualMachineScaleSetExtensionProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionProperties.

type VirtualMachineScaleSetExtensionUpdate

type VirtualMachineScaleSetExtensionUpdate struct {
	// Describes the properties of a Virtual Machine Scale Set Extension.
	Properties *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the extension.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineScaleSetExtensionUpdate - Describes a Virtual Machine Scale Set Extension.

func (VirtualMachineScaleSetExtensionUpdate) MarshalJSON

func (v VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionUpdate.

type VirtualMachineScaleSetExtensionsClient

type VirtualMachineScaleSetExtensionsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineScaleSetExtensionsClient contains the methods for the VirtualMachineScaleSetExtensions group. Don't use this type directly, use NewVirtualMachineScaleSetExtensionsClient() instead.

func NewVirtualMachineScaleSetExtensionsClient

func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetExtensionsClient, error)

NewVirtualMachineScaleSetExtensionsClient creates a new instance of VirtualMachineScaleSetExtensionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineScaleSetExtensionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation to create or update an extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set where the extension should be create or updated. vmssExtensionName - The name of the VM scale set extension. extensionParameters - Parameters supplied to the Create VM scale set Extension operation. options - VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtensions_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"rgcompute",
		"aaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaa",
		armcompute.VirtualMachineScaleSetExtension{
			Name: to.Ptr("{extension-name}"),
			Properties: &armcompute.VirtualMachineScaleSetExtensionProperties{
				Type:                    to.Ptr("{extension-Type}"),
				AutoUpgradeMinorVersion: to.Ptr(true),
				EnableAutomaticUpgrade:  to.Ptr(true),
				ForceUpdateTag:          to.Ptr("aaaaaaaaa"),
				ProtectedSettings:       map[string]interface{}{},
				ProvisionAfterExtensions: []*string{
					to.Ptr("aa")},
				Publisher:          to.Ptr("{extension-Publisher}"),
				Settings:           map[string]interface{}{},
				SuppressFailures:   to.Ptr(true),
				TypeHandlerVersion: to.Ptr("{handler-version}"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetExtensionsClient) BeginDelete

BeginDelete - The operation to delete the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set where the extension should be deleted. vmssExtensionName - The name of the VM scale set extension. options - VirtualMachineScaleSetExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtensions_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetExtensionsClient) BeginUpdate

BeginUpdate - The operation to update an extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set where the extension should be updated. vmssExtensionName - The name of the VM scale set extension. extensionParameters - Parameters supplied to the Update VM scale set Extension operation. options - VirtualMachineScaleSetExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtensions_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaa",
		armcompute.VirtualMachineScaleSetExtensionUpdate{
			Properties: &armcompute.VirtualMachineScaleSetExtensionProperties{
				Type:                    to.Ptr("{extension-Type}"),
				AutoUpgradeMinorVersion: to.Ptr(true),
				EnableAutomaticUpgrade:  to.Ptr(true),
				ForceUpdateTag:          to.Ptr("aaaaaaaaa"),
				ProtectedSettings:       map[string]interface{}{},
				ProvisionAfterExtensions: []*string{
					to.Ptr("aa")},
				Publisher:          to.Ptr("{extension-Publisher}"),
				Settings:           map[string]interface{}{},
				SuppressFailures:   to.Ptr(true),
				TypeHandlerVersion: to.Ptr("{handler-version}"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetExtensionsClient) Get

Get - The operation to get the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set containing the extension. vmssExtensionName - The name of the VM scale set extension. options - VirtualMachineScaleSetExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtensions_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetExtensionsClientGetOptions{Expand: to.Ptr("aaaaaaa")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetExtensionsClient) NewListPager added in v0.7.0

NewListPager - Gets a list of all extensions in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set containing the extension. options - VirtualMachineScaleSetExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtensions_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate method.

type VirtualMachineScaleSetExtensionsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineScaleSetExtensionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginDelete method.

type VirtualMachineScaleSetExtensionsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineScaleSetExtensionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginUpdate method.

type VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse struct {
	VirtualMachineScaleSetExtension
}

VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetExtensionsClient.CreateOrUpdate.

type VirtualMachineScaleSetExtensionsClientDeleteResponse added in v0.3.0

type VirtualMachineScaleSetExtensionsClientDeleteResponse struct {
}

VirtualMachineScaleSetExtensionsClientDeleteResponse contains the response from method VirtualMachineScaleSetExtensionsClient.Delete.

type VirtualMachineScaleSetExtensionsClientGetOptions added in v0.3.0

type VirtualMachineScaleSetExtensionsClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineScaleSetExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.Get method.

type VirtualMachineScaleSetExtensionsClientGetResponse added in v0.3.0

type VirtualMachineScaleSetExtensionsClientGetResponse struct {
	VirtualMachineScaleSetExtension
}

VirtualMachineScaleSetExtensionsClientGetResponse contains the response from method VirtualMachineScaleSetExtensionsClient.Get.

type VirtualMachineScaleSetExtensionsClientListOptions added in v0.3.0

type VirtualMachineScaleSetExtensionsClientListOptions struct {
}

VirtualMachineScaleSetExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.List method.

type VirtualMachineScaleSetExtensionsClientListResponse added in v0.3.0

type VirtualMachineScaleSetExtensionsClientListResponse struct {
	VirtualMachineScaleSetExtensionListResult
}

VirtualMachineScaleSetExtensionsClientListResponse contains the response from method VirtualMachineScaleSetExtensionsClient.List.

type VirtualMachineScaleSetExtensionsClientUpdateResponse added in v0.3.0

type VirtualMachineScaleSetExtensionsClientUpdateResponse struct {
	VirtualMachineScaleSetExtension
}

VirtualMachineScaleSetExtensionsClientUpdateResponse contains the response from method VirtualMachineScaleSetExtensionsClient.Update.

type VirtualMachineScaleSetHardwareProfile added in v0.4.0

type VirtualMachineScaleSetHardwareProfile struct {
	// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2022-03-01.
	// Please follow the instructions in VM Customization [https://aka.ms/vmcustomization] for more details.
	VMSizeProperties *VMSizeProperties `json:"vmSizeProperties,omitempty"`
}

VirtualMachineScaleSetHardwareProfile - Specifies the hardware settings for the virtual machine scale set.

type VirtualMachineScaleSetIPConfiguration

type VirtualMachineScaleSetIPConfiguration struct {
	// REQUIRED; The IP configuration name.
	Name *string `json:"name,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`

	// Describes a virtual machine scale set network profile's IP configuration properties.
	Properties *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineScaleSetIPConfiguration - Describes a virtual machine scale set network profile's IP configuration.

type VirtualMachineScaleSetIPConfigurationProperties

type VirtualMachineScaleSetIPConfigurationProperties struct {
	// Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address
	// pools of multiple application gateways. Multiple scale sets cannot use the
	// same application gateway.
	ApplicationGatewayBackendAddressPools []*SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`

	// Specifies an array of references to application security group.
	ApplicationSecurityGroups []*SubResource `json:"applicationSecurityGroups,omitempty"`

	// Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address
	// pools of one public and one internal load balancer. Multiple scale sets cannot
	// use the same basic sku load balancer.
	LoadBalancerBackendAddressPools []*SubResource `json:"loadBalancerBackendAddressPools,omitempty"`

	// Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools
	// of one public and one internal load balancer. Multiple scale sets cannot use
	// the same basic sku load balancer.
	LoadBalancerInboundNatPools []*SubResource `json:"loadBalancerInboundNatPools,omitempty"`

	// Specifies the primary network interface in case the virtual machine has more than 1 network interface.
	Primary *bool `json:"primary,omitempty"`

	// 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'.
	PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"`

	// The publicIPAddressConfiguration.
	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`

	// Specifies the identifier of the subnet.
	Subnet *APIEntityReference `json:"subnet,omitempty"`
}

VirtualMachineScaleSetIPConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration properties.

func (VirtualMachineScaleSetIPConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIPConfigurationProperties.

type VirtualMachineScaleSetIPTag

type VirtualMachineScaleSetIPTag struct {
	// IP tag type. Example: FirstPartyUsage.
	IPTagType *string `json:"ipTagType,omitempty"`

	// IP tag associated with the public IP. Example: SQL, Storage etc.
	Tag *string `json:"tag,omitempty"`
}

VirtualMachineScaleSetIPTag - Contains the IP tag associated with the public IP address.

type VirtualMachineScaleSetIdentity

type VirtualMachineScaleSetIdentity struct {
	// The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly
	// created identity and a set of user assigned identities. The type 'None'
	// will remove any identities from the virtual machine scale set.
	Type *ResourceIdentityType `json:"type,omitempty"`

	// The list of user identities associated with the virtual machine scale set. The user identity dictionary key references
	// will be ARM resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system
	// assigned identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

VirtualMachineScaleSetIdentity - Identity for the virtual machine scale set.

func (VirtualMachineScaleSetIdentity) MarshalJSON

func (v VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIdentity.

type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue

type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
	// READ-ONLY; The client id of user assigned identity.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

type VirtualMachineScaleSetInstanceView

type VirtualMachineScaleSetInstanceView struct {
	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// READ-ONLY; The extensions information.
	Extensions []*VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty" azure:"ro"`

	// READ-ONLY; The orchestration services information.
	OrchestrationServices []*OrchestrationServiceSummary `json:"orchestrationServices,omitempty" azure:"ro"`

	// READ-ONLY; The instance view status summary for the virtual machine scale set.
	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty" azure:"ro"`
}

VirtualMachineScaleSetInstanceView - The instance view of a virtual machine scale set.

type VirtualMachineScaleSetInstanceViewStatusesSummary

type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
	// READ-ONLY; The extensions information.
	StatusesSummary []*VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty" azure:"ro"`
}

VirtualMachineScaleSetInstanceViewStatusesSummary - Instance view statuses summary for virtual machines of a virtual machine scale set.

type VirtualMachineScaleSetListOSUpgradeHistory

type VirtualMachineScaleSetListOSUpgradeHistory struct {
	// REQUIRED; The list of OS upgrades performed on the virtual machine scale set.
	Value []*UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`

	// The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineScaleSetListOSUpgradeHistory - List of Virtual Machine Scale Set OS Upgrade History operation response.

type VirtualMachineScaleSetListResult

type VirtualMachineScaleSetListResult struct {
	// REQUIRED; The list of virtual machine scale sets.
	Value []*VirtualMachineScaleSet `json:"value,omitempty"`

	// The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineScaleSetListResult - The List Virtual Machine operation response.

type VirtualMachineScaleSetListSKUsResult

type VirtualMachineScaleSetListSKUsResult struct {
	// REQUIRED; The list of skus available for the virtual machine scale set.
	Value []*VirtualMachineScaleSetSKU `json:"value,omitempty"`

	// The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS
	// Skus.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineScaleSetListSKUsResult - The Virtual Machine Scale Set List Skus operation response.

type VirtualMachineScaleSetListWithLinkResult

type VirtualMachineScaleSetListWithLinkResult struct {
	// REQUIRED; The list of virtual machine scale sets.
	Value []*VirtualMachineScaleSet `json:"value,omitempty"`

	// The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual
	// Machine Scale Sets.
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineScaleSetListWithLinkResult - The List Virtual Machine operation response.

type VirtualMachineScaleSetManagedDiskParameters

type VirtualMachineScaleSetManagedDiskParameters struct {
	// Specifies the customer managed disk encryption set resource id for the managed disk.
	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`

	// Specifies the security profile for the managed disk.
	SecurityProfile *VMDiskSecurityProfile `json:"securityProfile,omitempty"`

	// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
	// be used with OS Disk.
	StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"`
}

VirtualMachineScaleSetManagedDiskParameters - Describes the parameters of a ScaleSet managed disk.

type VirtualMachineScaleSetNetworkConfiguration

type VirtualMachineScaleSetNetworkConfiguration struct {
	// REQUIRED; The network configuration name.
	Name *string `json:"name,omitempty"`

	// Resource Id
	ID *string `json:"id,omitempty"`

	// Describes a virtual machine scale set network profile's IP configuration.
	Properties *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineScaleSetNetworkConfiguration - Describes a virtual machine scale set network profile's network configurations.

type VirtualMachineScaleSetNetworkConfigurationDNSSettings

type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
	// List of DNS servers IP addresses
	DNSServers []*string `json:"dnsServers,omitempty"`
}

VirtualMachineScaleSetNetworkConfigurationDNSSettings - Describes a virtual machines scale sets network configuration's DNS settings.

func (VirtualMachineScaleSetNetworkConfigurationDNSSettings) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfigurationDNSSettings.

type VirtualMachineScaleSetNetworkConfigurationProperties

type VirtualMachineScaleSetNetworkConfigurationProperties struct {
	// REQUIRED; Specifies the IP configurations of the network interface.
	IPConfigurations []*VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`

	// The dns settings to be applied on the network interfaces.
	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`

	// Specify what happens to the network interface when the VM is deleted
	DeleteOption *DeleteOptions `json:"deleteOption,omitempty"`

	// Specifies whether the network interface is accelerated networking-enabled.
	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`

	// Specifies whether the network interface is FPGA networking-enabled.
	EnableFpga *bool `json:"enableFpga,omitempty"`

	// Whether IP forwarding enabled on this NIC.
	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`

	// The network security group.
	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`

	// Specifies the primary network interface in case the virtual machine has more than 1 network interface.
	Primary *bool `json:"primary,omitempty"`
}

VirtualMachineScaleSetNetworkConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration.

func (VirtualMachineScaleSetNetworkConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfigurationProperties.

type VirtualMachineScaleSetNetworkProfile

type VirtualMachineScaleSetNetworkProfile struct {
	// A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The
	// reference will be in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`

	// specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations
	// for Virtual Machine Scale Set with orchestration mode 'Flexible'
	NetworkAPIVersion *NetworkAPIVersion `json:"networkApiVersion,omitempty"`

	// The list of network configurations.
	NetworkInterfaceConfigurations []*VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
}

VirtualMachineScaleSetNetworkProfile - Describes a virtual machine scale set network profile.

func (VirtualMachineScaleSetNetworkProfile) MarshalJSON

func (v VirtualMachineScaleSetNetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkProfile.

type VirtualMachineScaleSetOSDisk

type VirtualMachineScaleSetOSDisk struct {
	// REQUIRED; Specifies how the virtual machines in the scale set should be created.
	// The only allowed value is: FromImage \u2013 This value is used when you are using an image to create the virtual machine.
	// If you are using a platform image, you also use the imageReference element
	// described above. If you are using a marketplace image, you also use the plan element previously described.
	CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"`

	// Specifies the caching requirements.
	// Possible values are:
	// None
	// ReadOnly
	// ReadWrite
	// Default: None for Standard storage. ReadOnly for Premium storage
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with
	// Flexible OrchestrationMode only).
	// Possible values:
	// Delete If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.
	// Detach If this value is used, the OS disk is retained after VMSS Flex VM is deleted.
	// The default value is set to Delete. For an Ephemeral OS Disk, the default value is set to Delete. User cannot change the
	// delete option for Ephemeral OS Disk.
	DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"`

	// Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`

	// Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk
	// in a virtual machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// Specifies information about the unmanaged user image to base the scale set on.
	Image *VirtualHardDisk `json:"image,omitempty"`

	// The managed disk parameters.
	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`

	// The disk name.
	Name *string `json:"name,omitempty"`

	// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or
	// a specialized VHD.
	// Possible values are:
	// Windows
	// Linux
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// Specifies the container urls that are used to store operating system disks for the scale set.
	VhdContainers []*string `json:"vhdContainers,omitempty"`

	// Specifies whether writeAccelerator should be enabled or disabled on the disk.
	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
}

VirtualMachineScaleSetOSDisk - Describes a virtual machine scale set operating system disk.

func (VirtualMachineScaleSetOSDisk) MarshalJSON

func (v VirtualMachineScaleSetOSDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetOSDisk.

type VirtualMachineScaleSetOSProfile

type VirtualMachineScaleSetOSProfile struct {
	// Specifies the password of the administrator account.
	// Minimum-length (Windows): 8 characters
	// Minimum-length (Linux): 6 characters
	// Max-length (Windows): 123 characters
	// Max-length (Linux): 72 characters
	// Complexity requirements: 3 out of 4 conditions below need to be fulfilled
	// Has lower characters
	// Has upper characters
	// Has a digit
	// Has a special character (Regex match [\W_])
	// Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "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]
	// 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]
	AdminPassword *string `json:"adminPassword,omitempty"`

	// Specifies the name of the administrator account.
	// Windows-only restriction: Cannot end in "."
	// Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
	// "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest",
	// "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
	// Minimum-length (Linux): 1 character
	// Max-length (Linux): 64 characters
	// Max-length (Windows): 20 characters
	AdminUsername *string `json:"adminUsername,omitempty"`

	// Specifies whether extension operations should be allowed on the virtual machine scale set.
	// This may only be set to False when no extensions are present on the virtual machine scale set.
	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`

	// Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to
	// 15 characters long.
	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`

	// Specifies a base-64 encoded string of custom data. The base-64 encoded string 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]
	CustomData *string `json:"customData,omitempty"`

	// 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].
	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`

	// 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] or the Azure
	// Key Vault virtual machine extension for Windows
	// [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
	Secrets []*VaultSecretGroup `json:"secrets,omitempty"`

	// Specifies Windows operating system settings on the virtual machine.
	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
}

VirtualMachineScaleSetOSProfile - Describes a virtual machine scale set OS profile.

func (VirtualMachineScaleSetOSProfile) MarshalJSON

func (v VirtualMachineScaleSetOSProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetOSProfile.

type VirtualMachineScaleSetProperties

type VirtualMachineScaleSetProperties struct {
	// Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance:
	// whether the Virtual Machines have the capability to support attaching
	// managed data disks with UltraSSD_LRS storage account type.
	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`

	// Policy for automatic repairs.
	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`

	// When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This
	// property will hence ensure that the extensions do not run on the extra
	// overprovisioned VMs.
	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`

	// Specifies information about the dedicated host group that the virtual machine scale set resides in.
	// Minimum api-version: 2020-06-01.
	HostGroup *SubResource `json:"hostGroup,omitempty"`

	// Specifies the orchestration mode for the virtual machine scale set.
	OrchestrationMode *OrchestrationMode `json:"orchestrationMode,omitempty"`

	// Specifies whether the Virtual Machine Scale Set should be overprovisioned.
	Overprovision *bool `json:"overprovision,omitempty"`

	// Fault Domain count for each placement group.
	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`

	// Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
	// Minimum api-version: 2018-04-01.
	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`

	// Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`

	// When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup
	// is true, it may be modified to false. However, if singlePlacementGroup
	// is false, it may not be modified to true.
	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`

	// Specifies the Spot Restore properties for the virtual machine scale set.
	SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"`

	// The upgrade policy.
	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`

	// The virtual machine profile.
	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`

	// Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property
	// can only be set if the zones property of the scale set contains more than
	// one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
	ZoneBalance *bool `json:"zoneBalance,omitempty"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the time at which the Virtual Machine Scale Set resource was created.
	// Minimum api-version: 2022-03-01.
	TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
	UniqueID *string `json:"uniqueId,omitempty" azure:"ro"`
}

VirtualMachineScaleSetProperties - Describes the properties of a Virtual Machine Scale Set.

func (VirtualMachineScaleSetProperties) MarshalJSON added in v0.4.0

func (v VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetProperties.

func (*VirtualMachineScaleSetProperties) UnmarshalJSON added in v0.4.0

func (v *VirtualMachineScaleSetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetProperties.

type VirtualMachineScaleSetPublicIPAddressConfiguration

type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
	// REQUIRED; The publicIP address configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration
	Properties *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`

	// Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
	SKU *PublicIPAddressSKU `json:"sku,omitempty"`
}

VirtualMachineScaleSetPublicIPAddressConfiguration - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration

type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings

type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
	// REQUIRED; The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels
	// of the PublicIPAddress resources that will be created
	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
}

VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings - Describes a virtual machines scale sets network configuration's DNS settings.

type VirtualMachineScaleSetPublicIPAddressConfigurationProperties

type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
	// The dns settings to be applied on the publicIP addresses .
	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`

	// Specify what happens to the public IP when the VM is deleted
	DeleteOption *DeleteOptions `json:"deleteOption,omitempty"`

	// The list of IP tags associated with the public IP address.
	IPTags []*VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`

	// The idle timeout of the public IP address.
	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`

	// Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
	// is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
	PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"`

	// The PublicIPPrefix from which to allocate publicIP addresses.
	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
}

VirtualMachineScaleSetPublicIPAddressConfigurationProperties - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration

func (VirtualMachineScaleSetPublicIPAddressConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetPublicIPAddressConfigurationProperties.

type VirtualMachineScaleSetReimageParameters

type VirtualMachineScaleSetReimageParameters struct {
	// The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation
	// being performed on all virtual machines in the virtual machine scale set.
	InstanceIDs []*string `json:"instanceIds,omitempty"`

	// Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported
	// for VM/VMSS with Ephemeral OS disk.
	TempDisk *bool `json:"tempDisk,omitempty"`
}

VirtualMachineScaleSetReimageParameters - Describes a Virtual Machine Scale Set VM Reimage Parameters.

func (VirtualMachineScaleSetReimageParameters) MarshalJSON

func (v VirtualMachineScaleSetReimageParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetReimageParameters.

type VirtualMachineScaleSetRollingUpgradesClient

type VirtualMachineScaleSetRollingUpgradesClient struct {
	// contains filtered or unexported fields
}

VirtualMachineScaleSetRollingUpgradesClient contains the methods for the VirtualMachineScaleSetRollingUpgrades group. Don't use this type directly, use NewVirtualMachineScaleSetRollingUpgradesClient() instead.

func NewVirtualMachineScaleSetRollingUpgradesClient

func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetRollingUpgradesClient, error)

NewVirtualMachineScaleSetRollingUpgradesClient creates a new instance of VirtualMachineScaleSetRollingUpgradesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineScaleSetRollingUpgradesClient) BeginCancel

BeginCancel - Cancels the current virtual machine scale set rolling upgrade. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginCancel method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrades_Cancel_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetRollingUpgradesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCancel(ctx,
		"rgcompute",
		"aaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetRollingUpgradesClient) BeginStartExtensionUpgrade

BeginStartExtensionUpgrade - Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_RollingUpgrade.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetRollingUpgradesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStartExtensionUpgrade(ctx,
		"myResourceGroup",
		"{vmss-name}",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetRollingUpgradesClient) BeginStartOSUpgrade

BeginStartOSUpgrade - Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetRollingUpgradesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStartOSUpgrade(ctx,
		"rgcompute",
		"aaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetRollingUpgradesClient) GetLatest

GetLatest - Gets the status of the latest virtual machine scale set rolling upgrade. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.GetLatest method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetRollingUpgrades_GetLatest_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetRollingUpgradesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetLatest(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginCancel method.

type VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade method.

type VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade method.

type VirtualMachineScaleSetRollingUpgradesClientCancelResponse added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientCancelResponse struct {
}

VirtualMachineScaleSetRollingUpgradesClientCancelResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.Cancel.

type VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions struct {
}

VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.GetLatest method.

type VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse struct {
	RollingUpgradeStatusInfo
}

VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.GetLatest.

type VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse struct {
}

VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade.

type VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse added in v0.3.0

type VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse struct {
}

VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade.

type VirtualMachineScaleSetSKU

type VirtualMachineScaleSetSKU struct {
	// READ-ONLY; Specifies the number of virtual machines in the scale set.
	Capacity *VirtualMachineScaleSetSKUCapacity `json:"capacity,omitempty" azure:"ro"`

	// READ-ONLY; The type of resource the sku applies to.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`

	// READ-ONLY; The Sku.
	SKU *SKU `json:"sku,omitempty" azure:"ro"`
}

VirtualMachineScaleSetSKU - Describes an available virtual machine scale set sku.

type VirtualMachineScaleSetSKUCapacity

type VirtualMachineScaleSetSKUCapacity struct {
	// READ-ONLY; The default capacity.
	DefaultCapacity *int64 `json:"defaultCapacity,omitempty" azure:"ro"`

	// READ-ONLY; The maximum capacity that can be set.
	Maximum *int64 `json:"maximum,omitempty" azure:"ro"`

	// READ-ONLY; The minimum capacity.
	Minimum *int64 `json:"minimum,omitempty" azure:"ro"`

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *VirtualMachineScaleSetSKUScaleType `json:"scaleType,omitempty" azure:"ro"`
}

VirtualMachineScaleSetSKUCapacity - Describes scaling information of a sku.

type VirtualMachineScaleSetSKUScaleType

type VirtualMachineScaleSetSKUScaleType string

VirtualMachineScaleSetSKUScaleType - The scale type applicable to the sku.

const (
	VirtualMachineScaleSetSKUScaleTypeAutomatic VirtualMachineScaleSetSKUScaleType = "Automatic"
	VirtualMachineScaleSetSKUScaleTypeNone      VirtualMachineScaleSetSKUScaleType = "None"
)

func PossibleVirtualMachineScaleSetSKUScaleTypeValues

func PossibleVirtualMachineScaleSetSKUScaleTypeValues() []VirtualMachineScaleSetSKUScaleType

PossibleVirtualMachineScaleSetSKUScaleTypeValues returns the possible values for the VirtualMachineScaleSetSKUScaleType const type.

type VirtualMachineScaleSetScaleInRules

type VirtualMachineScaleSetScaleInRules string
const (
	VirtualMachineScaleSetScaleInRulesDefault  VirtualMachineScaleSetScaleInRules = "Default"
	VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
	VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
)

func PossibleVirtualMachineScaleSetScaleInRulesValues

func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules

PossibleVirtualMachineScaleSetScaleInRulesValues returns the possible values for the VirtualMachineScaleSetScaleInRules const type.

type VirtualMachineScaleSetStorageProfile

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].
	DataDisks []*VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`

	// Specifies information about the image to use. You can specify information about platform images, marketplace images, or
	// virtual machine images. This element is required when you want to use a platform
	// image, marketplace image, or virtual machine image, but is not used in other creation operations.
	ImageReference *ImageReference `json:"imageReference,omitempty"`

	// 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].
	OSDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
}

VirtualMachineScaleSetStorageProfile - Describes a virtual machine scale set storage profile.

func (VirtualMachineScaleSetStorageProfile) MarshalJSON

func (v VirtualMachineScaleSetStorageProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetStorageProfile.

type VirtualMachineScaleSetUpdate

type VirtualMachineScaleSetUpdate struct {
	// The identity of the virtual machine scale set, if configured.
	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`

	// The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
	Plan *Plan `json:"plan,omitempty"`

	// Describes the properties of a Virtual Machine Scale Set.
	Properties *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`

	// The virtual machine scale set sku.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

VirtualMachineScaleSetUpdate - Describes a Virtual Machine Scale Set.

func (VirtualMachineScaleSetUpdate) MarshalJSON

func (v VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdate.

type VirtualMachineScaleSetUpdateIPConfiguration

type VirtualMachineScaleSetUpdateIPConfiguration struct {
	// Resource Id
	ID *string `json:"id,omitempty"`

	// The IP configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machine scale set network profile's IP configuration properties.
	Properties *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineScaleSetUpdateIPConfiguration - Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network

type VirtualMachineScaleSetUpdateIPConfigurationProperties

type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
	// The application gateway backend address pools.
	ApplicationGatewayBackendAddressPools []*SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`

	// Specifies an array of references to application security group.
	ApplicationSecurityGroups []*SubResource `json:"applicationSecurityGroups,omitempty"`

	// The load balancer backend address pools.
	LoadBalancerBackendAddressPools []*SubResource `json:"loadBalancerBackendAddressPools,omitempty"`

	// The load balancer inbound nat pools.
	LoadBalancerInboundNatPools []*SubResource `json:"loadBalancerInboundNatPools,omitempty"`

	// Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
	Primary *bool `json:"primary,omitempty"`

	// 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'.
	PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"`

	// The publicIPAddressConfiguration.
	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`

	// The subnet.
	Subnet *APIEntityReference `json:"subnet,omitempty"`
}

VirtualMachineScaleSetUpdateIPConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration properties.

func (VirtualMachineScaleSetUpdateIPConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateIPConfigurationProperties.

type VirtualMachineScaleSetUpdateNetworkConfiguration

type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
	// Resource Id
	ID *string `json:"id,omitempty"`

	// The network configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network
	// profile's IP Configuration.
	Properties *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineScaleSetUpdateNetworkConfiguration - Describes a virtual machine scale set network profile's network configurations.

type VirtualMachineScaleSetUpdateNetworkConfigurationProperties

type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
	// The dns settings to be applied on the network interfaces.
	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`

	// Specify what happens to the network interface when the VM is deleted
	DeleteOption *DeleteOptions `json:"deleteOption,omitempty"`

	// Specifies whether the network interface is accelerated networking-enabled.
	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`

	// Specifies whether the network interface is FPGA networking-enabled.
	EnableFpga *bool `json:"enableFpga,omitempty"`

	// Whether IP forwarding enabled on this NIC.
	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`

	// The virtual machine scale set IP Configuration.
	IPConfigurations []*VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`

	// The network security group.
	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`

	// Whether this is a primary NIC on a virtual machine.
	Primary *bool `json:"primary,omitempty"`
}

VirtualMachineScaleSetUpdateNetworkConfigurationProperties - Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration.

func (VirtualMachineScaleSetUpdateNetworkConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkConfigurationProperties.

type VirtualMachineScaleSetUpdateNetworkProfile

type VirtualMachineScaleSetUpdateNetworkProfile struct {
	// A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The
	// reference will be in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`

	// specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations
	// for Virtual Machine Scale Set with orchestration mode 'Flexible'
	NetworkAPIVersion *NetworkAPIVersion `json:"networkApiVersion,omitempty"`

	// The list of network configurations.
	NetworkInterfaceConfigurations []*VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
}

VirtualMachineScaleSetUpdateNetworkProfile - Describes a virtual machine scale set network profile.

func (VirtualMachineScaleSetUpdateNetworkProfile) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkProfile.

type VirtualMachineScaleSetUpdateOSDisk

type VirtualMachineScaleSetUpdateOSDisk struct {
	// The caching type.
	Caching *CachingTypes `json:"caching,omitempty"`

	// Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with
	// Flexible OrchestrationMode only).
	// Possible values:
	// Delete If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.
	// Detach If this value is used, the OS disk is retained after VMSS Flex VM is deleted.
	// The default value is set to Delete. For an Ephemeral OS Disk, the default value is set to Delete. User cannot change the
	// delete option for Ephemeral OS Disk.
	DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"`

	// Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk
	// in a virtual machine image.
	// This value cannot be larger than 1023 GB
	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`

	// The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine.
	// If SourceImage is provided, the destination VirtualHardDisk should not
	// exist.
	Image *VirtualHardDisk `json:"image,omitempty"`

	// The managed disk parameters.
	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`

	// The list of virtual hard disk container uris.
	VhdContainers []*string `json:"vhdContainers,omitempty"`

	// Specifies whether writeAccelerator should be enabled or disabled on the disk.
	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
}

VirtualMachineScaleSetUpdateOSDisk - Describes virtual machine scale set operating system disk Update Object. This should be used for Updating VMSS OS Disk.

func (VirtualMachineScaleSetUpdateOSDisk) MarshalJSON

func (v VirtualMachineScaleSetUpdateOSDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateOSDisk.

type VirtualMachineScaleSetUpdateOSProfile

type VirtualMachineScaleSetUpdateOSProfile struct {
	// A base-64 encoded string of custom data.
	CustomData *string `json:"customData,omitempty"`

	// The Linux Configuration of the OS profile.
	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`

	// The List of certificates for addition to the VM.
	Secrets []*VaultSecretGroup `json:"secrets,omitempty"`

	// The Windows Configuration of the OS profile.
	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
}

VirtualMachineScaleSetUpdateOSProfile - Describes a virtual machine scale set OS profile.

func (VirtualMachineScaleSetUpdateOSProfile) MarshalJSON

func (v VirtualMachineScaleSetUpdateOSProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateOSProfile.

type VirtualMachineScaleSetUpdateProperties

type VirtualMachineScaleSetUpdateProperties struct {
	// Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance:
	// whether the Virtual Machines have the capability to support attaching
	// managed data disks with UltraSSD_LRS storage account type.
	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`

	// Policy for automatic repairs.
	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`

	// When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This
	// property will hence ensure that the extensions do not run on the extra
	// overprovisioned VMs.
	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`

	// Specifies whether the Virtual Machine Scale Set should be overprovisioned.
	Overprovision *bool `json:"overprovision,omitempty"`

	// Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
	// Minimum api-version: 2018-04-01.
	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`

	// Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`

	// When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup
	// is true, it may be modified to false. However, if singlePlacementGroup
	// is false, it may not be modified to true.
	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`

	// The upgrade policy.
	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`

	// The virtual machine profile.
	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
}

VirtualMachineScaleSetUpdateProperties - Describes the properties of a Virtual Machine Scale Set.

type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration

type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
	// The publicIP address configuration name.
	Name *string `json:"name,omitempty"`

	// Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration
	Properties *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
}

VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration

type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties

type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
	// The dns settings to be applied on the publicIP addresses .
	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`

	// Specify what happens to the public IP when the VM is deleted
	DeleteOption *DeleteOptions `json:"deleteOption,omitempty"`

	// The idle timeout of the public IP address.
	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`

	// The PublicIPPrefix from which to allocate publicIP addresses.
	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
}

VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration

type VirtualMachineScaleSetUpdateStorageProfile

type VirtualMachineScaleSetUpdateStorageProfile struct {
	// The data disks.
	DataDisks []*VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`

	// The image reference.
	ImageReference *ImageReference `json:"imageReference,omitempty"`

	// The OS disk.
	OSDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
}

VirtualMachineScaleSetUpdateStorageProfile - Describes a virtual machine scale set storage profile.

func (VirtualMachineScaleSetUpdateStorageProfile) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateStorageProfile.

type VirtualMachineScaleSetUpdateVMProfile

type VirtualMachineScaleSetUpdateVMProfile struct {
	// Specifies the billing related details of a Azure Spot VMSS.
	// Minimum api-version: 2019-03-01.
	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`

	// The virtual machine scale set diagnostics profile.
	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`

	// The virtual machine scale set extension profile.
	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`

	// The license type, which is for bring your own license scenario.
	LicenseType *string `json:"licenseType,omitempty"`

	// The virtual machine scale set network profile.
	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`

	// The virtual machine scale set OS profile.
	OSProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`

	// Specifies Scheduled Event related configurations.
	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`

	// The virtual machine scale set Security profile
	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`

	// The virtual machine scale set storage profile.
	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`

	// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
	// Minimum api-version: 2021-03-01
	UserData *string `json:"userData,omitempty"`
}

VirtualMachineScaleSetUpdateVMProfile - Describes a virtual machine scale set virtual machine profile.

type VirtualMachineScaleSetVM

type VirtualMachineScaleSetVM struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The identity of the virtual machine, if configured.
	Identity *VirtualMachineIdentity `json:"identity,omitempty"`

	// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
	// images. Before you can use a marketplace image from an API, you must
	// enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
	// Want to deploy programmatically, Get Started ->. Enter any required
	// information and then click Save.
	Plan *Plan `json:"plan,omitempty"`

	// Describes the properties of a virtual machine scale set virtual machine.
	Properties *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The virtual machine instance ID.
	InstanceID *string `json:"instanceId,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The virtual machine child extension resources.
	Resources []*VirtualMachineExtension `json:"resources,omitempty" azure:"ro"`

	// READ-ONLY; The virtual machine SKU.
	SKU *SKU `json:"sku,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`

	// READ-ONLY; The virtual machine zones.
	Zones []*string `json:"zones,omitempty" azure:"ro"`
}

VirtualMachineScaleSetVM - Describes a virtual machine scale set virtual machine.

func (VirtualMachineScaleSetVM) MarshalJSON

func (v VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVM.

type VirtualMachineScaleSetVMExtension

type VirtualMachineScaleSetVMExtension struct {
	// Describes the properties of a Virtual Machine Extension.
	Properties *VirtualMachineExtensionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the extension.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineScaleSetVMExtension - Describes a VMSS VM Extension.

type VirtualMachineScaleSetVMExtensionUpdate

type VirtualMachineScaleSetVMExtensionUpdate struct {
	// Describes the properties of a Virtual Machine Extension.
	Properties *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the extension.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualMachineScaleSetVMExtensionUpdate - Describes a VMSS VM Extension.

func (VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON

func (v VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionUpdate.

type VirtualMachineScaleSetVMExtensionsClient

type VirtualMachineScaleSetVMExtensionsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineScaleSetVMExtensionsClient contains the methods for the VirtualMachineScaleSetVMExtensions group. Don't use this type directly, use NewVirtualMachineScaleSetVMExtensionsClient() instead.

func NewVirtualMachineScaleSetVMExtensionsClient

func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMExtensionsClient, error)

NewVirtualMachineScaleSetVMExtensionsClient creates a new instance of VirtualMachineScaleSetVMExtensionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineScaleSetVMExtensionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation to create or update the VMSS VM extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. vmExtensionName - The name of the virtual machine extension. extensionParameters - Parameters supplied to the Create Virtual Machine Extension operation. options - VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtensions_Create.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myVMExtension",
		armcompute.VirtualMachineScaleSetVMExtension{
			Properties: &armcompute.VirtualMachineExtensionProperties{
				Type:                    to.Ptr("extType"),
				AutoUpgradeMinorVersion: to.Ptr(true),
				Publisher:               to.Ptr("extPublisher"),
				Settings: map[string]interface{}{
					"UserName": "xyz@microsoft.com",
				},
				TypeHandlerVersion: to.Ptr("1.2"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMExtensionsClient) BeginDelete

BeginDelete - The operation to delete the VMSS VM extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. vmExtensionName - The name of the virtual machine extension. options - VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtensions_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myVMExtension",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMExtensionsClient) BeginUpdate

BeginUpdate - The operation to update the VMSS VM extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. vmExtensionName - The name of the virtual machine extension. extensionParameters - Parameters supplied to the Update Virtual Machine Extension operation. options - VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtensions_Update.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myVMExtension",
		armcompute.VirtualMachineScaleSetVMExtensionUpdate{
			Properties: &armcompute.VirtualMachineExtensionUpdateProperties{
				Type:                    to.Ptr("extType"),
				AutoUpgradeMinorVersion: to.Ptr(true),
				Publisher:               to.Ptr("extPublisher"),
				Settings: map[string]interface{}{
					"UserName": "xyz@microsoft.com",
				},
				TypeHandlerVersion: to.Ptr("1.2"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMExtensionsClient) Get

Get - The operation to get the VMSS VM extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. vmExtensionName - The name of the virtual machine extension. options - VirtualMachineScaleSetVMExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtensions_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myVMExtension",
		&armcompute.VirtualMachineScaleSetVMExtensionsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMExtensionsClient) List

List - The operation to get all extensions of an instance in Virtual Machine Scaleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMExtensions_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMExtensionsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		&armcompute.VirtualMachineScaleSetVMExtensionsClientListOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate method.

type VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginDelete method.

type VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginUpdate method.

type VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse struct {
	VirtualMachineScaleSetVMExtension
}

VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate.

type VirtualMachineScaleSetVMExtensionsClientDeleteResponse added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientDeleteResponse struct {
}

VirtualMachineScaleSetVMExtensionsClientDeleteResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.Delete.

type VirtualMachineScaleSetVMExtensionsClientGetOptions added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineScaleSetVMExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.Get method.

type VirtualMachineScaleSetVMExtensionsClientGetResponse added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientGetResponse struct {
	VirtualMachineScaleSetVMExtension
}

VirtualMachineScaleSetVMExtensionsClientGetResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.Get.

type VirtualMachineScaleSetVMExtensionsClientListOptions added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineScaleSetVMExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.List method.

type VirtualMachineScaleSetVMExtensionsClientListResponse added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientListResponse struct {
	VirtualMachineScaleSetVMExtensionsListResult
}

VirtualMachineScaleSetVMExtensionsClientListResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.List.

type VirtualMachineScaleSetVMExtensionsClientUpdateResponse added in v0.3.0

type VirtualMachineScaleSetVMExtensionsClientUpdateResponse struct {
	VirtualMachineScaleSetVMExtension
}

VirtualMachineScaleSetVMExtensionsClientUpdateResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.Update.

type VirtualMachineScaleSetVMExtensionsListResult

type VirtualMachineScaleSetVMExtensionsListResult struct {
	// The list of VMSS VM extensions
	Value []*VirtualMachineScaleSetVMExtension `json:"value,omitempty"`
}

VirtualMachineScaleSetVMExtensionsListResult - The List VMSS VM Extension operation response

type VirtualMachineScaleSetVMExtensionsSummary

type VirtualMachineScaleSetVMExtensionsSummary struct {
	// READ-ONLY; The extension name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The extensions information.
	StatusesSummary []*VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty" azure:"ro"`
}

VirtualMachineScaleSetVMExtensionsSummary - Extensions summary for virtual machines of a virtual machine scale set.

type VirtualMachineScaleSetVMInstanceIDs

type VirtualMachineScaleSetVMInstanceIDs struct {
	// The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation
	// being performed on all virtual machines in the virtual machine scale set.
	InstanceIDs []*string `json:"instanceIds,omitempty"`
}

VirtualMachineScaleSetVMInstanceIDs - Specifies a list of virtual machine instance IDs from the VM scale set.

func (VirtualMachineScaleSetVMInstanceIDs) MarshalJSON

func (v VirtualMachineScaleSetVMInstanceIDs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceIDs.

type VirtualMachineScaleSetVMInstanceRequiredIDs

type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
	// REQUIRED; The virtual machine scale set instance ids.
	InstanceIDs []*string `json:"instanceIds,omitempty"`
}

VirtualMachineScaleSetVMInstanceRequiredIDs - Specifies a list of virtual machine instance IDs from the VM scale set.

func (VirtualMachineScaleSetVMInstanceRequiredIDs) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceRequiredIDs.

type VirtualMachineScaleSetVMInstanceView

type VirtualMachineScaleSetVMInstanceView struct {
	// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
	// You can easily view the output of your console log.
	// Azure also enables you to see a screenshot of the VM from the hypervisor.
	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`

	// The disks information.
	Disks []*DiskInstanceView `json:"disks,omitempty"`

	// The extensions information.
	Extensions []*VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`

	// The Maintenance Operation status on the virtual machine.
	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`

	// The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
	PlacementGroupID *string `json:"placementGroupId,omitempty"`

	// The Fault Domain count.
	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`

	// The Update Domain count.
	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`

	// The Remote desktop certificate thumbprint.
	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`

	// The resource status information.
	Statuses []*InstanceViewStatus `json:"statuses,omitempty"`

	// The VM Agent running on the virtual machine.
	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`

	// READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when
	// the virtual machine is associated with a dedicated host group that has automatic
	// placement enabled.
	// Minimum api-version: 2020-06-01.
	AssignedHost *string `json:"assignedHost,omitempty" azure:"ro"`

	// READ-ONLY; The health status for the VM.
	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty" azure:"ro"`
}

VirtualMachineScaleSetVMInstanceView - The instance view of a virtual machine scale set VM.

func (VirtualMachineScaleSetVMInstanceView) MarshalJSON

func (v VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceView.

type VirtualMachineScaleSetVMListResult

type VirtualMachineScaleSetVMListResult struct {
	// REQUIRED; The list of virtual machine scale sets VMs.
	Value []*VirtualMachineScaleSetVM `json:"value,omitempty"`

	// The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS
	// VMs
	NextLink *string `json:"nextLink,omitempty"`
}

VirtualMachineScaleSetVMListResult - The List Virtual Machine Scale Set VMs operation response.

type VirtualMachineScaleSetVMNetworkProfileConfiguration

type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
	// The list of network configurations.
	NetworkInterfaceConfigurations []*VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
}

VirtualMachineScaleSetVMNetworkProfileConfiguration - Describes a virtual machine scale set VM network profile.

func (VirtualMachineScaleSetVMNetworkProfileConfiguration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMNetworkProfileConfiguration.

type VirtualMachineScaleSetVMProfile

type VirtualMachineScaleSetVMProfile struct {
	// Specifies the gallery applications that should be made available to the VM/VMSS
	ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"`

	// Specifies the billing related details of a Azure Spot VMSS.
	// Minimum api-version: 2019-03-01.
	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`

	// Specifies the capacity reservation related details of a scale set.
	// Minimum api-version: 2021-04-01.
	CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"`

	// Specifies the boot diagnostic settings state.
	// Minimum api-version: 2015-06-15.
	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`

	// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
	// For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
	// For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
	EvictionPolicy *VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`

	// Specifies a collection of settings for extensions installed on virtual machines in the scale set.
	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`

	// Specifies the hardware profile related details of a scale set.
	// Minimum api-version: 2022-03-01.
	HardwareProfile *VirtualMachineScaleSetHardwareProfile `json:"hardwareProfile,omitempty"`

	// Specifies that the image or disk that is being used was licensed on-premises.
	// Possible values for Windows Server operating system are:
	// WindowsClient
	// WindowsServer
	// Possible values for Linux Server operating system are:
	// RHELBYOS (for RHEL)
	// SLESBYOS (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]
	// Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux]
	// Minimum api-version: 2015-06-15
	LicenseType *string `json:"licenseType,omitempty"`

	// Specifies properties of the network interfaces of the virtual machines in the scale set.
	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`

	// Specifies the operating system settings for the virtual machines in the scale set.
	OSProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`

	// Specifies the priority for the virtual machines in the scale set.
	// Minimum api-version: 2017-10-30-preview
	Priority *VirtualMachinePriorityTypes `json:"priority,omitempty"`

	// Specifies Scheduled Event related configurations.
	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`

	// Specifies the Security related profile settings for the virtual machines in the scale set.
	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`

	// Specifies the storage settings for the virtual machine disks.
	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`

	// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets
	// in here.
	// Minimum api-version: 2021-03-01
	UserData *string `json:"userData,omitempty"`
}

VirtualMachineScaleSetVMProfile - Describes a virtual machine scale set virtual machine profile.

type VirtualMachineScaleSetVMProperties

type VirtualMachineScaleSetVMProperties struct {
	// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the
	// virtual machine has the capability to support attaching managed data disks with
	// UltraSSD_LRS storage account type.
	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`

	// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
	// in the same availability set are allocated to different nodes to maximize
	// availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview].
	// For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates]
	// Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability
	// set.
	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`

	// Specifies the boot diagnostic settings state.
	// Minimum api-version: 2015-06-15.
	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`

	// Specifies the hardware settings for the virtual machine.
	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`

	// Specifies that the image or disk that is being used was licensed on-premises.
	// Possible values for Windows Server operating system are:
	// WindowsClient
	// WindowsServer
	// Possible values for Linux Server operating system are:
	// RHELBYOS (for RHEL)
	// SLESBYOS (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]
	// Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux]
	// Minimum api-version: 2015-06-15
	LicenseType *string `json:"licenseType,omitempty"`

	// Specifies the network interfaces of the virtual machine.
	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`

	// Specifies the network profile configuration of the virtual machine.
	NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`

	// Specifies the operating system settings for the virtual machine.
	OSProfile *OSProfile `json:"osProfile,omitempty"`

	// Specifies the protection policy of the virtual machine.
	ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`

	// Specifies the Security related profile settings for the virtual machine.
	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`

	// Specifies the storage settings for the virtual machine disks.
	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`

	// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
	// Minimum api-version: 2021-03-01
	UserData *string `json:"userData,omitempty"`

	// READ-ONLY; The virtual machine instance view.
	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
	LatestModelApplied *bool `json:"latestModelApplied,omitempty" azure:"ro"`

	// READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or
	// the customized model for the virtual machine.
	ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Azure VM unique ID.
	VMID *string `json:"vmId,omitempty" azure:"ro"`
}

VirtualMachineScaleSetVMProperties - Describes the properties of a virtual machine scale set virtual machine.

type VirtualMachineScaleSetVMProtectionPolicy

type VirtualMachineScaleSetVMProtectionPolicy struct {
	// Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
	ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`

	// Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied
	// to the virtual machine scale set VM.
	ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
}

VirtualMachineScaleSetVMProtectionPolicy - The protection policy of a virtual machine scale set VM.

type VirtualMachineScaleSetVMReimageParameters

type VirtualMachineScaleSetVMReimageParameters struct {
	// Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported
	// for VM/VMSS with Ephemeral OS disk.
	TempDisk *bool `json:"tempDisk,omitempty"`
}

VirtualMachineScaleSetVMReimageParameters - Describes a Virtual Machine Scale Set VM Reimage Parameters.

type VirtualMachineScaleSetVMRunCommandsClient

type VirtualMachineScaleSetVMRunCommandsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineScaleSetVMRunCommandsClient contains the methods for the VirtualMachineScaleSetVMRunCommands group. Don't use this type directly, use NewVirtualMachineScaleSetVMRunCommandsClient() instead.

func NewVirtualMachineScaleSetVMRunCommandsClient

func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMRunCommandsClient, error)

NewVirtualMachineScaleSetVMRunCommandsClient creates a new instance of VirtualMachineScaleSetVMRunCommandsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineScaleSetVMRunCommandsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation to create or update the VMSS VM run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. runCommandName - The name of the virtual machine run command. runCommand - Parameters supplied to the Create Virtual Machine RunCommand operation. options - VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myRunCommand",
		armcompute.VirtualMachineRunCommand{
			Location: to.Ptr("West US"),
			Properties: &armcompute.VirtualMachineRunCommandProperties{
				AsyncExecution: to.Ptr(false),
				Parameters: []*armcompute.RunCommandInputParameter{
					{
						Name:  to.Ptr("param1"),
						Value: to.Ptr("value1"),
					},
					{
						Name:  to.Ptr("param2"),
						Value: to.Ptr("value2"),
					}},
				RunAsPassword: to.Ptr("<runAsPassword>"),
				RunAsUser:     to.Ptr("user1"),
				Source: &armcompute.VirtualMachineRunCommandScriptSource{
					Script: to.Ptr("Write-Host Hello World!"),
				},
				TimeoutInSeconds: to.Ptr[int32](3600),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMRunCommandsClient) BeginDelete

BeginDelete - The operation to delete the VMSS VM run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. runCommandName - The name of the virtual machine run command. options - VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myRunCommand",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMRunCommandsClient) BeginUpdate

BeginUpdate - The operation to update the VMSS VM run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. runCommandName - The name of the virtual machine run command. runCommand - Parameters supplied to the Update Virtual Machine RunCommand operation. options - VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Update.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myRunCommand",
		armcompute.VirtualMachineRunCommandUpdate{
			Properties: &armcompute.VirtualMachineRunCommandProperties{
				Source: &armcompute.VirtualMachineRunCommandScriptSource{
					Script: to.Ptr("Write-Host Script Source Updated!"),
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMRunCommandsClient) Get

Get - The operation to get the VMSS VM run command. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. runCommandName - The name of the virtual machine run command. options - VirtualMachineScaleSetVMRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		"myRunCommand",
		&armcompute.VirtualMachineScaleSetVMRunCommandsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMRunCommandsClient) NewListPager added in v0.7.0

NewListPager - The operation to get all run commands of an instance in Virtual Machine Scaleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMRunCommandsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMRunCommandsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myResourceGroup",
		"myvmScaleSet",
		"0",
		&armcompute.VirtualMachineScaleSetVMRunCommandsClientListOptions{Expand: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate method.

type VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginDelete method.

type VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate method.

type VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse struct {
	VirtualMachineRunCommand
}

VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.CreateOrUpdate.

type VirtualMachineScaleSetVMRunCommandsClientDeleteResponse added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientDeleteResponse struct {
}

VirtualMachineScaleSetVMRunCommandsClientDeleteResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.Delete.

type VirtualMachineScaleSetVMRunCommandsClientGetOptions added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineScaleSetVMRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.Get method.

type VirtualMachineScaleSetVMRunCommandsClientGetResponse added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientGetResponse struct {
	VirtualMachineRunCommand
}

VirtualMachineScaleSetVMRunCommandsClientGetResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.Get.

type VirtualMachineScaleSetVMRunCommandsClientListOptions added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

VirtualMachineScaleSetVMRunCommandsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.List method.

type VirtualMachineScaleSetVMRunCommandsClientListResponse added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientListResponse struct {
	VirtualMachineRunCommandsListResult
}

VirtualMachineScaleSetVMRunCommandsClientListResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.List.

type VirtualMachineScaleSetVMRunCommandsClientUpdateResponse added in v0.3.0

type VirtualMachineScaleSetVMRunCommandsClientUpdateResponse struct {
	VirtualMachineRunCommand
}

VirtualMachineScaleSetVMRunCommandsClientUpdateResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.Update.

type VirtualMachineScaleSetVMsClient

type VirtualMachineScaleSetVMsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineScaleSetVMsClient contains the methods for the VirtualMachineScaleSetVMs group. Don't use this type directly, use NewVirtualMachineScaleSetVMsClient() instead.

func NewVirtualMachineScaleSetVMsClient

func NewVirtualMachineScaleSetVMsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMsClient, error)

NewVirtualMachineScaleSetVMsClient creates a new instance of VirtualMachineScaleSetVMsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineScaleSetVMsClient) BeginDeallocate

BeginDeallocate - Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDeallocate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_Deallocate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeallocate(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginDelete

BeginDelete - Deletes a virtual machine from a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Delete_Force.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		"0",
		&armcompute.VirtualMachineScaleSetVMsClientBeginDeleteOptions{ForceDeletion: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginPerformMaintenance

BeginPerformMaintenance - Performs maintenance on a virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPerformMaintenance method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_PerformMaintenance_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPerformMaintenance(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaa",
		"aaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginPowerOff

BeginPowerOff - Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPowerOff method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_PowerOff_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPowerOff(ctx,
		"rgcompute",
		"aaaaaa",
		"aaaaaaaaa",
		&armcompute.VirtualMachineScaleSetVMsClientBeginPowerOffOptions{SkipShutdown: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginRedeploy

BeginRedeploy - Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRedeploy method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_Redeploy_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRedeploy(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginReimage

BeginReimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_Reimage_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimage(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetVMsClientBeginReimageOptions{VMScaleSetVMReimageInput: &armcompute.VirtualMachineScaleSetVMReimageParameters{
			TempDisk: to.Ptr(true),
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginReimageAll

BeginReimageAll - Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimageAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_ReimageAll_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimageAll(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginRestart

BeginRestart - Restarts a virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRestart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_Restart_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx,
		"rgcompute",
		"aa",
		"aaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginRunCommand

BeginRunCommand - Run command on a virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. parameters - Parameters supplied to the Run command operation. options - VirtualMachineScaleSetVMsClientBeginRunCommandOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRunCommand method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRunCommand(ctx,
		"myResourceGroup",
		"myVirtualMachineScaleSet",
		"0",
		armcompute.RunCommandInput{
			CommandID: to.Ptr("RunPowerShellScript"),
			Script: []*string{
				to.Ptr("Write-Host Hello World!")},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginStart

BeginStart - Starts a virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_Start_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaa",
		"aaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) BeginUpdate

BeginUpdate - Updates a virtual machine of a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set where the extension should be create or updated. instanceID - The instance ID of the virtual machine. parameters - Parameters supplied to the Update Virtual Machine Scale Sets VM operation. options - VirtualMachineScaleSetVMsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		armcompute.VirtualMachineScaleSetVM{
			Location: to.Ptr("westus"),
			Tags:     map[string]*string{},
			Plan: &armcompute.Plan{
				Name:          to.Ptr("aaaaaaaaaa"),
				Product:       to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
				PromotionCode: to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
				Publisher:     to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"),
			},
			Properties: &armcompute.VirtualMachineScaleSetVMProperties{
				AdditionalCapabilities: &armcompute.AdditionalCapabilities{
					HibernationEnabled: to.Ptr(true),
					UltraSSDEnabled:    to.Ptr(true),
				},
				AvailabilitySet: &armcompute.SubResource{
					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
				},
				DiagnosticsProfile: &armcompute.DiagnosticsProfile{
					BootDiagnostics: &armcompute.BootDiagnostics{
						Enabled:    to.Ptr(true),
						StorageURI: to.Ptr("aaaaaaaaaaaaa"),
					},
				},
				HardwareProfile: &armcompute.HardwareProfile{
					VMSize: to.Ptr(armcompute.VirtualMachineSizeTypesBasicA0),
					VMSizeProperties: &armcompute.VMSizeProperties{
						VCPUsAvailable: to.Ptr[int32](9),
						VCPUsPerCore:   to.Ptr[int32](12),
					},
				},
				InstanceView: &armcompute.VirtualMachineScaleSetVMInstanceView{
					BootDiagnostics: &armcompute.BootDiagnosticsInstanceView{
						Status: &armcompute.InstanceViewStatus{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						},
					},
					Disks: []*armcompute.DiskInstanceView{
						{
							Name: to.Ptr("aaaaaaaaaaa"),
							EncryptionSettings: []*armcompute.DiskEncryptionSettings{
								{
									DiskEncryptionKey: &armcompute.KeyVaultSecretReference{
										SecretURL: to.Ptr("aaaaaaaa"),
										SourceVault: &armcompute.SubResource{
											ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
										},
									},
									Enabled: to.Ptr(true),
									KeyEncryptionKey: &armcompute.KeyVaultKeyReference{
										KeyURL: to.Ptr("aaaaaaaaaaaaaa"),
										SourceVault: &armcompute.SubResource{
											ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
										},
									},
								}},
							Statuses: []*armcompute.InstanceViewStatus{
								{
									Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
									DisplayStatus: to.Ptr("aaaaaa"),
									Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
									Message:       to.Ptr("a"),
									Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
								}},
						}},
					MaintenanceRedeployStatus: &armcompute.MaintenanceRedeployStatus{
						IsCustomerInitiatedMaintenanceAllowed: to.Ptr(true),
						LastOperationMessage:                  to.Ptr("aaaaaa"),
						LastOperationResultCode:               to.Ptr(armcompute.MaintenanceOperationResultCodeTypesNone),
						MaintenanceWindowEndTime:              to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.531Z"); return t }()),
						MaintenanceWindowStartTime:            to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.531Z"); return t }()),
						PreMaintenanceWindowEndTime:           to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.531Z"); return t }()),
						PreMaintenanceWindowStartTime:         to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.531Z"); return t }()),
					},
					PlacementGroupID:     to.Ptr("aaa"),
					PlatformFaultDomain:  to.Ptr[int32](14),
					PlatformUpdateDomain: to.Ptr[int32](23),
					RdpThumbPrint:        to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"),
					Statuses: []*armcompute.InstanceViewStatus{
						{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						}},
					VMAgent: &armcompute.VirtualMachineAgentInstanceView{
						ExtensionHandlers: []*armcompute.VirtualMachineExtensionHandlerInstanceView{
							{
								Type: to.Ptr("aaaaaaaaaaaaa"),
								Status: &armcompute.InstanceViewStatus{
									Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
									DisplayStatus: to.Ptr("aaaaaa"),
									Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
									Message:       to.Ptr("a"),
									Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
								},
								TypeHandlerVersion: to.Ptr("aaaaa"),
							}},
						Statuses: []*armcompute.InstanceViewStatus{
							{
								Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
								DisplayStatus: to.Ptr("aaaaaa"),
								Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
								Message:       to.Ptr("a"),
								Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
							}},
						VMAgentVersion: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
					},
					VMHealth: &armcompute.VirtualMachineHealthStatus{
						Status: &armcompute.InstanceViewStatus{
							Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
							DisplayStatus: to.Ptr("aaaaaa"),
							Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
							Message:       to.Ptr("a"),
							Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
						},
					},
					Extensions: []*armcompute.VirtualMachineExtensionInstanceView{
						{
							Name: to.Ptr("aaaaaaaaaaaaaaaaa"),
							Type: to.Ptr("aaaaaaaaa"),
							Statuses: []*armcompute.InstanceViewStatus{
								{
									Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
									DisplayStatus: to.Ptr("aaaaaa"),
									Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
									Message:       to.Ptr("a"),
									Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
								}},
							Substatuses: []*armcompute.InstanceViewStatus{
								{
									Code:          to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
									DisplayStatus: to.Ptr("aaaaaa"),
									Level:         to.Ptr(armcompute.StatusLevelTypesInfo),
									Message:       to.Ptr("a"),
									Time:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t }()),
								}},
							TypeHandlerVersion: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"),
						}},
				},
				LicenseType: to.Ptr("aaaaaaaaaa"),
				NetworkProfile: &armcompute.NetworkProfile{
					NetworkAPIVersion: to.Ptr(armcompute.NetworkAPIVersionTwoThousandTwenty1101),
					NetworkInterfaceConfigurations: []*armcompute.VirtualMachineNetworkInterfaceConfiguration{
						{
							Name: to.Ptr("aaaaaaaaaaa"),
							Properties: &armcompute.VirtualMachineNetworkInterfaceConfigurationProperties{
								DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
								DNSSettings: &armcompute.VirtualMachineNetworkInterfaceDNSSettingsConfiguration{
									DNSServers: []*string{
										to.Ptr("aaaaaa")},
								},
								DscpConfiguration: &armcompute.SubResource{
									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
								},
								EnableAcceleratedNetworking: to.Ptr(true),
								EnableFpga:                  to.Ptr(true),
								EnableIPForwarding:          to.Ptr(true),
								IPConfigurations: []*armcompute.VirtualMachineNetworkInterfaceIPConfiguration{
									{
										Name: to.Ptr("aa"),
										Properties: &armcompute.VirtualMachineNetworkInterfaceIPConfigurationProperties{
											ApplicationGatewayBackendAddressPools: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											ApplicationSecurityGroups: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											LoadBalancerBackendAddressPools: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											Primary:                 to.Ptr(true),
											PrivateIPAddressVersion: to.Ptr(armcompute.IPVersionsIPv4),
											PublicIPAddressConfiguration: &armcompute.VirtualMachinePublicIPAddressConfiguration{
												Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
												Properties: &armcompute.VirtualMachinePublicIPAddressConfigurationProperties{
													DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
													DNSSettings: &armcompute.VirtualMachinePublicIPAddressDNSSettingsConfiguration{
														DomainNameLabel: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"),
													},
													IdleTimeoutInMinutes: to.Ptr[int32](2),
													IPTags: []*armcompute.VirtualMachineIPTag{
														{
															IPTagType: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"),
															Tag:       to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
														}},
													PublicIPAddressVersion:   to.Ptr(armcompute.IPVersionsIPv4),
													PublicIPAllocationMethod: to.Ptr(armcompute.PublicIPAllocationMethodDynamic),
													PublicIPPrefix: &armcompute.SubResource{
														ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
													},
												},
												SKU: &armcompute.PublicIPAddressSKU{
													Name: to.Ptr(armcompute.PublicIPAddressSKUNameBasic),
													Tier: to.Ptr(armcompute.PublicIPAddressSKUTierRegional),
												},
											},
											Subnet: &armcompute.SubResource{
												ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
											},
										},
									}},
								NetworkSecurityGroup: &armcompute.SubResource{
									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
								},
								Primary: to.Ptr(true),
							},
						}},
					NetworkInterfaces: []*armcompute.NetworkInterfaceReference{
						{
							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415"),
							Properties: &armcompute.NetworkInterfaceReferenceProperties{
								DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
								Primary:      to.Ptr(true),
							},
						}},
				},
				NetworkProfileConfiguration: &armcompute.VirtualMachineScaleSetVMNetworkProfileConfiguration{
					NetworkInterfaceConfigurations: []*armcompute.VirtualMachineScaleSetNetworkConfiguration{
						{
							ID:   to.Ptr("aaaaaaaa"),
							Name: to.Ptr("vmsstestnetconfig5415"),
							Properties: &armcompute.VirtualMachineScaleSetNetworkConfigurationProperties{
								DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
								DNSSettings: &armcompute.VirtualMachineScaleSetNetworkConfigurationDNSSettings{
									DNSServers: []*string{},
								},
								EnableAcceleratedNetworking: to.Ptr(true),
								EnableFpga:                  to.Ptr(true),
								EnableIPForwarding:          to.Ptr(true),
								IPConfigurations: []*armcompute.VirtualMachineScaleSetIPConfiguration{
									{
										ID:   to.Ptr("aaaaaaaaa"),
										Name: to.Ptr("vmsstestnetconfig9693"),
										Properties: &armcompute.VirtualMachineScaleSetIPConfigurationProperties{
											ApplicationGatewayBackendAddressPools: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											ApplicationSecurityGroups: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											LoadBalancerBackendAddressPools: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											LoadBalancerInboundNatPools: []*armcompute.SubResource{
												{
													ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
												}},
											Primary:                 to.Ptr(true),
											PrivateIPAddressVersion: to.Ptr(armcompute.IPVersionIPv4),
											PublicIPAddressConfiguration: &armcompute.VirtualMachineScaleSetPublicIPAddressConfiguration{
												Name: to.Ptr("aaaaaaaaaaaaaaaaaa"),
												Properties: &armcompute.VirtualMachineScaleSetPublicIPAddressConfigurationProperties{
													DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
													DNSSettings: &armcompute.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{
														DomainNameLabel: to.Ptr("aaaaaaaaaaaaaaaaaa"),
													},
													IdleTimeoutInMinutes: to.Ptr[int32](18),
													IPTags: []*armcompute.VirtualMachineScaleSetIPTag{
														{
															IPTagType: to.Ptr("aaaaaaa"),
															Tag:       to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"),
														}},
													PublicIPAddressVersion: to.Ptr(armcompute.IPVersionIPv4),
													PublicIPPrefix: &armcompute.SubResource{
														ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
													},
												},
												SKU: &armcompute.PublicIPAddressSKU{
													Name: to.Ptr(armcompute.PublicIPAddressSKUNameBasic),
													Tier: to.Ptr(armcompute.PublicIPAddressSKUTierRegional),
												},
											},
											Subnet: &armcompute.APIEntityReference{
												ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503"),
											},
										},
									}},
								NetworkSecurityGroup: &armcompute.SubResource{
									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
								},
								Primary: to.Ptr(true),
							},
						}},
				},
				OSProfile: &armcompute.OSProfile{
					AdminPassword:            to.Ptr("aaaaaaaaaaaaaaaa"),
					AdminUsername:            to.Ptr("Foo12"),
					AllowExtensionOperations: to.Ptr(true),
					ComputerName:             to.Ptr("test000000"),
					CustomData:               to.Ptr("aaaa"),
					LinuxConfiguration: &armcompute.LinuxConfiguration{
						DisablePasswordAuthentication: to.Ptr(true),
						PatchSettings: &armcompute.LinuxPatchSettings{
							AssessmentMode: to.Ptr(armcompute.LinuxPatchAssessmentModeImageDefault),
							PatchMode:      to.Ptr(armcompute.LinuxVMGuestPatchModeImageDefault),
						},
						ProvisionVMAgent: to.Ptr(true),
						SSH: &armcompute.SSHConfiguration{
							PublicKeys: []*armcompute.SSHPublicKey{
								{
									Path:    to.Ptr("aaa"),
									KeyData: to.Ptr("aaaaaa"),
								}},
						},
					},
					RequireGuestProvisionSignal: to.Ptr(true),
					Secrets:                     []*armcompute.VaultSecretGroup{},
					WindowsConfiguration: &armcompute.WindowsConfiguration{
						AdditionalUnattendContent: []*armcompute.AdditionalUnattendContent{
							{
								ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"),
								Content:       to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
								PassName:      to.Ptr("OobeSystem"),
								SettingName:   to.Ptr(armcompute.SettingNamesAutoLogon),
							}},
						EnableAutomaticUpdates: to.Ptr(true),
						PatchSettings: &armcompute.PatchSettings{
							AssessmentMode:    to.Ptr(armcompute.WindowsPatchAssessmentModeImageDefault),
							EnableHotpatching: to.Ptr(true),
							PatchMode:         to.Ptr(armcompute.WindowsVMGuestPatchModeManual),
						},
						ProvisionVMAgent: to.Ptr(true),
						TimeZone:         to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"),
						WinRM: &armcompute.WinRMConfiguration{
							Listeners: []*armcompute.WinRMListener{
								{
									CertificateURL: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"),
									Protocol:       to.Ptr(armcompute.ProtocolTypesHTTP),
								}},
						},
					},
				},
				ProtectionPolicy: &armcompute.VirtualMachineScaleSetVMProtectionPolicy{
					ProtectFromScaleIn:         to.Ptr(true),
					ProtectFromScaleSetActions: to.Ptr(true),
				},
				SecurityProfile: &armcompute.SecurityProfile{
					EncryptionAtHost: to.Ptr(true),
					SecurityType:     to.Ptr(armcompute.SecurityTypesTrustedLaunch),
					UefiSettings: &armcompute.UefiSettings{
						SecureBootEnabled: to.Ptr(true),
						VTpmEnabled:       to.Ptr(true),
					},
				},
				StorageProfile: &armcompute.StorageProfile{
					DataDisks: []*armcompute.DataDisk{
						{
							Name:         to.Ptr("vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d"),
							Caching:      to.Ptr(armcompute.CachingTypesNone),
							CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesEmpty),
							DeleteOption: to.Ptr(armcompute.DiskDeleteOptionTypesDelete),
							DetachOption: to.Ptr(armcompute.DiskDetachOptionTypesForceDetach),
							DiskSizeGB:   to.Ptr[int32](128),
							Image: &armcompute.VirtualHardDisk{
								URI: to.Ptr("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"),
							},
							Lun: to.Ptr[int32](1),
							ManagedDisk: &armcompute.ManagedDiskParameters{
								ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d"),
								DiskEncryptionSet: &armcompute.DiskEncryptionSetParameters{
									ID: to.Ptr("aaaaaaaaaaaa"),
								},
								StorageAccountType: to.Ptr(armcompute.StorageAccountTypesStandardLRS),
							},
							ToBeDetached: to.Ptr(true),
							Vhd: &armcompute.VirtualHardDisk{
								URI: to.Ptr("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"),
							},
							WriteAcceleratorEnabled: to.Ptr(true),
						}},
					ImageReference: &armcompute.ImageReference{
						ID:                   to.Ptr("a"),
						Offer:                to.Ptr("WindowsServer"),
						Publisher:            to.Ptr("MicrosoftWindowsServer"),
						SharedGalleryImageID: to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
						SKU:                  to.Ptr("2012-R2-Datacenter"),
						Version:              to.Ptr("4.127.20180315"),
					},
					OSDisk: &armcompute.OSDisk{
						Name:         to.Ptr("vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc"),
						Caching:      to.Ptr(armcompute.CachingTypesNone),
						CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesFromImage),
						DeleteOption: to.Ptr(armcompute.DiskDeleteOptionTypesDelete),
						DiffDiskSettings: &armcompute.DiffDiskSettings{
							Option:    to.Ptr(armcompute.DiffDiskOptionsLocal),
							Placement: to.Ptr(armcompute.DiffDiskPlacementCacheDisk),
						},
						DiskSizeGB: to.Ptr[int32](127),
						EncryptionSettings: &armcompute.DiskEncryptionSettings{
							DiskEncryptionKey: &armcompute.KeyVaultSecretReference{
								SecretURL: to.Ptr("aaaaaaaa"),
								SourceVault: &armcompute.SubResource{
									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
								},
							},
							Enabled: to.Ptr(true),
							KeyEncryptionKey: &armcompute.KeyVaultKeyReference{
								KeyURL: to.Ptr("aaaaaaaaaaaaaa"),
								SourceVault: &armcompute.SubResource{
									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
								},
							},
						},
						Image: &armcompute.VirtualHardDisk{
							URI: to.Ptr("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"),
						},
						ManagedDisk: &armcompute.ManagedDiskParameters{
							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc"),
							DiskEncryptionSet: &armcompute.DiskEncryptionSetParameters{
								ID: to.Ptr("aaaaaaaaaaaa"),
							},
							StorageAccountType: to.Ptr(armcompute.StorageAccountTypesStandardLRS),
						},
						OSType: to.Ptr(armcompute.OperatingSystemTypesWindows),
						Vhd: &armcompute.VirtualHardDisk{
							URI: to.Ptr("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"),
						},
						WriteAcceleratorEnabled: to.Ptr(true),
					},
				},
				UserData: to.Ptr("RXhhbXBsZSBVc2VyRGF0YQ=="),
			},
			SKU: &armcompute.SKU{
				Name:     to.Ptr("Classic"),
				Capacity: to.Ptr[int64](29),
				Tier:     to.Ptr("aaaaaaaaaaaaaa"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMsClient) Get

Get - Gets a virtual machine from a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_WithUserData.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"{vmss-name}",
		"0",
		&armcompute.VirtualMachineScaleSetVMsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMsClient) GetInstanceView

GetInstanceView - Gets the status of a virtual machine from a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.GetInstanceView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_Get_InstanceViewAutoPlacedOnDedicatedHostGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetInstanceView(ctx,
		"myResourceGroup",
		"myVirtualMachineScaleSet",
		"0",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMsClient) NewListPager added in v0.7.0

func (client *VirtualMachineScaleSetVMsClient) NewListPager(resourceGroupName string, virtualMachineScaleSetName string, options *VirtualMachineScaleSetVMsClientListOptions) *runtime.Pager[VirtualMachineScaleSetVMsClientListResponse]

NewListPager - Gets a list of all virtual machines in a VM scale sets. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. virtualMachineScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetVMsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVMs_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetVMsClientListOptions{Filter: to.Ptr("aaaaaaaaaaaaaa"),
			Select: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"),
			Expand: to.Ptr("aaaaaaaaaaaaa"),
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData

RetrieveBootDiagnosticsData - The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_RetrieveBootDiagnosticsData.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.RetrieveBootDiagnosticsData(ctx,
		"ResourceGroup",
		"myvmScaleSet",
		"0",
		&armcompute.VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions{SasURIExpirationTimeInMinutes: to.Ptr[int32](60)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetVMsClient) SimulateEviction

SimulateEviction - The operation to simulate the eviction of spot virtual machine in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. instanceID - The instance ID of the virtual machine. options - VirtualMachineScaleSetVMsClientSimulateEvictionOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.SimulateEviction method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetVM_SimulateEviction.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetVMsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.SimulateEviction(ctx,
		"ResourceGroup",
		"VmScaleSetName",
		"InstanceId",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type VirtualMachineScaleSetVMsClientBeginDeallocateOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginDeallocateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDeallocate method.

type VirtualMachineScaleSetVMsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginDeleteOptions struct {
	// Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview)
	ForceDeletion *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDelete method.

type VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPerformMaintenance method.

type VirtualMachineScaleSetVMsClientBeginPowerOffOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginPowerOffOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false
	// indicates otherwise. Default value for this flag is false if not specified
	SkipShutdown *bool
}

VirtualMachineScaleSetVMsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPowerOff method.

type VirtualMachineScaleSetVMsClientBeginRedeployOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginRedeployOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRedeploy method.

type VirtualMachineScaleSetVMsClientBeginReimageAllOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginReimageAllOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimageAll method.

type VirtualMachineScaleSetVMsClientBeginReimageOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginReimageOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// Parameters for the Reimaging Virtual machine in ScaleSet.
	VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters
}

VirtualMachineScaleSetVMsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimage method.

type VirtualMachineScaleSetVMsClientBeginRestartOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRestart method.

type VirtualMachineScaleSetVMsClientBeginRunCommandOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginRunCommandOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginRunCommandOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRunCommand method.

type VirtualMachineScaleSetVMsClientBeginStartOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginStart method.

type VirtualMachineScaleSetVMsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetVMsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginUpdate method.

type VirtualMachineScaleSetVMsClientDeallocateResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientDeallocateResponse struct {
}

VirtualMachineScaleSetVMsClientDeallocateResponse contains the response from method VirtualMachineScaleSetVMsClient.Deallocate.

type VirtualMachineScaleSetVMsClientDeleteResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientDeleteResponse struct {
}

VirtualMachineScaleSetVMsClientDeleteResponse contains the response from method VirtualMachineScaleSetVMsClient.Delete.

type VirtualMachineScaleSetVMsClientGetInstanceViewOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientGetInstanceViewOptions struct {
}

VirtualMachineScaleSetVMsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.GetInstanceView method.

type VirtualMachineScaleSetVMsClientGetInstanceViewResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientGetInstanceViewResponse struct {
	VirtualMachineScaleSetVMInstanceView
}

VirtualMachineScaleSetVMsClientGetInstanceViewResponse contains the response from method VirtualMachineScaleSetVMsClient.GetInstanceView.

type VirtualMachineScaleSetVMsClientGetOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine.
	// 'UserData' will retrieve the UserData of the virtual machine.
	Expand *InstanceViewTypes
}

VirtualMachineScaleSetVMsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.Get method.

type VirtualMachineScaleSetVMsClientGetResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientGetResponse struct {
	VirtualMachineScaleSetVM
}

VirtualMachineScaleSetVMsClientGetResponse contains the response from method VirtualMachineScaleSetVMsClient.Get.

type VirtualMachineScaleSetVMsClientListOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientListOptions struct {
	// The expand expression to apply to the operation. Allowed values are 'instanceView'.
	Expand *string
	// The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true',
	// 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq
	// false'.
	Filter *string
	// The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.
	Select *string
}

VirtualMachineScaleSetVMsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.List method.

type VirtualMachineScaleSetVMsClientListResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientListResponse struct {
	VirtualMachineScaleSetVMListResult
}

VirtualMachineScaleSetVMsClientListResponse contains the response from method VirtualMachineScaleSetVMsClient.List.

type VirtualMachineScaleSetVMsClientPerformMaintenanceResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientPerformMaintenanceResponse struct {
}

VirtualMachineScaleSetVMsClientPerformMaintenanceResponse contains the response from method VirtualMachineScaleSetVMsClient.PerformMaintenance.

type VirtualMachineScaleSetVMsClientPowerOffResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientPowerOffResponse struct {
}

VirtualMachineScaleSetVMsClientPowerOffResponse contains the response from method VirtualMachineScaleSetVMsClient.PowerOff.

type VirtualMachineScaleSetVMsClientRedeployResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientRedeployResponse struct {
}

VirtualMachineScaleSetVMsClientRedeployResponse contains the response from method VirtualMachineScaleSetVMsClient.Redeploy.

type VirtualMachineScaleSetVMsClientReimageAllResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientReimageAllResponse struct {
}

VirtualMachineScaleSetVMsClientReimageAllResponse contains the response from method VirtualMachineScaleSetVMsClient.ReimageAll.

type VirtualMachineScaleSetVMsClientReimageResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientReimageResponse struct {
}

VirtualMachineScaleSetVMsClientReimageResponse contains the response from method VirtualMachineScaleSetVMsClient.Reimage.

type VirtualMachineScaleSetVMsClientRestartResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientRestartResponse struct {
}

VirtualMachineScaleSetVMsClientRestartResponse contains the response from method VirtualMachineScaleSetVMsClient.Restart.

type VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions struct {
	// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes.
	// NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.
	SasURIExpirationTimeInMinutes *int32
}

VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData method.

type VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse struct {
	RetrieveBootDiagnosticsDataResult
}

VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse contains the response from method VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData.

type VirtualMachineScaleSetVMsClientRunCommandResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientRunCommandResponse struct {
	RunCommandResult
}

VirtualMachineScaleSetVMsClientRunCommandResponse contains the response from method VirtualMachineScaleSetVMsClient.RunCommand.

type VirtualMachineScaleSetVMsClientSimulateEvictionOptions added in v0.3.0

type VirtualMachineScaleSetVMsClientSimulateEvictionOptions struct {
}

VirtualMachineScaleSetVMsClientSimulateEvictionOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.SimulateEviction method.

type VirtualMachineScaleSetVMsClientSimulateEvictionResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientSimulateEvictionResponse struct {
}

VirtualMachineScaleSetVMsClientSimulateEvictionResponse contains the response from method VirtualMachineScaleSetVMsClient.SimulateEviction.

type VirtualMachineScaleSetVMsClientStartResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientStartResponse struct {
}

VirtualMachineScaleSetVMsClientStartResponse contains the response from method VirtualMachineScaleSetVMsClient.Start.

type VirtualMachineScaleSetVMsClientUpdateResponse added in v0.3.0

type VirtualMachineScaleSetVMsClientUpdateResponse struct {
	VirtualMachineScaleSetVM
}

VirtualMachineScaleSetVMsClientUpdateResponse contains the response from method VirtualMachineScaleSetVMsClient.Update.

type VirtualMachineScaleSetsClient

type VirtualMachineScaleSetsClient struct {
	// contains filtered or unexported fields
}

VirtualMachineScaleSetsClient contains the methods for the VirtualMachineScaleSets group. Don't use this type directly, use NewVirtualMachineScaleSetsClient() instead.

func NewVirtualMachineScaleSetsClient

func NewVirtualMachineScaleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetsClient, error)

NewVirtualMachineScaleSetsClient creates a new instance of VirtualMachineScaleSetsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineScaleSetsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create or update a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set to create or update. parameters - The scale set object. options - VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithExtensionsSuppressFailuresEnabled.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"{vmss-name}",
		armcompute.VirtualMachineScaleSet{
			Location: to.Ptr("westus"),
			Properties: &armcompute.VirtualMachineScaleSetProperties{
				Overprovision: to.Ptr(true),
				UpgradePolicy: &armcompute.UpgradePolicy{
					Mode: to.Ptr(armcompute.UpgradeModeManual),
				},
				VirtualMachineProfile: &armcompute.VirtualMachineScaleSetVMProfile{
					DiagnosticsProfile: &armcompute.DiagnosticsProfile{
						BootDiagnostics: &armcompute.BootDiagnostics{
							Enabled:    to.Ptr(true),
							StorageURI: to.Ptr("http://{existing-storage-account-name}.blob.core.windows.net"),
						},
					},
					ExtensionProfile: &armcompute.VirtualMachineScaleSetExtensionProfile{
						Extensions: []*armcompute.VirtualMachineScaleSetExtension{
							{
								Name: to.Ptr("{extension-name}"),
								Properties: &armcompute.VirtualMachineScaleSetExtensionProperties{
									Type:                    to.Ptr("{extension-Type}"),
									AutoUpgradeMinorVersion: to.Ptr(false),
									Publisher:               to.Ptr("{extension-Publisher}"),
									Settings:                map[string]interface{}{},
									SuppressFailures:        to.Ptr(true),
									TypeHandlerVersion:      to.Ptr("{handler-version}"),
								},
							}},
					},
					NetworkProfile: &armcompute.VirtualMachineScaleSetNetworkProfile{
						NetworkInterfaceConfigurations: []*armcompute.VirtualMachineScaleSetNetworkConfiguration{
							{
								Name: to.Ptr("{vmss-name}"),
								Properties: &armcompute.VirtualMachineScaleSetNetworkConfigurationProperties{
									EnableIPForwarding: to.Ptr(true),
									IPConfigurations: []*armcompute.VirtualMachineScaleSetIPConfiguration{
										{
											Name: to.Ptr("{vmss-name}"),
											Properties: &armcompute.VirtualMachineScaleSetIPConfigurationProperties{
												Subnet: &armcompute.APIEntityReference{
													ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
												},
											},
										}},
									Primary: to.Ptr(true),
								},
							}},
					},
					OSProfile: &armcompute.VirtualMachineScaleSetOSProfile{
						AdminPassword:      to.Ptr("{your-password}"),
						AdminUsername:      to.Ptr("{your-username}"),
						ComputerNamePrefix: to.Ptr("{vmss-name}"),
					},
					StorageProfile: &armcompute.VirtualMachineScaleSetStorageProfile{
						ImageReference: &armcompute.ImageReference{
							Offer:     to.Ptr("WindowsServer"),
							Publisher: to.Ptr("MicrosoftWindowsServer"),
							SKU:       to.Ptr("2016-Datacenter"),
							Version:   to.Ptr("latest"),
						},
						OSDisk: &armcompute.VirtualMachineScaleSetOSDisk{
							Caching:      to.Ptr(armcompute.CachingTypesReadWrite),
							CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesFromImage),
							ManagedDisk: &armcompute.VirtualMachineScaleSetManagedDiskParameters{
								StorageAccountType: to.Ptr(armcompute.StorageAccountTypesStandardLRS),
							},
						},
					},
				},
			},
			SKU: &armcompute.SKU{
				Name:     to.Ptr("Standard_D1_v2"),
				Capacity: to.Ptr[int64](3),
				Tier:     to.Ptr("Standard"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetsClient) BeginDeallocate

BeginDeallocate - Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeallocate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Deallocate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeallocate(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginDeallocateOptions{VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginDelete

BeginDelete - Deletes a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Delete_Force.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myvmScaleSet",
		&armcompute.VirtualMachineScaleSetsClientBeginDeleteOptions{ForceDeletion: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginDeleteInstances

BeginDeleteInstances - Deletes virtual machines in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set. options - VirtualMachineScaleSetsClientBeginDeleteInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeleteInstances method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_DeleteInstances_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeleteInstances(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		armcompute.VirtualMachineScaleSetVMInstanceRequiredIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")},
		},
		&armcompute.VirtualMachineScaleSetsClientBeginDeleteInstancesOptions{ForceDeletion: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginPerformMaintenance

BeginPerformMaintenance - Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPerformMaintenance method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_PerformMaintenance_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPerformMaintenance(ctx,
		"rgcompute",
		"aaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions{VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginPowerOff

BeginPowerOff - Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPowerOff method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_PowerOff_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPowerOff(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginPowerOffOptions{SkipShutdown: to.Ptr(true),
			VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
				InstanceIDs: []*string{
					to.Ptr("aaaaaaaaaaaaaaaaa")},
			},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginRedeploy

BeginRedeploy - Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRedeploy method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Redeploy_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRedeploy(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginRedeployOptions{VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginReimage

BeginReimage - Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Reimage_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimage(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginReimageOptions{VMScaleSetReimageInput: &armcompute.VirtualMachineScaleSetReimageParameters{
			TempDisk: to.Ptr(true),
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginReimageAll

BeginReimageAll - Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimageAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_ReimageAll_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimageAll(ctx,
		"rgcompute",
		"aaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginReimageAllOptions{VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginRestart

BeginRestart - Restarts one or more virtual machines in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRestart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Restart_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginRestartOptions{VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginSetOrchestrationServiceState

BeginSetOrchestrationServiceState - Changes ServiceState property for a given service If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the virtual machine scale set to create or update. parameters - The input object for SetOrchestrationServiceState API. options - VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_SetOrchestrationServiceState_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginSetOrchestrationServiceState(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaa",
		armcompute.OrchestrationServiceStateInput{
			Action:      to.Ptr(armcompute.OrchestrationServiceStateActionResume),
			ServiceName: to.Ptr(armcompute.OrchestrationServiceNamesAutomaticRepairs),
		},
		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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginStart

BeginStart - Starts one or more virtual machines in a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Start_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachineScaleSetsClientBeginStartOptions{VMInstanceIDs: &armcompute.VirtualMachineScaleSetVMInstanceIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
		},
		})
	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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) BeginUpdate

BeginUpdate - Update a VM scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set to create or update. parameters - The scale set object. options - VirtualMachineScaleSetsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"rgcompute",
		"aaaaaaaaaaaaa",
		armcompute.VirtualMachineScaleSetUpdate{
			Tags: map[string]*string{
				"key246": to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"),
			},
			Identity: &armcompute.VirtualMachineScaleSetIdentity{
				Type: to.Ptr(armcompute.ResourceIdentityTypeSystemAssigned),
				UserAssignedIdentities: map[string]*armcompute.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue{
					"key3951": {},
				},
			},
			Plan: &armcompute.Plan{
				Name:          to.Ptr("windows2016"),
				Product:       to.Ptr("windows-data-science-vm"),
				PromotionCode: to.Ptr("aaaaaaaaaa"),
				Publisher:     to.Ptr("microsoft-ads"),
			},
			Properties: &armcompute.VirtualMachineScaleSetUpdateProperties{
				AdditionalCapabilities: &armcompute.AdditionalCapabilities{
					HibernationEnabled: to.Ptr(true),
					UltraSSDEnabled:    to.Ptr(true),
				},
				AutomaticRepairsPolicy: &armcompute.AutomaticRepairsPolicy{
					Enabled:     to.Ptr(true),
					GracePeriod: to.Ptr("PT30M"),
				},
				DoNotRunExtensionsOnOverprovisionedVMs: to.Ptr(true),
				Overprovision:                          to.Ptr(true),
				ProximityPlacementGroup: &armcompute.SubResource{
					ID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
				},
				ScaleInPolicy: &armcompute.ScaleInPolicy{
					ForceDeletion: to.Ptr(true),
					Rules: []*armcompute.VirtualMachineScaleSetScaleInRules{
						to.Ptr(armcompute.VirtualMachineScaleSetScaleInRulesOldestVM)},
				},
				SinglePlacementGroup: to.Ptr(true),
				UpgradePolicy: &armcompute.UpgradePolicy{
					AutomaticOSUpgradePolicy: &armcompute.AutomaticOSUpgradePolicy{
						DisableAutomaticRollback: to.Ptr(true),
						EnableAutomaticOSUpgrade: to.Ptr(true),
					},
					Mode: to.Ptr(armcompute.UpgradeModeManual),
					RollingUpgradePolicy: &armcompute.RollingUpgradePolicy{
						EnableCrossZoneUpgrade:              to.Ptr(true),
						MaxBatchInstancePercent:             to.Ptr[int32](49),
						MaxUnhealthyInstancePercent:         to.Ptr[int32](81),
						MaxUnhealthyUpgradedInstancePercent: to.Ptr[int32](98),
						PauseTimeBetweenBatches:             to.Ptr("aaaaaaaaaaaaaaa"),
						PrioritizeUnhealthyInstances:        to.Ptr(true),
					},
				},
				VirtualMachineProfile: &armcompute.VirtualMachineScaleSetUpdateVMProfile{
					BillingProfile: &armcompute.BillingProfile{
						MaxPrice: to.Ptr[float64](-1),
					},
					DiagnosticsProfile: &armcompute.DiagnosticsProfile{
						BootDiagnostics: &armcompute.BootDiagnostics{
							Enabled:    to.Ptr(true),
							StorageURI: to.Ptr("http://{existing-storage-account-name}.blob.core.windows.net"),
						},
					},
					ExtensionProfile: &armcompute.VirtualMachineScaleSetExtensionProfile{
						ExtensionsTimeBudget: to.Ptr("PT1H20M"),
						Extensions: []*armcompute.VirtualMachineScaleSetExtension{
							{
								Name: to.Ptr("{extension-name}"),
								Properties: &armcompute.VirtualMachineScaleSetExtensionProperties{
									Type:                    to.Ptr("{extension-Type}"),
									AutoUpgradeMinorVersion: to.Ptr(true),
									EnableAutomaticUpgrade:  to.Ptr(true),
									ForceUpdateTag:          to.Ptr("aaaaaaaaa"),
									ProtectedSettings:       map[string]interface{}{},
									ProvisionAfterExtensions: []*string{
										to.Ptr("aa")},
									Publisher:          to.Ptr("{extension-Publisher}"),
									Settings:           map[string]interface{}{},
									SuppressFailures:   to.Ptr(true),
									TypeHandlerVersion: to.Ptr("{handler-version}"),
								},
							}},
					},
					LicenseType: to.Ptr("aaaaaaaaaaaa"),
					NetworkProfile: &armcompute.VirtualMachineScaleSetUpdateNetworkProfile{
						HealthProbe: &armcompute.APIEntityReference{
							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123"),
						},
						NetworkAPIVersion: to.Ptr(armcompute.NetworkAPIVersionTwoThousandTwenty1101),
						NetworkInterfaceConfigurations: []*armcompute.VirtualMachineScaleSetUpdateNetworkConfiguration{
							{
								ID:   to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
								Name: to.Ptr("aaaaaaaa"),
								Properties: &armcompute.VirtualMachineScaleSetUpdateNetworkConfigurationProperties{
									DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
									DNSSettings: &armcompute.VirtualMachineScaleSetNetworkConfigurationDNSSettings{
										DNSServers: []*string{},
									},
									EnableAcceleratedNetworking: to.Ptr(true),
									EnableFpga:                  to.Ptr(true),
									EnableIPForwarding:          to.Ptr(true),
									IPConfigurations: []*armcompute.VirtualMachineScaleSetUpdateIPConfiguration{
										{
											ID:   to.Ptr("aaaaaaaaaaaaaaaa"),
											Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
											Properties: &armcompute.VirtualMachineScaleSetUpdateIPConfigurationProperties{
												ApplicationGatewayBackendAddressPools: []*armcompute.SubResource{
													{
														ID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
													}},
												ApplicationSecurityGroups: []*armcompute.SubResource{
													{
														ID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
													}},
												LoadBalancerBackendAddressPools: []*armcompute.SubResource{
													{
														ID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
													}},
												LoadBalancerInboundNatPools: []*armcompute.SubResource{
													{
														ID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
													}},
												Primary:                 to.Ptr(true),
												PrivateIPAddressVersion: to.Ptr(armcompute.IPVersionIPv4),
												PublicIPAddressConfiguration: &armcompute.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration{
													Name: to.Ptr("a"),
													Properties: &armcompute.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties{
														DeleteOption: to.Ptr(armcompute.DeleteOptionsDelete),
														DNSSettings: &armcompute.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings{
															DomainNameLabel: to.Ptr("aaaaaaaaaaaaaaaaaa"),
														},
														IdleTimeoutInMinutes: to.Ptr[int32](3),
													},
												},
												Subnet: &armcompute.APIEntityReference{
													ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123"),
												},
											},
										}},
									NetworkSecurityGroup: &armcompute.SubResource{
										ID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
									},
									Primary: to.Ptr(true),
								},
							}},
					},
					OSProfile: &armcompute.VirtualMachineScaleSetUpdateOSProfile{
						CustomData: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"),
						LinuxConfiguration: &armcompute.LinuxConfiguration{
							DisablePasswordAuthentication: to.Ptr(true),
							PatchSettings: &armcompute.LinuxPatchSettings{
								AssessmentMode: to.Ptr(armcompute.LinuxPatchAssessmentModeImageDefault),
								PatchMode:      to.Ptr(armcompute.LinuxVMGuestPatchModeImageDefault),
							},
							ProvisionVMAgent: to.Ptr(true),
							SSH: &armcompute.SSHConfiguration{
								PublicKeys: []*armcompute.SSHPublicKey{
									{
										Path:    to.Ptr("/home/{your-username}/.ssh/authorized_keys"),
										KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1"),
									}},
							},
						},
						Secrets: []*armcompute.VaultSecretGroup{
							{
								SourceVault: &armcompute.SubResource{
									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"),
								},
								VaultCertificates: []*armcompute.VaultCertificate{
									{
										CertificateStore: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"),
										CertificateURL:   to.Ptr("aaaaaaa"),
									}},
							}},
						WindowsConfiguration: &armcompute.WindowsConfiguration{
							AdditionalUnattendContent: []*armcompute.AdditionalUnattendContent{
								{
									ComponentName: to.Ptr("Microsoft-Windows-Shell-Setup"),
									Content:       to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
									PassName:      to.Ptr("OobeSystem"),
									SettingName:   to.Ptr(armcompute.SettingNamesAutoLogon),
								}},
							EnableAutomaticUpdates: to.Ptr(true),
							PatchSettings: &armcompute.PatchSettings{
								AssessmentMode: to.Ptr(armcompute.WindowsPatchAssessmentModeImageDefault),
								AutomaticByPlatformSettings: &armcompute.WindowsVMGuestPatchAutomaticByPlatformSettings{
									RebootSetting: to.Ptr(armcompute.WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever),
								},
								EnableHotpatching: to.Ptr(true),
								PatchMode:         to.Ptr(armcompute.WindowsVMGuestPatchModeAutomaticByPlatform),
							},
							ProvisionVMAgent: to.Ptr(true),
							TimeZone:         to.Ptr("aaaaaaaaaaaaaaaa"),
							WinRM: &armcompute.WinRMConfiguration{
								Listeners: []*armcompute.WinRMListener{
									{
										CertificateURL: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"),
										Protocol:       to.Ptr(armcompute.ProtocolTypesHTTP),
									}},
							},
						},
					},
					ScheduledEventsProfile: &armcompute.ScheduledEventsProfile{
						TerminateNotificationProfile: &armcompute.TerminateNotificationProfile{
							Enable:           to.Ptr(true),
							NotBeforeTimeout: to.Ptr("PT10M"),
						},
					},
					SecurityProfile: &armcompute.SecurityProfile{
						EncryptionAtHost: to.Ptr(true),
						SecurityType:     to.Ptr(armcompute.SecurityTypesTrustedLaunch),
						UefiSettings: &armcompute.UefiSettings{
							SecureBootEnabled: to.Ptr(true),
							VTpmEnabled:       to.Ptr(true),
						},
					},
					StorageProfile: &armcompute.VirtualMachineScaleSetUpdateStorageProfile{
						DataDisks: []*armcompute.VirtualMachineScaleSetDataDisk{
							{
								Name:              to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"),
								Caching:           to.Ptr(armcompute.CachingTypesNone),
								CreateOption:      to.Ptr(armcompute.DiskCreateOptionTypesEmpty),
								DiskIOPSReadWrite: to.Ptr[int64](28),
								DiskMBpsReadWrite: to.Ptr[int64](15),
								DiskSizeGB:        to.Ptr[int32](1023),
								Lun:               to.Ptr[int32](26),
								ManagedDisk: &armcompute.VirtualMachineScaleSetManagedDiskParameters{
									DiskEncryptionSet: &armcompute.DiskEncryptionSetParameters{
										ID: to.Ptr("aaaaaaaaaaaa"),
									},
									StorageAccountType: to.Ptr(armcompute.StorageAccountTypesStandardLRS),
								},
								WriteAcceleratorEnabled: to.Ptr(true),
							}},
						ImageReference: &armcompute.ImageReference{
							ID:                   to.Ptr("aaaaaaaaaaaaaaaaaaa"),
							Offer:                to.Ptr("WindowsServer"),
							Publisher:            to.Ptr("MicrosoftWindowsServer"),
							SharedGalleryImageID: to.Ptr("aaaaaa"),
							SKU:                  to.Ptr("2016-Datacenter"),
							Version:              to.Ptr("latest"),
						},
						OSDisk: &armcompute.VirtualMachineScaleSetUpdateOSDisk{
							Caching:    to.Ptr(armcompute.CachingTypesReadWrite),
							DiskSizeGB: to.Ptr[int32](6),
							Image: &armcompute.VirtualHardDisk{
								URI: to.Ptr("http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd"),
							},
							ManagedDisk: &armcompute.VirtualMachineScaleSetManagedDiskParameters{
								DiskEncryptionSet: &armcompute.DiskEncryptionSetParameters{
									ID: to.Ptr("aaaaaaaaaaaa"),
								},
								StorageAccountType: to.Ptr(armcompute.StorageAccountTypesStandardLRS),
							},
							VhdContainers: []*string{
								to.Ptr("aa")},
							WriteAcceleratorEnabled: to.Ptr(true),
						},
					},
					UserData: to.Ptr("aaaaaaaaaaaaa"),
				},
			},
			SKU: &armcompute.SKU{
				Name:     to.Ptr("DSv3-Type1"),
				Capacity: to.Ptr[int64](7),
				Tier:     to.Ptr("aaa"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetsClient) BeginUpdateInstances

BeginUpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set. options - VirtualMachineScaleSetsClientBeginUpdateInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdateInstances method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_UpdateInstances_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdateInstances(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaa",
		armcompute.VirtualMachineScaleSetVMInstanceRequiredIDs{
			InstanceIDs: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")},
		},
		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)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup

ConvertToSinglePlacementGroup - Converts SinglePlacementGroup property to false for a existing virtual machine scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the virtual machine scale set to create or update. parameters - The input object for ConvertToSinglePlacementGroup API. options - VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.ConvertToSinglePlacementGroup(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		armcompute.VMScaleSetConvertToSinglePlacementGroupInput{
			ActivePlacementGroupID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk

ForceRecoveryServiceFabricPlatformUpdateDomainWalk - Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. platformUpdateDomain - The platform update domain for which a manual recovery walk is requested options - VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaa",
		30,
		&armcompute.VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions{Zone: nil,
			PlacementGroupID: nil,
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetsClient) Get

Get - Display information about a virtual machine scale set. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myVirtualMachineScaleSet",
		&armcompute.VirtualMachineScaleSetsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetsClient) GetInstanceView

GetInstanceView - Gets the status of a VM scale set instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetInstanceView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_GetInstanceView_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetInstanceView(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaa",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachineScaleSetsClient) NewGetOSUpgradeHistoryPager added in v0.7.0

NewGetOSUpgradeHistoryPager - Gets list of OS upgrades on a VM scale set instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetOSUpgradeHistory method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_GetOSUpgradeHistory_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewGetOSUpgradeHistoryPager("rgcompute",
		"aaaaaa",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachineScaleSetsClient) NewListAllPager added in v0.7.0

NewListAllPager - Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - VirtualMachineScaleSetsClientListAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ListAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_ListAll_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAllPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachineScaleSetsClient) NewListByLocationPager added in v0.7.0

NewListByLocationPager - Gets all the VM scale sets under the specified subscription for the specified location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location for which VM scale sets under the subscription are queried. options - VirtualMachineScaleSetsClientListByLocationOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ListByLocation method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_ListBySubscription_ByLocation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByLocationPager("eastus",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachineScaleSetsClient) NewListPager added in v0.7.0

NewListPager - Gets a list of all VM scale sets under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - VirtualMachineScaleSetsClientListOptions contains the optional parameters for the VirtualMachineScaleSetsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineScaleSetsClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rgcompute",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachineScaleSetsClient) NewListSKUsPager added in v0.7.0

NewListSKUsPager - Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmScaleSetName - The name of the VM scale set. options - VirtualMachineScaleSetsClientListSKUsOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ListSKUs method.

type VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginCreateOrUpdate method.

type VirtualMachineScaleSetsClientBeginDeallocateOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginDeallocateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeallocate method.

type VirtualMachineScaleSetsClientBeginDeleteInstancesOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginDeleteInstancesOptions struct {
	// Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
	ForceDeletion *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetsClientBeginDeleteInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeleteInstances method.

type VirtualMachineScaleSetsClientBeginDeleteOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginDeleteOptions struct {
	// Optional parameter to force delete a VM scale set. (Feature in Preview)
	ForceDeletion *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDelete method.

type VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPerformMaintenance method.

type VirtualMachineScaleSetsClientBeginPowerOffOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginPowerOffOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false
	// indicates otherwise. Default value for this flag is false if not specified
	SkipShutdown *bool
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPowerOff method.

type VirtualMachineScaleSetsClientBeginRedeployOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginRedeployOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRedeploy method.

type VirtualMachineScaleSetsClientBeginReimageAllOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginReimageAllOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimageAll method.

type VirtualMachineScaleSetsClientBeginReimageOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginReimageOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// Parameters for Reimaging VM ScaleSet.
	VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters
}

VirtualMachineScaleSetsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimage method.

type VirtualMachineScaleSetsClientBeginRestartOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRestart method.

type VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState method.

type VirtualMachineScaleSetsClientBeginStartOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// A list of virtual machine instance IDs from the VM scale set.
	VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
}

VirtualMachineScaleSetsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginStart method.

type VirtualMachineScaleSetsClientBeginUpdateInstancesOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginUpdateInstancesOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetsClientBeginUpdateInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdateInstances method.

type VirtualMachineScaleSetsClientBeginUpdateOptions added in v0.3.0

type VirtualMachineScaleSetsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineScaleSetsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdate method.

type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions added in v0.3.0

type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions struct {
}

VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup method.

type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse added in v0.3.0

type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse struct {
}

VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse contains the response from method VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup.

type VirtualMachineScaleSetsClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachineScaleSetsClientCreateOrUpdateResponse struct {
	VirtualMachineScaleSet
}

VirtualMachineScaleSetsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetsClient.CreateOrUpdate.

type VirtualMachineScaleSetsClientDeallocateResponse added in v0.3.0

type VirtualMachineScaleSetsClientDeallocateResponse struct {
}

VirtualMachineScaleSetsClientDeallocateResponse contains the response from method VirtualMachineScaleSetsClient.Deallocate.

type VirtualMachineScaleSetsClientDeleteInstancesResponse added in v0.3.0

type VirtualMachineScaleSetsClientDeleteInstancesResponse struct {
}

VirtualMachineScaleSetsClientDeleteInstancesResponse contains the response from method VirtualMachineScaleSetsClient.DeleteInstances.

type VirtualMachineScaleSetsClientDeleteResponse added in v0.3.0

type VirtualMachineScaleSetsClientDeleteResponse struct {
}

VirtualMachineScaleSetsClientDeleteResponse contains the response from method VirtualMachineScaleSetsClient.Delete.

type VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions added in v0.3.0

type VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions struct {
	// The placement group id for which the manual recovery walk is requested.
	PlacementGroupID *string
	// The zone in which the manual recovery walk is requested for cross zone virtual machine scale set
	Zone *string
}

VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk method.

type VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse added in v0.3.0

type VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse struct {
	RecoveryWalkResponse
}

VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse contains the response from method VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk.

type VirtualMachineScaleSetsClientGetInstanceViewOptions added in v0.3.0

type VirtualMachineScaleSetsClientGetInstanceViewOptions struct {
}

VirtualMachineScaleSetsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetInstanceView method.

type VirtualMachineScaleSetsClientGetInstanceViewResponse added in v0.3.0

type VirtualMachineScaleSetsClientGetInstanceViewResponse struct {
	VirtualMachineScaleSetInstanceView
}

VirtualMachineScaleSetsClientGetInstanceViewResponse contains the response from method VirtualMachineScaleSetsClient.GetInstanceView.

type VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions added in v0.3.0

type VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions struct {
}

VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetOSUpgradeHistory method.

type VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse added in v0.3.0

type VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse struct {
	VirtualMachineScaleSetListOSUpgradeHistory
}

VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse contains the response from method VirtualMachineScaleSetsClient.GetOSUpgradeHistory.

type VirtualMachineScaleSetsClientGetOptions added in v0.3.0

type VirtualMachineScaleSetsClientGetOptions struct {
	// The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was
	// provided by the user during the VM scale set Create/Update operation
	Expand *ExpandTypesForGetVMScaleSets
}

VirtualMachineScaleSetsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetsClient.Get method.

type VirtualMachineScaleSetsClientGetResponse added in v0.3.0

type VirtualMachineScaleSetsClientGetResponse struct {
	VirtualMachineScaleSet
}

VirtualMachineScaleSetsClientGetResponse contains the response from method VirtualMachineScaleSetsClient.Get.

type VirtualMachineScaleSetsClientListAllOptions added in v0.3.0

type VirtualMachineScaleSetsClientListAllOptions struct {
}

VirtualMachineScaleSetsClientListAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ListAll method.

type VirtualMachineScaleSetsClientListAllResponse added in v0.3.0

type VirtualMachineScaleSetsClientListAllResponse struct {
	VirtualMachineScaleSetListWithLinkResult
}

VirtualMachineScaleSetsClientListAllResponse contains the response from method VirtualMachineScaleSetsClient.ListAll.

type VirtualMachineScaleSetsClientListByLocationOptions added in v0.3.0

type VirtualMachineScaleSetsClientListByLocationOptions struct {
}

VirtualMachineScaleSetsClientListByLocationOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ListByLocation method.

type VirtualMachineScaleSetsClientListByLocationResponse added in v0.3.0

type VirtualMachineScaleSetsClientListByLocationResponse struct {
	VirtualMachineScaleSetListResult
}

VirtualMachineScaleSetsClientListByLocationResponse contains the response from method VirtualMachineScaleSetsClient.ListByLocation.

type VirtualMachineScaleSetsClientListOptions added in v0.3.0

type VirtualMachineScaleSetsClientListOptions struct {
}

VirtualMachineScaleSetsClientListOptions contains the optional parameters for the VirtualMachineScaleSetsClient.List method.

type VirtualMachineScaleSetsClientListResponse added in v0.3.0

type VirtualMachineScaleSetsClientListResponse struct {
	VirtualMachineScaleSetListResult
}

VirtualMachineScaleSetsClientListResponse contains the response from method VirtualMachineScaleSetsClient.List.

type VirtualMachineScaleSetsClientListSKUsOptions added in v0.3.0

type VirtualMachineScaleSetsClientListSKUsOptions struct {
}

VirtualMachineScaleSetsClientListSKUsOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ListSKUs method.

type VirtualMachineScaleSetsClientListSKUsResponse added in v0.3.0

type VirtualMachineScaleSetsClientListSKUsResponse struct {
	VirtualMachineScaleSetListSKUsResult
}

VirtualMachineScaleSetsClientListSKUsResponse contains the response from method VirtualMachineScaleSetsClient.ListSKUs.

type VirtualMachineScaleSetsClientPerformMaintenanceResponse added in v0.3.0

type VirtualMachineScaleSetsClientPerformMaintenanceResponse struct {
}

VirtualMachineScaleSetsClientPerformMaintenanceResponse contains the response from method VirtualMachineScaleSetsClient.PerformMaintenance.

type VirtualMachineScaleSetsClientPowerOffResponse added in v0.3.0

type VirtualMachineScaleSetsClientPowerOffResponse struct {
}

VirtualMachineScaleSetsClientPowerOffResponse contains the response from method VirtualMachineScaleSetsClient.PowerOff.

type VirtualMachineScaleSetsClientRedeployResponse added in v0.3.0

type VirtualMachineScaleSetsClientRedeployResponse struct {
}

VirtualMachineScaleSetsClientRedeployResponse contains the response from method VirtualMachineScaleSetsClient.Redeploy.

type VirtualMachineScaleSetsClientReimageAllResponse added in v0.3.0

type VirtualMachineScaleSetsClientReimageAllResponse struct {
}

VirtualMachineScaleSetsClientReimageAllResponse contains the response from method VirtualMachineScaleSetsClient.ReimageAll.

type VirtualMachineScaleSetsClientReimageResponse added in v0.3.0

type VirtualMachineScaleSetsClientReimageResponse struct {
}

VirtualMachineScaleSetsClientReimageResponse contains the response from method VirtualMachineScaleSetsClient.Reimage.

type VirtualMachineScaleSetsClientRestartResponse added in v0.3.0

type VirtualMachineScaleSetsClientRestartResponse struct {
}

VirtualMachineScaleSetsClientRestartResponse contains the response from method VirtualMachineScaleSetsClient.Restart.

type VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse added in v0.3.0

type VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse struct {
}

VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse contains the response from method VirtualMachineScaleSetsClient.SetOrchestrationServiceState.

type VirtualMachineScaleSetsClientStartResponse added in v0.3.0

type VirtualMachineScaleSetsClientStartResponse struct {
}

VirtualMachineScaleSetsClientStartResponse contains the response from method VirtualMachineScaleSetsClient.Start.

type VirtualMachineScaleSetsClientUpdateInstancesResponse added in v0.3.0

type VirtualMachineScaleSetsClientUpdateInstancesResponse struct {
}

VirtualMachineScaleSetsClientUpdateInstancesResponse contains the response from method VirtualMachineScaleSetsClient.UpdateInstances.

type VirtualMachineScaleSetsClientUpdateResponse added in v0.3.0

type VirtualMachineScaleSetsClientUpdateResponse struct {
	VirtualMachineScaleSet
}

VirtualMachineScaleSetsClientUpdateResponse contains the response from method VirtualMachineScaleSetsClient.Update.

type VirtualMachineSize

type VirtualMachineSize struct {
	// The maximum number of data disks that can be attached to the virtual machine size.
	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`

	// The amount of memory, in MB, supported by the virtual machine size.
	MemoryInMB *int32 `json:"memoryInMB,omitempty"`

	// The name of the virtual machine size.
	Name *string `json:"name,omitempty"`

	// The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents
	// the total vCPUs of quota that the VM uses. For accurate vCPU count, please
	// refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list
	NumberOfCores *int32 `json:"numberOfCores,omitempty"`

	// The OS disk size, in MB, allowed by the virtual machine size.
	OSDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`

	// The resource disk size, in MB, allowed by the virtual machine size.
	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
}

VirtualMachineSize - Describes the properties of a VM size.

type VirtualMachineSizeListResult

type VirtualMachineSizeListResult struct {
	// The list of virtual machine sizes.
	Value []*VirtualMachineSize `json:"value,omitempty"`
}

VirtualMachineSizeListResult - The List Virtual Machine operation response.

type VirtualMachineSizeTypes

type VirtualMachineSizeTypes string

VirtualMachineSizeTypes - Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. Recommended way to get the list of available sizes is using these APIs: List all available virtual machine sizes in an availability set [https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes] List all available virtual machine sizes in a region [https://docs.microsoft.com/rest/api/compute/resourceskus/list] List all available virtual machine sizes for resizing [https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes]. For more information about virtual machine sizes, see Sizes for virtual machines [https://docs.microsoft.com/azure/virtual-machines/sizes]. The available VM sizes depend on region and availability set.

const (
	VirtualMachineSizeTypesBasicA0          VirtualMachineSizeTypes = "Basic_A0"
	VirtualMachineSizeTypesBasicA1          VirtualMachineSizeTypes = "Basic_A1"
	VirtualMachineSizeTypesBasicA2          VirtualMachineSizeTypes = "Basic_A2"
	VirtualMachineSizeTypesBasicA3          VirtualMachineSizeTypes = "Basic_A3"
	VirtualMachineSizeTypesBasicA4          VirtualMachineSizeTypes = "Basic_A4"
	VirtualMachineSizeTypesStandardA0       VirtualMachineSizeTypes = "Standard_A0"
	VirtualMachineSizeTypesStandardA1       VirtualMachineSizeTypes = "Standard_A1"
	VirtualMachineSizeTypesStandardA10      VirtualMachineSizeTypes = "Standard_A10"
	VirtualMachineSizeTypesStandardA11      VirtualMachineSizeTypes = "Standard_A11"
	VirtualMachineSizeTypesStandardA1V2     VirtualMachineSizeTypes = "Standard_A1_v2"
	VirtualMachineSizeTypesStandardA2       VirtualMachineSizeTypes = "Standard_A2"
	VirtualMachineSizeTypesStandardA2MV2    VirtualMachineSizeTypes = "Standard_A2m_v2"
	VirtualMachineSizeTypesStandardA2V2     VirtualMachineSizeTypes = "Standard_A2_v2"
	VirtualMachineSizeTypesStandardA3       VirtualMachineSizeTypes = "Standard_A3"
	VirtualMachineSizeTypesStandardA4       VirtualMachineSizeTypes = "Standard_A4"
	VirtualMachineSizeTypesStandardA4MV2    VirtualMachineSizeTypes = "Standard_A4m_v2"
	VirtualMachineSizeTypesStandardA4V2     VirtualMachineSizeTypes = "Standard_A4_v2"
	VirtualMachineSizeTypesStandardA5       VirtualMachineSizeTypes = "Standard_A5"
	VirtualMachineSizeTypesStandardA6       VirtualMachineSizeTypes = "Standard_A6"
	VirtualMachineSizeTypesStandardA7       VirtualMachineSizeTypes = "Standard_A7"
	VirtualMachineSizeTypesStandardA8       VirtualMachineSizeTypes = "Standard_A8"
	VirtualMachineSizeTypesStandardA8MV2    VirtualMachineSizeTypes = "Standard_A8m_v2"
	VirtualMachineSizeTypesStandardA8V2     VirtualMachineSizeTypes = "Standard_A8_v2"
	VirtualMachineSizeTypesStandardA9       VirtualMachineSizeTypes = "Standard_A9"
	VirtualMachineSizeTypesStandardB1Ms     VirtualMachineSizeTypes = "Standard_B1ms"
	VirtualMachineSizeTypesStandardB1S      VirtualMachineSizeTypes = "Standard_B1s"
	VirtualMachineSizeTypesStandardB2Ms     VirtualMachineSizeTypes = "Standard_B2ms"
	VirtualMachineSizeTypesStandardB2S      VirtualMachineSizeTypes = "Standard_B2s"
	VirtualMachineSizeTypesStandardB4Ms     VirtualMachineSizeTypes = "Standard_B4ms"
	VirtualMachineSizeTypesStandardB8Ms     VirtualMachineSizeTypes = "Standard_B8ms"
	VirtualMachineSizeTypesStandardD1       VirtualMachineSizeTypes = "Standard_D1"
	VirtualMachineSizeTypesStandardD11      VirtualMachineSizeTypes = "Standard_D11"
	VirtualMachineSizeTypesStandardD11V2    VirtualMachineSizeTypes = "Standard_D11_v2"
	VirtualMachineSizeTypesStandardD12      VirtualMachineSizeTypes = "Standard_D12"
	VirtualMachineSizeTypesStandardD12V2    VirtualMachineSizeTypes = "Standard_D12_v2"
	VirtualMachineSizeTypesStandardD13      VirtualMachineSizeTypes = "Standard_D13"
	VirtualMachineSizeTypesStandardD13V2    VirtualMachineSizeTypes = "Standard_D13_v2"
	VirtualMachineSizeTypesStandardD14      VirtualMachineSizeTypes = "Standard_D14"
	VirtualMachineSizeTypesStandardD14V2    VirtualMachineSizeTypes = "Standard_D14_v2"
	VirtualMachineSizeTypesStandardD15V2    VirtualMachineSizeTypes = "Standard_D15_v2"
	VirtualMachineSizeTypesStandardD16SV3   VirtualMachineSizeTypes = "Standard_D16s_v3"
	VirtualMachineSizeTypesStandardD16V3    VirtualMachineSizeTypes = "Standard_D16_v3"
	VirtualMachineSizeTypesStandardD1V2     VirtualMachineSizeTypes = "Standard_D1_v2"
	VirtualMachineSizeTypesStandardD2       VirtualMachineSizeTypes = "Standard_D2"
	VirtualMachineSizeTypesStandardD2SV3    VirtualMachineSizeTypes = "Standard_D2s_v3"
	VirtualMachineSizeTypesStandardD2V2     VirtualMachineSizeTypes = "Standard_D2_v2"
	VirtualMachineSizeTypesStandardD2V3     VirtualMachineSizeTypes = "Standard_D2_v3"
	VirtualMachineSizeTypesStandardD3       VirtualMachineSizeTypes = "Standard_D3"
	VirtualMachineSizeTypesStandardD32SV3   VirtualMachineSizeTypes = "Standard_D32s_v3"
	VirtualMachineSizeTypesStandardD32V3    VirtualMachineSizeTypes = "Standard_D32_v3"
	VirtualMachineSizeTypesStandardD3V2     VirtualMachineSizeTypes = "Standard_D3_v2"
	VirtualMachineSizeTypesStandardD4       VirtualMachineSizeTypes = "Standard_D4"
	VirtualMachineSizeTypesStandardD4SV3    VirtualMachineSizeTypes = "Standard_D4s_v3"
	VirtualMachineSizeTypesStandardD4V2     VirtualMachineSizeTypes = "Standard_D4_v2"
	VirtualMachineSizeTypesStandardD4V3     VirtualMachineSizeTypes = "Standard_D4_v3"
	VirtualMachineSizeTypesStandardD5V2     VirtualMachineSizeTypes = "Standard_D5_v2"
	VirtualMachineSizeTypesStandardD64SV3   VirtualMachineSizeTypes = "Standard_D64s_v3"
	VirtualMachineSizeTypesStandardD64V3    VirtualMachineSizeTypes = "Standard_D64_v3"
	VirtualMachineSizeTypesStandardD8SV3    VirtualMachineSizeTypes = "Standard_D8s_v3"
	VirtualMachineSizeTypesStandardD8V3     VirtualMachineSizeTypes = "Standard_D8_v3"
	VirtualMachineSizeTypesStandardDS1      VirtualMachineSizeTypes = "Standard_DS1"
	VirtualMachineSizeTypesStandardDS11     VirtualMachineSizeTypes = "Standard_DS11"
	VirtualMachineSizeTypesStandardDS11V2   VirtualMachineSizeTypes = "Standard_DS11_v2"
	VirtualMachineSizeTypesStandardDS12     VirtualMachineSizeTypes = "Standard_DS12"
	VirtualMachineSizeTypesStandardDS12V2   VirtualMachineSizeTypes = "Standard_DS12_v2"
	VirtualMachineSizeTypesStandardDS13     VirtualMachineSizeTypes = "Standard_DS13"
	VirtualMachineSizeTypesStandardDS132V2  VirtualMachineSizeTypes = "Standard_DS13-2_v2"
	VirtualMachineSizeTypesStandardDS134V2  VirtualMachineSizeTypes = "Standard_DS13-4_v2"
	VirtualMachineSizeTypesStandardDS13V2   VirtualMachineSizeTypes = "Standard_DS13_v2"
	VirtualMachineSizeTypesStandardDS14     VirtualMachineSizeTypes = "Standard_DS14"
	VirtualMachineSizeTypesStandardDS144V2  VirtualMachineSizeTypes = "Standard_DS14-4_v2"
	VirtualMachineSizeTypesStandardDS148V2  VirtualMachineSizeTypes = "Standard_DS14-8_v2"
	VirtualMachineSizeTypesStandardDS14V2   VirtualMachineSizeTypes = "Standard_DS14_v2"
	VirtualMachineSizeTypesStandardDS15V2   VirtualMachineSizeTypes = "Standard_DS15_v2"
	VirtualMachineSizeTypesStandardDS1V2    VirtualMachineSizeTypes = "Standard_DS1_v2"
	VirtualMachineSizeTypesStandardDS2      VirtualMachineSizeTypes = "Standard_DS2"
	VirtualMachineSizeTypesStandardDS2V2    VirtualMachineSizeTypes = "Standard_DS2_v2"
	VirtualMachineSizeTypesStandardDS3      VirtualMachineSizeTypes = "Standard_DS3"
	VirtualMachineSizeTypesStandardDS3V2    VirtualMachineSizeTypes = "Standard_DS3_v2"
	VirtualMachineSizeTypesStandardDS4      VirtualMachineSizeTypes = "Standard_DS4"
	VirtualMachineSizeTypesStandardDS4V2    VirtualMachineSizeTypes = "Standard_DS4_v2"
	VirtualMachineSizeTypesStandardDS5V2    VirtualMachineSizeTypes = "Standard_DS5_v2"
	VirtualMachineSizeTypesStandardE16SV3   VirtualMachineSizeTypes = "Standard_E16s_v3"
	VirtualMachineSizeTypesStandardE16V3    VirtualMachineSizeTypes = "Standard_E16_v3"
	VirtualMachineSizeTypesStandardE2SV3    VirtualMachineSizeTypes = "Standard_E2s_v3"
	VirtualMachineSizeTypesStandardE2V3     VirtualMachineSizeTypes = "Standard_E2_v3"
	VirtualMachineSizeTypesStandardE3216V3  VirtualMachineSizeTypes = "Standard_E32-16_v3"
	VirtualMachineSizeTypesStandardE328SV3  VirtualMachineSizeTypes = "Standard_E32-8s_v3"
	VirtualMachineSizeTypesStandardE32SV3   VirtualMachineSizeTypes = "Standard_E32s_v3"
	VirtualMachineSizeTypesStandardE32V3    VirtualMachineSizeTypes = "Standard_E32_v3"
	VirtualMachineSizeTypesStandardE4SV3    VirtualMachineSizeTypes = "Standard_E4s_v3"
	VirtualMachineSizeTypesStandardE4V3     VirtualMachineSizeTypes = "Standard_E4_v3"
	VirtualMachineSizeTypesStandardE6416SV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
	VirtualMachineSizeTypesStandardE6432SV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
	VirtualMachineSizeTypesStandardE64SV3   VirtualMachineSizeTypes = "Standard_E64s_v3"
	VirtualMachineSizeTypesStandardE64V3    VirtualMachineSizeTypes = "Standard_E64_v3"
	VirtualMachineSizeTypesStandardE8SV3    VirtualMachineSizeTypes = "Standard_E8s_v3"
	VirtualMachineSizeTypesStandardE8V3     VirtualMachineSizeTypes = "Standard_E8_v3"
	VirtualMachineSizeTypesStandardF1       VirtualMachineSizeTypes = "Standard_F1"
	VirtualMachineSizeTypesStandardF16      VirtualMachineSizeTypes = "Standard_F16"
	VirtualMachineSizeTypesStandardF16S     VirtualMachineSizeTypes = "Standard_F16s"
	VirtualMachineSizeTypesStandardF16SV2   VirtualMachineSizeTypes = "Standard_F16s_v2"
	VirtualMachineSizeTypesStandardF1S      VirtualMachineSizeTypes = "Standard_F1s"
	VirtualMachineSizeTypesStandardF2       VirtualMachineSizeTypes = "Standard_F2"
	VirtualMachineSizeTypesStandardF2S      VirtualMachineSizeTypes = "Standard_F2s"
	VirtualMachineSizeTypesStandardF2SV2    VirtualMachineSizeTypes = "Standard_F2s_v2"
	VirtualMachineSizeTypesStandardF32SV2   VirtualMachineSizeTypes = "Standard_F32s_v2"
	VirtualMachineSizeTypesStandardF4       VirtualMachineSizeTypes = "Standard_F4"
	VirtualMachineSizeTypesStandardF4S      VirtualMachineSizeTypes = "Standard_F4s"
	VirtualMachineSizeTypesStandardF4SV2    VirtualMachineSizeTypes = "Standard_F4s_v2"
	VirtualMachineSizeTypesStandardF64SV2   VirtualMachineSizeTypes = "Standard_F64s_v2"
	VirtualMachineSizeTypesStandardF72SV2   VirtualMachineSizeTypes = "Standard_F72s_v2"
	VirtualMachineSizeTypesStandardF8       VirtualMachineSizeTypes = "Standard_F8"
	VirtualMachineSizeTypesStandardF8S      VirtualMachineSizeTypes = "Standard_F8s"
	VirtualMachineSizeTypesStandardF8SV2    VirtualMachineSizeTypes = "Standard_F8s_v2"
	VirtualMachineSizeTypesStandardG1       VirtualMachineSizeTypes = "Standard_G1"
	VirtualMachineSizeTypesStandardG2       VirtualMachineSizeTypes = "Standard_G2"
	VirtualMachineSizeTypesStandardG3       VirtualMachineSizeTypes = "Standard_G3"
	VirtualMachineSizeTypesStandardG4       VirtualMachineSizeTypes = "Standard_G4"
	VirtualMachineSizeTypesStandardG5       VirtualMachineSizeTypes = "Standard_G5"
	VirtualMachineSizeTypesStandardGS1      VirtualMachineSizeTypes = "Standard_GS1"
	VirtualMachineSizeTypesStandardGS2      VirtualMachineSizeTypes = "Standard_GS2"
	VirtualMachineSizeTypesStandardGS3      VirtualMachineSizeTypes = "Standard_GS3"
	VirtualMachineSizeTypesStandardGS4      VirtualMachineSizeTypes = "Standard_GS4"
	VirtualMachineSizeTypesStandardGS44     VirtualMachineSizeTypes = "Standard_GS4-4"
	VirtualMachineSizeTypesStandardGS48     VirtualMachineSizeTypes = "Standard_GS4-8"
	VirtualMachineSizeTypesStandardGS5      VirtualMachineSizeTypes = "Standard_GS5"
	VirtualMachineSizeTypesStandardGS516    VirtualMachineSizeTypes = "Standard_GS5-16"
	VirtualMachineSizeTypesStandardGS58     VirtualMachineSizeTypes = "Standard_GS5-8"
	VirtualMachineSizeTypesStandardH16      VirtualMachineSizeTypes = "Standard_H16"
	VirtualMachineSizeTypesStandardH16M     VirtualMachineSizeTypes = "Standard_H16m"
	VirtualMachineSizeTypesStandardH16Mr    VirtualMachineSizeTypes = "Standard_H16mr"
	VirtualMachineSizeTypesStandardH16R     VirtualMachineSizeTypes = "Standard_H16r"
	VirtualMachineSizeTypesStandardH8       VirtualMachineSizeTypes = "Standard_H8"
	VirtualMachineSizeTypesStandardH8M      VirtualMachineSizeTypes = "Standard_H8m"
	VirtualMachineSizeTypesStandardL16S     VirtualMachineSizeTypes = "Standard_L16s"
	VirtualMachineSizeTypesStandardL32S     VirtualMachineSizeTypes = "Standard_L32s"
	VirtualMachineSizeTypesStandardL4S      VirtualMachineSizeTypes = "Standard_L4s"
	VirtualMachineSizeTypesStandardL8S      VirtualMachineSizeTypes = "Standard_L8s"
	VirtualMachineSizeTypesStandardM12832Ms VirtualMachineSizeTypes = "Standard_M128-32ms"
	VirtualMachineSizeTypesStandardM12864Ms VirtualMachineSizeTypes = "Standard_M128-64ms"
	VirtualMachineSizeTypesStandardM128Ms   VirtualMachineSizeTypes = "Standard_M128ms"
	VirtualMachineSizeTypesStandardM128S    VirtualMachineSizeTypes = "Standard_M128s"
	VirtualMachineSizeTypesStandardM6416Ms  VirtualMachineSizeTypes = "Standard_M64-16ms"
	VirtualMachineSizeTypesStandardM6432Ms  VirtualMachineSizeTypes = "Standard_M64-32ms"
	VirtualMachineSizeTypesStandardM64Ms    VirtualMachineSizeTypes = "Standard_M64ms"
	VirtualMachineSizeTypesStandardM64S     VirtualMachineSizeTypes = "Standard_M64s"
	VirtualMachineSizeTypesStandardNC12     VirtualMachineSizeTypes = "Standard_NC12"
	VirtualMachineSizeTypesStandardNC12SV2  VirtualMachineSizeTypes = "Standard_NC12s_v2"
	VirtualMachineSizeTypesStandardNC12SV3  VirtualMachineSizeTypes = "Standard_NC12s_v3"
	VirtualMachineSizeTypesStandardNC24     VirtualMachineSizeTypes = "Standard_NC24"
	VirtualMachineSizeTypesStandardNC24R    VirtualMachineSizeTypes = "Standard_NC24r"
	VirtualMachineSizeTypesStandardNC24RsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
	VirtualMachineSizeTypesStandardNC24RsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
	VirtualMachineSizeTypesStandardNC24SV2  VirtualMachineSizeTypes = "Standard_NC24s_v2"
	VirtualMachineSizeTypesStandardNC24SV3  VirtualMachineSizeTypes = "Standard_NC24s_v3"
	VirtualMachineSizeTypesStandardNC6      VirtualMachineSizeTypes = "Standard_NC6"
	VirtualMachineSizeTypesStandardNC6SV2   VirtualMachineSizeTypes = "Standard_NC6s_v2"
	VirtualMachineSizeTypesStandardNC6SV3   VirtualMachineSizeTypes = "Standard_NC6s_v3"
	VirtualMachineSizeTypesStandardND12S    VirtualMachineSizeTypes = "Standard_ND12s"
	VirtualMachineSizeTypesStandardND24Rs   VirtualMachineSizeTypes = "Standard_ND24rs"
	VirtualMachineSizeTypesStandardND24S    VirtualMachineSizeTypes = "Standard_ND24s"
	VirtualMachineSizeTypesStandardND6S     VirtualMachineSizeTypes = "Standard_ND6s"
	VirtualMachineSizeTypesStandardNV12     VirtualMachineSizeTypes = "Standard_NV12"
	VirtualMachineSizeTypesStandardNV24     VirtualMachineSizeTypes = "Standard_NV24"
	VirtualMachineSizeTypesStandardNV6      VirtualMachineSizeTypes = "Standard_NV6"
)

func PossibleVirtualMachineSizeTypesValues

func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes

PossibleVirtualMachineSizeTypesValues returns the possible values for the VirtualMachineSizeTypes const type.

type VirtualMachineSizesClient

type VirtualMachineSizesClient struct {
	// contains filtered or unexported fields
}

VirtualMachineSizesClient contains the methods for the VirtualMachineSizes group. Don't use this type directly, use NewVirtualMachineSizesClient() instead.

func NewVirtualMachineSizesClient

func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineSizesClient, error)

NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachineSizesClient) NewListPager added in v0.7.0

NewListPager - This API is deprecated. Use Resources Skus [https://docs.microsoft.com/rest/api/compute/resourceskus/list] If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location upon which virtual-machine-sizes is queried. options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/computeRPCommonExamples/VirtualMachineSizes_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachineSizesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("-e",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type VirtualMachineSizesClientListOptions added in v0.3.0

type VirtualMachineSizesClientListOptions struct {
}

VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List method.

type VirtualMachineSizesClientListResponse added in v0.3.0

type VirtualMachineSizesClientListResponse struct {
	VirtualMachineSizeListResult
}

VirtualMachineSizesClientListResponse contains the response from method VirtualMachineSizesClient.List.

type VirtualMachineSoftwarePatchProperties

type VirtualMachineSoftwarePatchProperties struct {
	// READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
	// logs.
	ActivityID *string `json:"activityId,omitempty" azure:"ro"`

	// READ-ONLY; Describes the availability of a given patch.
	AssessmentState *PatchAssessmentState `json:"assessmentState,omitempty" azure:"ro"`

	// READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
	Classifications []*string `json:"classifications,omitempty" azure:"ro"`

	// READ-ONLY; The KBID of the patch. Only applies to Windows patches.
	KbID *string `json:"kbId,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp of the last update to this patch record.
	LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" azure:"ro"`

	// READ-ONLY; The friendly name of the patch.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; A unique identifier for the patch.
	PatchID *string `json:"patchId,omitempty" azure:"ro"`

	// READ-ONLY; The UTC timestamp when the repository published this patch.
	PublishedDate *time.Time `json:"publishedDate,omitempty" azure:"ro"`

	// READ-ONLY; Describes the reboot requirements of the patch.
	RebootBehavior *VMGuestPatchRebootBehavior `json:"rebootBehavior,omitempty" azure:"ro"`

	// READ-ONLY; The version number of the patch. This property applies only to Linux patches.
	Version *string `json:"version,omitempty" azure:"ro"`
}

VirtualMachineSoftwarePatchProperties - Describes the properties of a Virtual Machine software patch.

func (*VirtualMachineSoftwarePatchProperties) UnmarshalJSON

func (v *VirtualMachineSoftwarePatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSoftwarePatchProperties.

type VirtualMachineStatusCodeCount

type VirtualMachineStatusCodeCount struct {
	// READ-ONLY; The instance view status code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The number of instances having a particular status code.
	Count *int32 `json:"count,omitempty" azure:"ro"`
}

VirtualMachineStatusCodeCount - The status code and count of the virtual machine scale set instance view status summary.

type VirtualMachineUpdate

type VirtualMachineUpdate struct {
	// The identity of the virtual machine, if configured.
	Identity *VirtualMachineIdentity `json:"identity,omitempty"`

	// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
	// images. Before you can use a marketplace image from an API, you must
	// enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
	// Want to deploy programmatically, Get Started ->. Enter any required
	// information and then click Save.
	Plan *Plan `json:"plan,omitempty"`

	// Describes the properties of a Virtual Machine.
	Properties *VirtualMachineProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// The virtual machine zones.
	Zones []*string `json:"zones,omitempty"`
}

VirtualMachineUpdate - Describes a Virtual Machine Update.

func (VirtualMachineUpdate) MarshalJSON

func (v VirtualMachineUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdate.

type VirtualMachinesClient

type VirtualMachinesClient struct {
	// contains filtered or unexported fields
}

VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.

func NewVirtualMachinesClient

func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)

NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualMachinesClient) BeginAssessPatches

BeginAssessPatches - Assess patches on the VM. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_AssessPatches.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginAssessPatches(ctx,
		"myResourceGroupName",
		"myVMName",
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) BeginCapture

BeginCapture - Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. parameters - Parameters supplied to the Capture Virtual Machine operation. options - VirtualMachinesClientBeginCaptureOptions contains the optional parameters for the VirtualMachinesClient.BeginCapture method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_Capture_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCapture(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		armcompute.VirtualMachineCaptureParameters{
			DestinationContainerName: to.Ptr("aaaaaaa"),
			OverwriteVhds:            to.Ptr(true),
			VhdPrefix:                to.Ptr("aaaaaaaaa"),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) BeginConvertToManagedDisks

BeginConvertToManagedDisks - Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginConvertToManagedDisks method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_ConvertToManagedDisks_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginConvertToManagedDisks(ctx,
		"rgcompute",
		"aaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachinesClient) BeginCreateOrUpdate

BeginCreateOrUpdate - The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. parameters - Parameters supplied to the Create Virtual Machine operation. options - VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingAssessmentModeOfImageDefault.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"myResourceGroup",
		"myVM",
		armcompute.VirtualMachine{
			Location: to.Ptr("westus"),
			Properties: &armcompute.VirtualMachineProperties{
				HardwareProfile: &armcompute.HardwareProfile{
					VMSize: to.Ptr(armcompute.VirtualMachineSizeTypesStandardD2SV3),
				},
				NetworkProfile: &armcompute.NetworkProfile{
					NetworkInterfaces: []*armcompute.NetworkInterfaceReference{
						{
							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}"),
							Properties: &armcompute.NetworkInterfaceReferenceProperties{
								Primary: to.Ptr(true),
							},
						}},
				},
				OSProfile: &armcompute.OSProfile{
					AdminPassword: to.Ptr("{your-password}"),
					AdminUsername: to.Ptr("{your-username}"),
					ComputerName:  to.Ptr("myVM"),
					LinuxConfiguration: &armcompute.LinuxConfiguration{
						PatchSettings: &armcompute.LinuxPatchSettings{
							AssessmentMode: to.Ptr(armcompute.LinuxPatchAssessmentModeImageDefault),
						},
						ProvisionVMAgent: to.Ptr(true),
					},
				},
				StorageProfile: &armcompute.StorageProfile{
					ImageReference: &armcompute.ImageReference{
						Offer:     to.Ptr("UbuntuServer"),
						Publisher: to.Ptr("Canonical"),
						SKU:       to.Ptr("16.04-LTS"),
						Version:   to.Ptr("latest"),
					},
					OSDisk: &armcompute.OSDisk{
						Name:         to.Ptr("myVMosdisk"),
						Caching:      to.Ptr(armcompute.CachingTypesReadWrite),
						CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesFromImage),
						ManagedDisk: &armcompute.ManagedDiskParameters{
							StorageAccountType: to.Ptr(armcompute.StorageAccountTypesPremiumLRS),
						},
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) BeginDeallocate

BeginDeallocate - Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginDeallocateOptions contains the optional parameters for the VirtualMachinesClient.BeginDeallocate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_Deallocate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeallocate(ctx,
		"rgcompute",
		"aaaaaaaaaa",
		&armcompute.VirtualMachinesClientBeginDeallocateOptions{Hibernate: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachinesClient) BeginDelete

BeginDelete - The operation to delete a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Delete_Force.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myVM",
		&armcompute.VirtualMachinesClientBeginDeleteOptions{ForceDeletion: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachinesClient) BeginInstallPatches

BeginInstallPatches - Installs patches on the VM. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. installPatchesInput - Input for InstallPatches as directly received by the API options - VirtualMachinesClientBeginInstallPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginInstallPatches method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_InstallPatches.json

package main

import (
	"context"
	"log"

	"time"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginInstallPatches(ctx,
		"myResourceGroupName",
		"myVMName",
		armcompute.VirtualMachineInstallPatchesParameters{
			MaximumDuration: to.Ptr("PT4H"),
			RebootSetting:   to.Ptr(armcompute.VMGuestPatchRebootSettingIfRequired),
			WindowsParameters: &armcompute.WindowsParameters{
				ClassificationsToInclude: []*armcompute.VMGuestPatchClassificationWindows{
					to.Ptr(armcompute.VMGuestPatchClassificationWindowsCritical),
					to.Ptr(armcompute.VMGuestPatchClassificationWindowsSecurity)},
				MaxPatchPublishDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-19T02:36:43.0539904+00:00"); return t }()),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) BeginPerformMaintenance

BeginPerformMaintenance - The operation to perform maintenance on a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachinesClient.BeginPerformMaintenance method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_PerformMaintenance_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPerformMaintenance(ctx,
		"rgcompute",
		"aaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachinesClient) BeginPowerOff

BeginPowerOff - The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_PowerOff_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginPowerOff(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
		&armcompute.VirtualMachinesClientBeginPowerOffOptions{SkipShutdown: to.Ptr(true)})
	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)
	}
}
Output:

func (*VirtualMachinesClient) BeginReapply

BeginReapply - The operation to reapply a virtual machine's state. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginReapplyOptions contains the optional parameters for the VirtualMachinesClient.BeginReapply method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Reapply.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReapply(ctx,
		"ResourceGroup",
		"VMName",
		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)
	}
}
Output:

func (*VirtualMachinesClient) BeginRedeploy

BeginRedeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_Redeploy_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRedeploy(ctx,
		"rgcompute",
		"a",
		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)
	}
}
Output:

func (*VirtualMachinesClient) BeginReimage

BeginReimage - Reimages the virtual machine which has an ephemeral OS disk back to its initial state. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Reimage.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReimage(ctx,
		"myResourceGroup",
		"myVMName",
		&armcompute.VirtualMachinesClientBeginReimageOptions{Parameters: &armcompute.VirtualMachineReimageParameters{
			TempDisk: to.Ptr(true),
		},
		})
	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)
	}
}
Output:

func (*VirtualMachinesClient) BeginRestart

BeginRestart - The operation to restart a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_Restart_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachinesClient) BeginRunCommand

BeginRunCommand - Run command on the VM. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. parameters - Parameters supplied to the Run command operation. options - VirtualMachinesClientBeginRunCommandOptions contains the optional parameters for the VirtualMachinesClient.BeginRunCommand method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/runCommandExamples/VirtualMachineRunCommand.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("24fb23e3-6ba3-41f0-9b6e-e41131d5d61e", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRunCommand(ctx,
		"crptestar98131",
		"vm3036",
		armcompute.RunCommandInput{
			CommandID: to.Ptr("RunPowerShellScript"),
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) BeginStart

BeginStart - The operation to start a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_Start_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx,
		"rgcompute",
		"aaaaaaaaaaaaaaaaaaaa",
		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)
	}
}
Output:

func (*VirtualMachinesClient) BeginUpdate

BeginUpdate - The operation to update a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. parameters - Parameters supplied to the Update Virtual Machine operation. options - VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Update_DetachDataDiskUsingToBeDetachedProperty.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myVM",
		armcompute.VirtualMachineUpdate{
			Properties: &armcompute.VirtualMachineProperties{
				HardwareProfile: &armcompute.HardwareProfile{
					VMSize: to.Ptr(armcompute.VirtualMachineSizeTypesStandardD2V2),
				},
				NetworkProfile: &armcompute.NetworkProfile{
					NetworkInterfaces: []*armcompute.NetworkInterfaceReference{
						{
							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}"),
							Properties: &armcompute.NetworkInterfaceReferenceProperties{
								Primary: to.Ptr(true),
							},
						}},
				},
				OSProfile: &armcompute.OSProfile{
					AdminPassword: to.Ptr("{your-password}"),
					AdminUsername: to.Ptr("{your-username}"),
					ComputerName:  to.Ptr("myVM"),
				},
				StorageProfile: &armcompute.StorageProfile{
					DataDisks: []*armcompute.DataDisk{
						{
							CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesEmpty),
							DiskSizeGB:   to.Ptr[int32](1023),
							Lun:          to.Ptr[int32](0),
							ToBeDetached: to.Ptr(true),
						},
						{
							CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesEmpty),
							DiskSizeGB:   to.Ptr[int32](1023),
							Lun:          to.Ptr[int32](1),
							ToBeDetached: to.Ptr(false),
						}},
					ImageReference: &armcompute.ImageReference{
						Offer:     to.Ptr("WindowsServer"),
						Publisher: to.Ptr("MicrosoftWindowsServer"),
						SKU:       to.Ptr("2016-Datacenter"),
						Version:   to.Ptr("latest"),
					},
					OSDisk: &armcompute.OSDisk{
						Name:         to.Ptr("myVMosdisk"),
						Caching:      to.Ptr(armcompute.CachingTypesReadWrite),
						CreateOption: to.Ptr(armcompute.DiskCreateOptionTypesFromImage),
						ManagedDisk: &armcompute.ManagedDiskParameters{
							StorageAccountType: to.Ptr(armcompute.StorageAccountTypesStandardLRS),
						},
					},
				},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) Generalize

Generalize - Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to Create a managed image of a generalized VM in Azure [https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource]. For Linux, please refer to How to create an image of a virtual machine or VHD [https://docs.microsoft.com/azure/virtual-machines/linux/capture-image]. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientGeneralizeOptions contains the optional parameters for the VirtualMachinesClient.Generalize method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Generalize.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Generalize(ctx,
		"myResourceGroup",
		"myVMName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*VirtualMachinesClient) Get

Get - Retrieves information about the model view or the instance view of a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myVM",
		&armcompute.VirtualMachinesClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) InstanceView

InstanceView - Retrieves information about the run-time state of a virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientInstanceViewOptions contains the optional parameters for the VirtualMachinesClient.InstanceView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Get_InstanceView.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.InstanceView(ctx,
		"myResourceGroup",
		"myVM",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) NewListAllPager added in v0.7.0

NewListAllPager - Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - VirtualMachinesClientListAllOptions contains the optional parameters for the VirtualMachinesClient.ListAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_ListAll_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAllPager(&armcompute.VirtualMachinesClientListAllOptions{StatusOnly: to.Ptr("aaaaaa"),
		Filter: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachinesClient) NewListAvailableSizesPager added in v0.7.0

NewListAvailableSizesPager - Lists all available virtual machine sizes to which the specified virtual machine can be resized. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientListAvailableSizesOptions contains the optional parameters for the VirtualMachinesClient.ListAvailableSizes method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_ListAvailableVmSizes.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAvailableSizesPager("myResourceGroup",
		"myVmName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachinesClient) NewListByLocationPager added in v0.7.0

NewListByLocationPager - Gets all the virtual machines under the specified subscription for the specified location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 location - The location for which virtual machines under the subscription are queried. options - VirtualMachinesClientListByLocationOptions contains the optional parameters for the VirtualMachinesClient.ListByLocation method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_ListBySubscription_ByLocation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByLocationPager("eastus",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachinesClient) NewListPager added in v0.7.0

NewListPager - Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. options - VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachines_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rgcompute",
		&armcompute.VirtualMachinesClientListOptions{Filter: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualMachinesClient) RetrieveBootDiagnosticsData

RetrieveBootDiagnosticsData - The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachinesClient.RetrieveBootDiagnosticsData method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_RetrieveBootDiagnosticsData.json

package main

import (
	"context"
	"log"

	"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/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.RetrieveBootDiagnosticsData(ctx,
		"ResourceGroup",
		"VMName",
		&armcompute.VirtualMachinesClientRetrieveBootDiagnosticsDataOptions{SasURIExpirationTimeInMinutes: to.Ptr[int32](60)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualMachinesClient) SimulateEviction

SimulateEviction - The operation to simulate the eviction of spot virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 resourceGroupName - The name of the resource group. vmName - The name of the virtual machine. options - VirtualMachinesClientSimulateEvictionOptions contains the optional parameters for the VirtualMachinesClient.SimulateEviction method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_SimulateEviction.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armcompute.NewVirtualMachinesClient("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.SimulateEviction(ctx,
		"ResourceGroup",
		"VMName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type VirtualMachinesClientAssessPatchesResponse added in v0.3.0

type VirtualMachinesClientAssessPatchesResponse struct {
	VirtualMachineAssessPatchesResult
}

VirtualMachinesClientAssessPatchesResponse contains the response from method VirtualMachinesClient.AssessPatches.

type VirtualMachinesClientBeginAssessPatchesOptions added in v0.3.0

type VirtualMachinesClientBeginAssessPatchesOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches method.

type VirtualMachinesClientBeginCaptureOptions added in v0.3.0

type VirtualMachinesClientBeginCaptureOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginCaptureOptions contains the optional parameters for the VirtualMachinesClient.BeginCapture method.

type VirtualMachinesClientBeginConvertToManagedDisksOptions added in v0.3.0

type VirtualMachinesClientBeginConvertToManagedDisksOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginConvertToManagedDisks method.

type VirtualMachinesClientBeginCreateOrUpdateOptions added in v0.3.0

type VirtualMachinesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.

type VirtualMachinesClientBeginDeallocateOptions added in v0.3.0

type VirtualMachinesClientBeginDeallocateOptions struct {
	// Optional parameter to hibernate a virtual machine. (Feature in Preview)
	Hibernate *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginDeallocateOptions contains the optional parameters for the VirtualMachinesClient.BeginDeallocate method.

type VirtualMachinesClientBeginDeleteOptions added in v0.3.0

type VirtualMachinesClientBeginDeleteOptions struct {
	// Optional parameter to force delete virtual machines.
	ForceDeletion *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.

type VirtualMachinesClientBeginInstallPatchesOptions added in v0.3.0

type VirtualMachinesClientBeginInstallPatchesOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginInstallPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginInstallPatches method.

type VirtualMachinesClientBeginPerformMaintenanceOptions added in v0.3.0

type VirtualMachinesClientBeginPerformMaintenanceOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachinesClient.BeginPerformMaintenance method.

type VirtualMachinesClientBeginPowerOffOptions added in v0.3.0

type VirtualMachinesClientBeginPowerOffOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false
	// indicates otherwise. Default value for this flag is false if not specified
	SkipShutdown *bool
}

VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff method.

type VirtualMachinesClientBeginReapplyOptions added in v0.3.0

type VirtualMachinesClientBeginReapplyOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginReapplyOptions contains the optional parameters for the VirtualMachinesClient.BeginReapply method.

type VirtualMachinesClientBeginRedeployOptions added in v0.3.0

type VirtualMachinesClientBeginRedeployOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy method.

type VirtualMachinesClientBeginReimageOptions added in v0.3.0

type VirtualMachinesClientBeginReimageOptions struct {
	// Parameters supplied to the Reimage Virtual Machine operation.
	Parameters *VirtualMachineReimageParameters
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage method.

type VirtualMachinesClientBeginRestartOptions added in v0.3.0

type VirtualMachinesClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.

type VirtualMachinesClientBeginRunCommandOptions added in v0.3.0

type VirtualMachinesClientBeginRunCommandOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginRunCommandOptions contains the optional parameters for the VirtualMachinesClient.BeginRunCommand method.

type VirtualMachinesClientBeginStartOptions added in v0.3.0

type VirtualMachinesClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.

type VirtualMachinesClientBeginUpdateOptions added in v0.3.0

type VirtualMachinesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.

type VirtualMachinesClientCaptureResponse added in v0.3.0

type VirtualMachinesClientCaptureResponse struct {
	VirtualMachineCaptureResult
}

VirtualMachinesClientCaptureResponse contains the response from method VirtualMachinesClient.Capture.

type VirtualMachinesClientConvertToManagedDisksResponse added in v0.3.0

type VirtualMachinesClientConvertToManagedDisksResponse struct {
}

VirtualMachinesClientConvertToManagedDisksResponse contains the response from method VirtualMachinesClient.ConvertToManagedDisks.

type VirtualMachinesClientCreateOrUpdateResponse added in v0.3.0

type VirtualMachinesClientCreateOrUpdateResponse struct {
	VirtualMachine
}

VirtualMachinesClientCreateOrUpdateResponse contains the response from method VirtualMachinesClient.CreateOrUpdate.

type VirtualMachinesClientDeallocateResponse added in v0.3.0

type VirtualMachinesClientDeallocateResponse struct {
}

VirtualMachinesClientDeallocateResponse contains the response from method VirtualMachinesClient.Deallocate.

type VirtualMachinesClientDeleteResponse added in v0.3.0

type VirtualMachinesClientDeleteResponse struct {
}

VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.Delete.

type VirtualMachinesClientGeneralizeOptions added in v0.3.0

type VirtualMachinesClientGeneralizeOptions struct {
}

VirtualMachinesClientGeneralizeOptions contains the optional parameters for the VirtualMachinesClient.Generalize method.

type VirtualMachinesClientGeneralizeResponse added in v0.3.0

type VirtualMachinesClientGeneralizeResponse struct {
}

VirtualMachinesClientGeneralizeResponse contains the response from method VirtualMachinesClient.Generalize.

type VirtualMachinesClientGetOptions added in v0.3.0

type VirtualMachinesClientGetOptions struct {
	// The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual
	// machine that is managed by the platform and can change outside of control
	// plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user
	// during the VM Create/Update operation.
	Expand *InstanceViewTypes
}

VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.

type VirtualMachinesClientGetResponse added in v0.3.0

type VirtualMachinesClientGetResponse struct {
	VirtualMachine
}

VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.

type VirtualMachinesClientInstallPatchesResponse added in v0.3.0

type VirtualMachinesClientInstallPatchesResponse struct {
	VirtualMachineInstallPatchesResult
}

VirtualMachinesClientInstallPatchesResponse contains the response from method VirtualMachinesClient.InstallPatches.

type VirtualMachinesClientInstanceViewOptions added in v0.3.0

type VirtualMachinesClientInstanceViewOptions struct {
}

VirtualMachinesClientInstanceViewOptions contains the optional parameters for the VirtualMachinesClient.InstanceView method.

type VirtualMachinesClientInstanceViewResponse added in v0.3.0

type VirtualMachinesClientInstanceViewResponse struct {
	VirtualMachineInstanceView
}

VirtualMachinesClientInstanceViewResponse contains the response from method VirtualMachinesClient.InstanceView.

type VirtualMachinesClientListAllOptions added in v0.3.0

type VirtualMachinesClientListAllOptions struct {
	// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq
	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'
	Filter *string
	// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
	StatusOnly *string
}

VirtualMachinesClientListAllOptions contains the optional parameters for the VirtualMachinesClient.ListAll method.

type VirtualMachinesClientListAllResponse added in v0.3.0

type VirtualMachinesClientListAllResponse struct {
	VirtualMachineListResult
}

VirtualMachinesClientListAllResponse contains the response from method VirtualMachinesClient.ListAll.

type VirtualMachinesClientListAvailableSizesOptions added in v0.3.0

type VirtualMachinesClientListAvailableSizesOptions struct {
}

VirtualMachinesClientListAvailableSizesOptions contains the optional parameters for the VirtualMachinesClient.ListAvailableSizes method.

type VirtualMachinesClientListAvailableSizesResponse added in v0.3.0

type VirtualMachinesClientListAvailableSizesResponse struct {
	VirtualMachineSizeListResult
}

VirtualMachinesClientListAvailableSizesResponse contains the response from method VirtualMachinesClient.ListAvailableSizes.

type VirtualMachinesClientListByLocationOptions added in v0.3.0

type VirtualMachinesClientListByLocationOptions struct {
}

VirtualMachinesClientListByLocationOptions contains the optional parameters for the VirtualMachinesClient.ListByLocation method.

type VirtualMachinesClientListByLocationResponse added in v0.3.0

type VirtualMachinesClientListByLocationResponse struct {
	VirtualMachineListResult
}

VirtualMachinesClientListByLocationResponse contains the response from method VirtualMachinesClient.ListByLocation.

type VirtualMachinesClientListOptions added in v0.3.0

type VirtualMachinesClientListOptions struct {
	// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq
	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'
	Filter *string
}

VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.List method.

type VirtualMachinesClientListResponse added in v0.3.0

type VirtualMachinesClientListResponse struct {
	VirtualMachineListResult
}

VirtualMachinesClientListResponse contains the response from method VirtualMachinesClient.List.

type VirtualMachinesClientPerformMaintenanceResponse added in v0.3.0

type VirtualMachinesClientPerformMaintenanceResponse struct {
}

VirtualMachinesClientPerformMaintenanceResponse contains the response from method VirtualMachinesClient.PerformMaintenance.

type VirtualMachinesClientPowerOffResponse added in v0.3.0

type VirtualMachinesClientPowerOffResponse struct {
}

VirtualMachinesClientPowerOffResponse contains the response from method VirtualMachinesClient.PowerOff.

type VirtualMachinesClientReapplyResponse added in v0.3.0

type VirtualMachinesClientReapplyResponse struct {
}

VirtualMachinesClientReapplyResponse contains the response from method VirtualMachinesClient.Reapply.

type VirtualMachinesClientRedeployResponse added in v0.3.0

type VirtualMachinesClientRedeployResponse struct {
}

VirtualMachinesClientRedeployResponse contains the response from method VirtualMachinesClient.Redeploy.

type VirtualMachinesClientReimageResponse added in v0.3.0

type VirtualMachinesClientReimageResponse struct {
}

VirtualMachinesClientReimageResponse contains the response from method VirtualMachinesClient.Reimage.

type VirtualMachinesClientRestartResponse added in v0.3.0

type VirtualMachinesClientRestartResponse struct {
}

VirtualMachinesClientRestartResponse contains the response from method VirtualMachinesClient.Restart.

type VirtualMachinesClientRetrieveBootDiagnosticsDataOptions added in v0.3.0

type VirtualMachinesClientRetrieveBootDiagnosticsDataOptions struct {
	// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes.
	// NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.
	SasURIExpirationTimeInMinutes *int32
}

VirtualMachinesClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachinesClient.RetrieveBootDiagnosticsData method.

type VirtualMachinesClientRetrieveBootDiagnosticsDataResponse added in v0.3.0

type VirtualMachinesClientRetrieveBootDiagnosticsDataResponse struct {
	RetrieveBootDiagnosticsDataResult
}

VirtualMachinesClientRetrieveBootDiagnosticsDataResponse contains the response from method VirtualMachinesClient.RetrieveBootDiagnosticsData.

type VirtualMachinesClientRunCommandResponse added in v0.3.0

type VirtualMachinesClientRunCommandResponse struct {
	RunCommandResult
}

VirtualMachinesClientRunCommandResponse contains the response from method VirtualMachinesClient.RunCommand.

type VirtualMachinesClientSimulateEvictionOptions added in v0.3.0

type VirtualMachinesClientSimulateEvictionOptions struct {
}

VirtualMachinesClientSimulateEvictionOptions contains the optional parameters for the VirtualMachinesClient.SimulateEviction method.

type VirtualMachinesClientSimulateEvictionResponse added in v0.3.0

type VirtualMachinesClientSimulateEvictionResponse struct {
}

VirtualMachinesClientSimulateEvictionResponse contains the response from method VirtualMachinesClient.SimulateEviction.

type VirtualMachinesClientStartResponse added in v0.3.0

type VirtualMachinesClientStartResponse struct {
}

VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.Start.

type VirtualMachinesClientUpdateResponse added in v0.3.0

type VirtualMachinesClientUpdateResponse struct {
	VirtualMachine
}

VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.Update.

type WinRMConfiguration

type WinRMConfiguration struct {
	// The list of Windows Remote Management listeners
	Listeners []*WinRMListener `json:"listeners,omitempty"`
}

WinRMConfiguration - Describes Windows Remote Management configuration of the VM

func (WinRMConfiguration) MarshalJSON

func (w WinRMConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WinRMConfiguration.

type WinRMListener

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]. 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] or the Azure Key Vault virtual machine extension
	// for Windows
	// [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
	CertificateURL *string `json:"certificateUrl,omitempty"`

	// Specifies the protocol of WinRM listener.
	// Possible values are:
	// http
	// https
	Protocol *ProtocolTypes `json:"protocol,omitempty"`
}

WinRMListener - Describes Protocol and thumbprint of Windows Remote Management listener

type WindowsConfiguration

type WindowsConfiguration struct {
	// Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is
	// used by Windows Setup.
	AdditionalUnattendContent []*AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`

	// Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.
	// For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`

	// [Preview Feature] Specifies settings related to VM Guest Patching on Windows.
	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`

	// Indicates whether virtual machine agent should be provisioned on the virtual machine.
	// When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM
	// Agent is installed on the VM so that extensions can be added to the VM later.
	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`

	// 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]
	// value from time zones returned by TimeZoneInfo.GetSystemTimeZones
	// [https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones].
	TimeZone *string `json:"timeZone,omitempty"`

	// Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
}

WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.

func (WindowsConfiguration) MarshalJSON

func (w WindowsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration.

type WindowsParameters

type WindowsParameters struct {
	// The update classifications to select when installing patches for Windows.
	ClassificationsToInclude []*VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"`

	// Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.
	ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"`

	// Kbs to exclude in the patch operation
	KbNumbersToExclude []*string `json:"kbNumbersToExclude,omitempty"`

	// Kbs to include in the patch operation
	KbNumbersToInclude []*string `json:"kbNumbersToInclude,omitempty"`

	// This is used to install patches that were published on or before this given max published date.
	MaxPatchPublishDate *time.Time `json:"maxPatchPublishDate,omitempty"`
}

WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API

func (WindowsParameters) MarshalJSON

func (w WindowsParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsParameters.

func (*WindowsParameters) UnmarshalJSON

func (w *WindowsParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WindowsParameters.

type WindowsPatchAssessmentMode

type WindowsPatchAssessmentMode string

WindowsPatchAssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine. Possible values are: ImageDefault - You control the timing of patch assessments on a virtual machine. AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.

const (
	WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform"
	WindowsPatchAssessmentModeImageDefault        WindowsPatchAssessmentMode = "ImageDefault"
)

func PossibleWindowsPatchAssessmentModeValues

func PossibleWindowsPatchAssessmentModeValues() []WindowsPatchAssessmentMode

PossibleWindowsPatchAssessmentModeValues returns the possible values for the WindowsPatchAssessmentMode const type.

type WindowsVMGuestPatchAutomaticByPlatformRebootSetting added in v1.0.0

type WindowsVMGuestPatchAutomaticByPlatformRebootSetting string

WindowsVMGuestPatchAutomaticByPlatformRebootSetting - Specifies the reboot setting for all AutomaticByPlatform patch installation operations.

const (
	WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways     WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Always"
	WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired"
	WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever      WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Never"
	WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown    WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown"
)

func PossibleWindowsVMGuestPatchAutomaticByPlatformRebootSettingValues added in v1.0.0

func PossibleWindowsVMGuestPatchAutomaticByPlatformRebootSettingValues() []WindowsVMGuestPatchAutomaticByPlatformRebootSetting

PossibleWindowsVMGuestPatchAutomaticByPlatformRebootSettingValues returns the possible values for the WindowsVMGuestPatchAutomaticByPlatformRebootSetting const type.

type WindowsVMGuestPatchAutomaticByPlatformSettings added in v1.0.0

type WindowsVMGuestPatchAutomaticByPlatformSettings struct {
	// Specifies the reboot setting for all AutomaticByPlatform patch installation operations.
	RebootSetting *WindowsVMGuestPatchAutomaticByPlatformRebootSetting `json:"rebootSetting,omitempty"`
}

WindowsVMGuestPatchAutomaticByPlatformSettings - Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.

type WindowsVMGuestPatchMode

type WindowsVMGuestPatchMode string

WindowsVMGuestPatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible. Possible values are: Manual - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false AutomaticByOS - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. AutomaticByPlatform - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true

const (
	WindowsVMGuestPatchModeAutomaticByOS       WindowsVMGuestPatchMode = "AutomaticByOS"
	WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform"
	WindowsVMGuestPatchModeManual              WindowsVMGuestPatchMode = "Manual"
)

func PossibleWindowsVMGuestPatchModeValues

func PossibleWindowsVMGuestPatchModeValues() []WindowsVMGuestPatchMode

PossibleWindowsVMGuestPatchModeValues returns the possible values for the WindowsVMGuestPatchMode const type.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL