virtualmachinetemplates

package
v0.20231205.1144758 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates Documentation

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

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-sdk/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates"

Client Initialization

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

Example Usage: VirtualMachineTemplatesClient.Create

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

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


if err := client.CreateThenPoll(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.List

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

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

Example Usage: VirtualMachineTemplatesClient.ListByResourceGroup

ctx := context.TODO()
id := virtualmachinetemplates.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.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDiskMode

func PossibleValuesForDiskMode() []string

func PossibleValuesForDiskType

func PossibleValuesForDiskType() []string

func PossibleValuesForFirmwareType

func PossibleValuesForFirmwareType() []string

func PossibleValuesForIPAddressAllocationMethod

func PossibleValuesForIPAddressAllocationMethod() []string

func PossibleValuesForNICType

func PossibleValuesForNICType() []string

func PossibleValuesForOsType

func PossibleValuesForOsType() []string

func PossibleValuesForPowerOnBootOption

func PossibleValuesForPowerOnBootOption() []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 CreateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

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 DiskMode

type DiskMode string
const (
	DiskModeIndependentNonpersistent DiskMode = "independent_nonpersistent"
	DiskModeIndependentPersistent    DiskMode = "independent_persistent"
	DiskModePersistent               DiskMode = "persistent"
)

func (*DiskMode) UnmarshalJSON

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

type DiskType

type DiskType string
const (
	DiskTypeFlat        DiskType = "flat"
	DiskTypePmem        DiskType = "pmem"
	DiskTypeRawphysical DiskType = "rawphysical"
	DiskTypeRawvirtual  DiskType = "rawvirtual"
	DiskTypeSesparse    DiskType = "sesparse"
	DiskTypeSparse      DiskType = "sparse"
	DiskTypeUnknown     DiskType = "unknown"
)

func (*DiskType) UnmarshalJSON

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

type ExtendedLocation

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

type FirmwareType

type FirmwareType string
const (
	FirmwareTypeBios FirmwareType = "bios"
	FirmwareTypeEfi  FirmwareType = "efi"
)

func (*FirmwareType) UnmarshalJSON

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

type GetOperationResponse

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

type IPAddressAllocationMethod

type IPAddressAllocationMethod string
const (
	IPAddressAllocationMethodDynamic   IPAddressAllocationMethod = "dynamic"
	IPAddressAllocationMethodLinklayer IPAddressAllocationMethod = "linklayer"
	IPAddressAllocationMethodOther     IPAddressAllocationMethod = "other"
	IPAddressAllocationMethodRandom    IPAddressAllocationMethod = "random"
	IPAddressAllocationMethodStatic    IPAddressAllocationMethod = "static"
	IPAddressAllocationMethodUnset     IPAddressAllocationMethod = "unset"
)

func (*IPAddressAllocationMethod) UnmarshalJSON

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []VirtualMachineTemplate
}

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []VirtualMachineTemplate
}

type ListOperationResponse

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

type NICType

type NICType string
const (
	NICTypeEOneThousand  NICType = "e1000"
	NICTypeEOneThousande NICType = "e1000e"
	NICTypePcnetThreeTwo NICType = "pcnet32"
	NICTypeVMxnet        NICType = "vmxnet"
	NICTypeVMxnetThree   NICType = "vmxnet3"
	NICTypeVMxnetTwo     NICType = "vmxnet2"
)

func (*NICType) UnmarshalJSON

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

type NetworkInterface

type NetworkInterface struct {
	DeviceKey      *int64             `json:"deviceKey,omitempty"`
	IPAddresses    *[]string          `json:"ipAddresses,omitempty"`
	IPSettings     *NicIPSettings     `json:"ipSettings,omitempty"`
	Label          *string            `json:"label,omitempty"`
	MacAddress     *string            `json:"macAddress,omitempty"`
	Name           *string            `json:"name,omitempty"`
	NetworkId      *string            `json:"networkId,omitempty"`
	NetworkMoName  *string            `json:"networkMoName,omitempty"`
	NetworkMoRefId *string            `json:"networkMoRefId,omitempty"`
	NicType        *NICType           `json:"nicType,omitempty"`
	PowerOnBoot    *PowerOnBootOption `json:"powerOnBoot,omitempty"`
}

type NicIPAddressSettings

type NicIPAddressSettings struct {
	AllocationMethod *string `json:"allocationMethod,omitempty"`
	IPAddress        *string `json:"ipAddress,omitempty"`
	SubnetMask       *string `json:"subnetMask,omitempty"`
}

type NicIPSettings

type NicIPSettings struct {
	AllocationMethod    *IPAddressAllocationMethod `json:"allocationMethod,omitempty"`
	DnsServers          *[]string                  `json:"dnsServers,omitempty"`
	Gateway             *[]string                  `json:"gateway,omitempty"`
	IPAddress           *string                    `json:"ipAddress,omitempty"`
	IPAddressInfo       *[]NicIPAddressSettings    `json:"ipAddressInfo,omitempty"`
	PrimaryWinsServer   *string                    `json:"primaryWinsServer,omitempty"`
	SecondaryWinsServer *string                    `json:"secondaryWinsServer,omitempty"`
	SubnetMask          *string                    `json:"subnetMask,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 PowerOnBootOption

type PowerOnBootOption string
const (
	PowerOnBootOptionDisabled PowerOnBootOption = "disabled"
	PowerOnBootOptionEnabled  PowerOnBootOption = "enabled"
)

func (*PowerOnBootOption) UnmarshalJSON

func (s *PowerOnBootOption) 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 ResourceStatus

type ResourceStatus struct {
	LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"`
	Message       *string `json:"message,omitempty"`
	Reason        *string `json:"reason,omitempty"`
	Severity      *string `json:"severity,omitempty"`
	Status        *string `json:"status,omitempty"`
	Type          *string `json:"type,omitempty"`
}

func (*ResourceStatus) GetLastUpdatedAtAsTime

func (o *ResourceStatus) GetLastUpdatedAtAsTime() (*time.Time, error)

func (*ResourceStatus) SetLastUpdatedAtAsTime

func (o *ResourceStatus) SetLastUpdatedAtAsTime(input time.Time)

type UpdateOperationResponse

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

type VirtualDisk

type VirtualDisk struct {
	ControllerKey *int64    `json:"controllerKey,omitempty"`
	DeviceKey     *int64    `json:"deviceKey,omitempty"`
	DeviceName    *string   `json:"deviceName,omitempty"`
	DiskMode      *DiskMode `json:"diskMode,omitempty"`
	DiskObjectId  *string   `json:"diskObjectId,omitempty"`
	DiskSizeGB    *int64    `json:"diskSizeGB,omitempty"`
	DiskType      *DiskType `json:"diskType,omitempty"`
	Label         *string   `json:"label,omitempty"`
	Name          *string   `json:"name,omitempty"`
	UnitNumber    *int64    `json:"unitNumber,omitempty"`
}

type VirtualMachineTemplate

type VirtualMachineTemplate struct {
	ExtendedLocation *ExtendedLocation                `json:"extendedLocation,omitempty"`
	Id               *string                          `json:"id,omitempty"`
	Kind             *string                          `json:"kind,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 added in v0.20231127.1171502

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
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (VirtualMachineTemplateOperationPredicate) Matches

type VirtualMachineTemplateProperties

type VirtualMachineTemplateProperties struct {
	CustomResourceName *string             `json:"customResourceName,omitempty"`
	Disks              *[]VirtualDisk      `json:"disks,omitempty"`
	FirmwareType       *FirmwareType       `json:"firmwareType,omitempty"`
	FolderPath         *string             `json:"folderPath,omitempty"`
	InventoryItemId    *string             `json:"inventoryItemId,omitempty"`
	MemorySizeMB       *int64              `json:"memorySizeMB,omitempty"`
	MoName             *string             `json:"moName,omitempty"`
	MoRefId            *string             `json:"moRefId,omitempty"`
	NetworkInterfaces  *[]NetworkInterface `json:"networkInterfaces,omitempty"`
	NumCPUs            *int64              `json:"numCPUs,omitempty"`
	NumCoresPerSocket  *int64              `json:"numCoresPerSocket,omitempty"`
	OsName             *string             `json:"osName,omitempty"`
	OsType             *OsType             `json:"osType,omitempty"`
	ProvisioningState  *ProvisioningState  `json:"provisioningState,omitempty"`
	Statuses           *[]ResourceStatus   `json:"statuses,omitempty"`
	ToolsVersion       *string             `json:"toolsVersion,omitempty"`
	ToolsVersionStatus *string             `json:"toolsVersionStatus,omitempty"`
	Uuid               *string             `json:"uuid,omitempty"`
	VCenterId          *string             `json:"vCenterId,omitempty"`
}

type VirtualMachineTemplatesClient

type VirtualMachineTemplatesClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachineTemplatesClientWithBaseURI

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

func (VirtualMachineTemplatesClient) Create

Create ...

func (VirtualMachineTemplatesClient) CreateThenPoll

CreateThenPoll performs Create 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) List

List ...

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) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualMachineTemplatesClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualMachineTemplatesClient) Update

Update ...

Jump to

Keyboard shortcuts

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