virtualmachinetemplates

package
v0.20240214.1100807 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates Documentation

The virtualmachinetemplates SDK allows for interaction with the Azure Resource Manager Service systemcentervirtualmachinemanager (API Version 2023-10-07).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates"

Client Initialization

client := virtualmachinetemplates.NewVirtualMachineTemplatesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineTemplatesClient.CreateOrUpdate

ctx := context.TODO()
id := virtualmachinetemplates.NewVirtualMachineTemplateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineTemplateValue")

payload := virtualmachinetemplates.VirtualMachineTemplate{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: VirtualMachineTemplatesClient.Delete

ctx := context.TODO()
id := virtualmachinetemplates.NewVirtualMachineTemplateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineTemplateValue")

if err := client.DeleteThenPoll(ctx, id, virtualmachinetemplates.DefaultDeleteOperationOptions()); err != nil {
	// handle the error
}

Example Usage: VirtualMachineTemplatesClient.Get

ctx := context.TODO()
id := virtualmachinetemplates.NewVirtualMachineTemplateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineTemplateValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualMachineTemplatesClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: VirtualMachineTemplatesClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: VirtualMachineTemplatesClient.Update

ctx := context.TODO()
id := virtualmachinetemplates.NewVirtualMachineTemplateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineTemplateValue")

payload := virtualmachinetemplates.ResourcePatch{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAllocationMethod

func PossibleValuesForAllocationMethod() []string

func PossibleValuesForCreateDiffDisk

func PossibleValuesForCreateDiffDisk() []string

func PossibleValuesForDynamicMemoryEnabled

func PossibleValuesForDynamicMemoryEnabled() []string

func PossibleValuesForForce

func PossibleValuesForForce() []string

func PossibleValuesForIsCustomizable

func PossibleValuesForIsCustomizable() []string

func PossibleValuesForIsHighlyAvailable

func PossibleValuesForIsHighlyAvailable() []string

func PossibleValuesForLimitCPUForMigration

func PossibleValuesForLimitCPUForMigration() []string

func PossibleValuesForOsType

func PossibleValuesForOsType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateVirtualMachineTemplateID

func ValidateVirtualMachineTemplateID(input interface{}, key string) (warnings []string, errors []error)

ValidateVirtualMachineTemplateID checks that 'input' can be parsed as a Virtual Machine Template ID

Types

type AllocationMethod

type AllocationMethod string
const (
	AllocationMethodDynamic AllocationMethod = "Dynamic"
	AllocationMethodStatic  AllocationMethod = "Static"
)

func (*AllocationMethod) UnmarshalJSON

func (s *AllocationMethod) UnmarshalJSON(bytes []byte) error

type CreateDiffDisk

type CreateDiffDisk string
const (
	CreateDiffDiskFalse CreateDiffDisk = "false"
	CreateDiffDiskTrue  CreateDiffDisk = "true"
)

func (*CreateDiffDisk) UnmarshalJSON

func (s *CreateDiffDisk) UnmarshalJSON(bytes []byte) error

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineTemplate
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *Force
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DynamicMemoryEnabled

type DynamicMemoryEnabled string
const (
	DynamicMemoryEnabledFalse DynamicMemoryEnabled = "false"
	DynamicMemoryEnabledTrue  DynamicMemoryEnabled = "true"
)

func (*DynamicMemoryEnabled) UnmarshalJSON

func (s *DynamicMemoryEnabled) UnmarshalJSON(bytes []byte) error

type ExtendedLocation

type ExtendedLocation struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type Force

type Force string
const (
	ForceFalse Force = "false"
	ForceTrue  Force = "true"
)

func (*Force) UnmarshalJSON

func (s *Force) UnmarshalJSON(bytes []byte) error

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineTemplate
}

type IsCustomizable

type IsCustomizable string
const (
	IsCustomizableFalse IsCustomizable = "false"
	IsCustomizableTrue  IsCustomizable = "true"
)

func (*IsCustomizable) UnmarshalJSON

func (s *IsCustomizable) UnmarshalJSON(bytes []byte) error

type IsHighlyAvailable

type IsHighlyAvailable string
const (
	IsHighlyAvailableFalse IsHighlyAvailable = "false"
	IsHighlyAvailableTrue  IsHighlyAvailable = "true"
)

func (*IsHighlyAvailable) UnmarshalJSON

func (s *IsHighlyAvailable) UnmarshalJSON(bytes []byte) error

type LimitCPUForMigration

type LimitCPUForMigration string
const (
	LimitCPUForMigrationFalse LimitCPUForMigration = "false"
	LimitCPUForMigrationTrue  LimitCPUForMigration = "true"
)

func (*LimitCPUForMigration) UnmarshalJSON

func (s *LimitCPUForMigration) UnmarshalJSON(bytes []byte) error

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualMachineTemplate
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualMachineTemplate
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualMachineTemplate
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualMachineTemplate
}

type NetworkInterface

type NetworkInterface struct {
	DisplayName      *string           `json:"displayName,omitempty"`
	IPv4AddressType  *AllocationMethod `json:"ipv4AddressType,omitempty"`
	IPv4Addresses    *[]string         `json:"ipv4Addresses,omitempty"`
	IPv6AddressType  *AllocationMethod `json:"ipv6AddressType,omitempty"`
	IPv6Addresses    *[]string         `json:"ipv6Addresses,omitempty"`
	MacAddress       *string           `json:"macAddress,omitempty"`
	MacAddressType   *AllocationMethod `json:"macAddressType,omitempty"`
	Name             *string           `json:"name,omitempty"`
	NetworkName      *string           `json:"networkName,omitempty"`
	NicId            *string           `json:"nicId,omitempty"`
	VirtualNetworkId *string           `json:"virtualNetworkId,omitempty"`
}

type OsType

type OsType string
const (
	OsTypeLinux   OsType = "Linux"
	OsTypeOther   OsType = "Other"
	OsTypeWindows OsType = "Windows"
)

func (*OsType) UnmarshalJSON

func (s *OsType) UnmarshalJSON(bytes []byte) error

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type ResourcePatch

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

type StorageQoSPolicyDetails

type StorageQoSPolicyDetails struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineTemplate
}

type VirtualDisk

type VirtualDisk struct {
	Bus              *int64                   `json:"bus,omitempty"`
	BusType          *string                  `json:"busType,omitempty"`
	CreateDiffDisk   *CreateDiffDisk          `json:"createDiffDisk,omitempty"`
	DiskId           *string                  `json:"diskId,omitempty"`
	DiskSizeGB       *int64                   `json:"diskSizeGB,omitempty"`
	DisplayName      *string                  `json:"displayName,omitempty"`
	Lun              *int64                   `json:"lun,omitempty"`
	MaxDiskSizeGB    *int64                   `json:"maxDiskSizeGB,omitempty"`
	Name             *string                  `json:"name,omitempty"`
	StorageQoSPolicy *StorageQoSPolicyDetails `json:"storageQoSPolicy,omitempty"`
	TemplateDiskId   *string                  `json:"templateDiskId,omitempty"`
	VhdFormatType    *string                  `json:"vhdFormatType,omitempty"`
	VhdType          *string                  `json:"vhdType,omitempty"`
	VolumeType       *string                  `json:"volumeType,omitempty"`
}

type VirtualMachineTemplate

type VirtualMachineTemplate struct {
	ExtendedLocation ExtendedLocation                 `json:"extendedLocation"`
	Id               *string                          `json:"id,omitempty"`
	Location         string                           `json:"location"`
	Name             *string                          `json:"name,omitempty"`
	Properties       VirtualMachineTemplateProperties `json:"properties"`
	SystemData       *systemdata.SystemData           `json:"systemData,omitempty"`
	Tags             *map[string]string               `json:"tags,omitempty"`
	Type             *string                          `json:"type,omitempty"`
}

type VirtualMachineTemplateId

type VirtualMachineTemplateId struct {
	SubscriptionId             string
	ResourceGroupName          string
	VirtualMachineTemplateName string
}

VirtualMachineTemplateId is a struct representing the Resource ID for a Virtual Machine Template

func NewVirtualMachineTemplateID

func NewVirtualMachineTemplateID(subscriptionId string, resourceGroupName string, virtualMachineTemplateName string) VirtualMachineTemplateId

NewVirtualMachineTemplateID returns a new VirtualMachineTemplateId struct

func ParseVirtualMachineTemplateID

func ParseVirtualMachineTemplateID(input string) (*VirtualMachineTemplateId, error)

ParseVirtualMachineTemplateID parses 'input' into a VirtualMachineTemplateId

func ParseVirtualMachineTemplateIDInsensitively

func ParseVirtualMachineTemplateIDInsensitively(input string) (*VirtualMachineTemplateId, error)

ParseVirtualMachineTemplateIDInsensitively parses 'input' case-insensitively into a VirtualMachineTemplateId note: this method should only be used for API response data and not user input

func (*VirtualMachineTemplateId) FromParseResult

func (id *VirtualMachineTemplateId) FromParseResult(input resourceids.ParseResult) error

func (VirtualMachineTemplateId) ID

ID returns the formatted Virtual Machine Template ID

func (VirtualMachineTemplateId) Segments

Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Template ID

func (VirtualMachineTemplateId) String

func (id VirtualMachineTemplateId) String() string

String returns a human-readable description of this Virtual Machine Template ID

type VirtualMachineTemplateOperationPredicate

type VirtualMachineTemplateOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (VirtualMachineTemplateOperationPredicate) Matches

type VirtualMachineTemplateProperties

type VirtualMachineTemplateProperties struct {
	ComputerName         *string               `json:"computerName,omitempty"`
	CpuCount             *int64                `json:"cpuCount,omitempty"`
	Disks                *[]VirtualDisk        `json:"disks,omitempty"`
	DynamicMemoryEnabled *DynamicMemoryEnabled `json:"dynamicMemoryEnabled,omitempty"`
	DynamicMemoryMaxMB   *int64                `json:"dynamicMemoryMaxMB,omitempty"`
	DynamicMemoryMinMB   *int64                `json:"dynamicMemoryMinMB,omitempty"`
	Generation           *int64                `json:"generation,omitempty"`
	InventoryItemId      *string               `json:"inventoryItemId,omitempty"`
	IsCustomizable       *IsCustomizable       `json:"isCustomizable,omitempty"`
	IsHighlyAvailable    *IsHighlyAvailable    `json:"isHighlyAvailable,omitempty"`
	LimitCPUForMigration *LimitCPUForMigration `json:"limitCpuForMigration,omitempty"`
	MemoryMB             *int64                `json:"memoryMB,omitempty"`
	NetworkInterfaces    *[]NetworkInterface   `json:"networkInterfaces,omitempty"`
	OsName               *string               `json:"osName,omitempty"`
	OsType               *OsType               `json:"osType,omitempty"`
	ProvisioningState    *ProvisioningState    `json:"provisioningState,omitempty"`
	Uuid                 *string               `json:"uuid,omitempty"`
	VMmServerId          *string               `json:"vmmServerId,omitempty"`
}

type VirtualMachineTemplatesClient

type VirtualMachineTemplatesClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachineTemplatesClientWithBaseURI

func NewVirtualMachineTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineTemplatesClient, error)

func (VirtualMachineTemplatesClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualMachineTemplatesClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualMachineTemplatesClient) Delete

Delete ...

func (VirtualMachineTemplatesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualMachineTemplatesClient) Get

Get ...

func (VirtualMachineTemplatesClient) ListByResourceGroup

ListByResourceGroup ...

func (VirtualMachineTemplatesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (VirtualMachineTemplatesClient) ListByResourceGroupCompleteMatchingPredicate

func (c VirtualMachineTemplatesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualMachineTemplateOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualMachineTemplatesClient) ListBySubscription

ListBySubscription ...

func (VirtualMachineTemplatesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (VirtualMachineTemplatesClient) ListBySubscriptionCompleteMatchingPredicate

func (c VirtualMachineTemplatesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualMachineTemplateOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualMachineTemplatesClient) Update

Update ...

func (VirtualMachineTemplatesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL