virtualharddisks

package
v0.20240425.1225320 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-09-01-preview/virtualharddisks Documentation

The virtualharddisks SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2023-09-01-preview).

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/azurestackhci/2023-09-01-preview/virtualharddisks"

Client Initialization

client := virtualharddisks.NewVirtualHardDisksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualHardDisksClient.CreateOrUpdate

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

payload := virtualharddisks.VirtualHardDisks{
	// ...
}


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

Example Usage: VirtualHardDisksClient.Delete

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

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

Example Usage: VirtualHardDisksClient.Get

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

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: VirtualHardDisksClient.List

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

// 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: VirtualHardDisksClient.ListAll

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

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

Example Usage: VirtualHardDisksClient.Update

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

payload := virtualharddisks.VirtualHardDisksUpdateRequest{
	// ...
}


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 PossibleValuesForDiskFileFormat

func PossibleValuesForDiskFileFormat() []string

func PossibleValuesForExtendedLocationTypes

func PossibleValuesForExtendedLocationTypes() []string

func PossibleValuesForHyperVGeneration

func PossibleValuesForHyperVGeneration() []string

func PossibleValuesForProvisioningStateEnum

func PossibleValuesForProvisioningStateEnum() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateVirtualHardDiskID

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

ValidateVirtualHardDiskID checks that 'input' can be parsed as a Virtual Hard Disk ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DiskFileFormat

type DiskFileFormat string
const (
	DiskFileFormatVhd  DiskFileFormat = "vhd"
	DiskFileFormatVhdx DiskFileFormat = "vhdx"
)

func (*DiskFileFormat) UnmarshalJSON

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

type ExtendedLocation

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

type ExtendedLocationTypes

type ExtendedLocationTypes string
const (
	ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)

func (*ExtendedLocationTypes) UnmarshalJSON

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

type GetOperationResponse

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

type HyperVGeneration

type HyperVGeneration string
const (
	HyperVGenerationVOne HyperVGeneration = "V1"
	HyperVGenerationVTwo HyperVGeneration = "V2"
)

func (*HyperVGeneration) UnmarshalJSON

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

type ListAllCompleteResult

type ListAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualHardDisks
}

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualHardDisks
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualHardDisks
}

type ListOperationResponse

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

type ProvisioningStateEnum

type ProvisioningStateEnum string
const (
	ProvisioningStateEnumAccepted   ProvisioningStateEnum = "Accepted"
	ProvisioningStateEnumCanceled   ProvisioningStateEnum = "Canceled"
	ProvisioningStateEnumDeleting   ProvisioningStateEnum = "Deleting"
	ProvisioningStateEnumFailed     ProvisioningStateEnum = "Failed"
	ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress"
	ProvisioningStateEnumSucceeded  ProvisioningStateEnum = "Succeeded"
)

func (*ProvisioningStateEnum) UnmarshalJSON

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

type Status

type Status string
const (
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusSucceeded  Status = "Succeeded"
)

func (*Status) UnmarshalJSON

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

type UpdateOperationResponse

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

type VirtualHardDiskId

type VirtualHardDiskId struct {
	SubscriptionId      string
	ResourceGroupName   string
	VirtualHardDiskName string
}

VirtualHardDiskId is a struct representing the Resource ID for a Virtual Hard Disk

func NewVirtualHardDiskID

func NewVirtualHardDiskID(subscriptionId string, resourceGroupName string, virtualHardDiskName string) VirtualHardDiskId

NewVirtualHardDiskID returns a new VirtualHardDiskId struct

func ParseVirtualHardDiskID

func ParseVirtualHardDiskID(input string) (*VirtualHardDiskId, error)

ParseVirtualHardDiskID parses 'input' into a VirtualHardDiskId

func ParseVirtualHardDiskIDInsensitively

func ParseVirtualHardDiskIDInsensitively(input string) (*VirtualHardDiskId, error)

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

func (*VirtualHardDiskId) FromParseResult

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

func (VirtualHardDiskId) ID

func (id VirtualHardDiskId) ID() string

ID returns the formatted Virtual Hard Disk ID

func (VirtualHardDiskId) Segments

func (id VirtualHardDiskId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Virtual Hard Disk ID

func (VirtualHardDiskId) String

func (id VirtualHardDiskId) String() string

String returns a human-readable description of this Virtual Hard Disk ID

type VirtualHardDiskProperties

type VirtualHardDiskProperties struct {
	BlockSizeBytes      *int64                 `json:"blockSizeBytes,omitempty"`
	ContainerId         *string                `json:"containerId,omitempty"`
	DiskFileFormat      *DiskFileFormat        `json:"diskFileFormat,omitempty"`
	DiskSizeGB          *int64                 `json:"diskSizeGB,omitempty"`
	Dynamic             *bool                  `json:"dynamic,omitempty"`
	HyperVGeneration    *HyperVGeneration      `json:"hyperVGeneration,omitempty"`
	LogicalSectorBytes  *int64                 `json:"logicalSectorBytes,omitempty"`
	PhysicalSectorBytes *int64                 `json:"physicalSectorBytes,omitempty"`
	ProvisioningState   *ProvisioningStateEnum `json:"provisioningState,omitempty"`
	Status              *VirtualHardDiskStatus `json:"status,omitempty"`
}

type VirtualHardDiskStatus

type VirtualHardDiskStatus struct {
	ErrorCode          *string                                  `json:"errorCode,omitempty"`
	ErrorMessage       *string                                  `json:"errorMessage,omitempty"`
	ProvisioningStatus *VirtualHardDiskStatusProvisioningStatus `json:"provisioningStatus,omitempty"`
}

type VirtualHardDiskStatusProvisioningStatus

type VirtualHardDiskStatusProvisioningStatus struct {
	OperationId *string `json:"operationId,omitempty"`
	Status      *Status `json:"status,omitempty"`
}

type VirtualHardDisks

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

type VirtualHardDisksClient

type VirtualHardDisksClient struct {
	Client *resourcemanager.Client
}

func NewVirtualHardDisksClientWithBaseURI

func NewVirtualHardDisksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualHardDisksClient, error)

func (VirtualHardDisksClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualHardDisksClient) CreateOrUpdateThenPoll

func (c VirtualHardDisksClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualHardDiskId, input VirtualHardDisks) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualHardDisksClient) Delete

Delete ...

func (VirtualHardDisksClient) DeleteThenPoll

func (c VirtualHardDisksClient) DeleteThenPoll(ctx context.Context, id VirtualHardDiskId) error

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualHardDisksClient) Get

Get ...

func (VirtualHardDisksClient) List

List ...

func (VirtualHardDisksClient) ListAll

ListAll ...

func (VirtualHardDisksClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (VirtualHardDisksClient) ListAllCompleteMatchingPredicate

func (c VirtualHardDisksClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualHardDisksOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualHardDisksClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualHardDisksClient) ListCompleteMatchingPredicate

func (c VirtualHardDisksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualHardDisksOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualHardDisksClient) Update

Update ...

func (VirtualHardDisksClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type VirtualHardDisksOperationPredicate

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

func (VirtualHardDisksOperationPredicate) Matches

type VirtualHardDisksUpdateRequest

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

Jump to

Keyboard shortcuts

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