galleryimages

package
v0.20240315.1103122 Latest Latest
Warning

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

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

README

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

The galleryimages 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/galleryimages"

Client Initialization

client := galleryimages.NewGalleryImagesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GalleryImagesClient.CreateOrUpdate

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

payload := galleryimages.GalleryImages{
	// ...
}


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

Example Usage: GalleryImagesClient.Delete

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

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

Example Usage: GalleryImagesClient.Get

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

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: GalleryImagesClient.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: GalleryImagesClient.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: GalleryImagesClient.Update

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

payload := galleryimages.GalleryImagesUpdateRequest{
	// ...
}


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 PossibleValuesForCloudInitDataSource

func PossibleValuesForCloudInitDataSource() []string

func PossibleValuesForExtendedLocationTypes

func PossibleValuesForExtendedLocationTypes() []string

func PossibleValuesForHyperVGeneration

func PossibleValuesForHyperVGeneration() []string

func PossibleValuesForOperatingSystemTypes

func PossibleValuesForOperatingSystemTypes() []string

func PossibleValuesForProvisioningStateEnum

func PossibleValuesForProvisioningStateEnum() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateGalleryImageID

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

ValidateGalleryImageID checks that 'input' can be parsed as a Gallery Image ID

Types

type CloudInitDataSource

type CloudInitDataSource string
const (
	CloudInitDataSourceAzure   CloudInitDataSource = "Azure"
	CloudInitDataSourceNoCloud CloudInitDataSource = "NoCloud"
)

func (*CloudInitDataSource) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

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 GalleryDiskImage

type GalleryDiskImage struct {
	SizeInMB *int64 `json:"sizeInMB,omitempty"`
}

type GalleryImageId

type GalleryImageId struct {
	SubscriptionId    string
	ResourceGroupName string
	GalleryImageName  string
}

GalleryImageId is a struct representing the Resource ID for a Gallery Image

func NewGalleryImageID

func NewGalleryImageID(subscriptionId string, resourceGroupName string, galleryImageName string) GalleryImageId

NewGalleryImageID returns a new GalleryImageId struct

func ParseGalleryImageID

func ParseGalleryImageID(input string) (*GalleryImageId, error)

ParseGalleryImageID parses 'input' into a GalleryImageId

func ParseGalleryImageIDInsensitively

func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error)

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

func (*GalleryImageId) FromParseResult

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

func (GalleryImageId) ID

func (id GalleryImageId) ID() string

ID returns the formatted Gallery Image ID

func (GalleryImageId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Gallery Image ID

func (GalleryImageId) String

func (id GalleryImageId) String() string

String returns a human-readable description of this Gallery Image ID

type GalleryImageIdentifier

type GalleryImageIdentifier struct {
	Offer     string `json:"offer"`
	Publisher string `json:"publisher"`
	Sku       string `json:"sku"`
}

type GalleryImageProperties

type GalleryImageProperties struct {
	CloudInitDataSource *CloudInitDataSource    `json:"cloudInitDataSource,omitempty"`
	ContainerId         *string                 `json:"containerId,omitempty"`
	HyperVGeneration    *HyperVGeneration       `json:"hyperVGeneration,omitempty"`
	Identifier          *GalleryImageIdentifier `json:"identifier,omitempty"`
	ImagePath           *string                 `json:"imagePath,omitempty"`
	OsType              OperatingSystemTypes    `json:"osType"`
	ProvisioningState   *ProvisioningStateEnum  `json:"provisioningState,omitempty"`
	Status              *GalleryImageStatus     `json:"status,omitempty"`
	Version             *GalleryImageVersion    `json:"version,omitempty"`
}

type GalleryImageStatus

type GalleryImageStatus struct {
	DownloadStatus     *GalleryImageStatusDownloadStatus     `json:"downloadStatus,omitempty"`
	ErrorCode          *string                               `json:"errorCode,omitempty"`
	ErrorMessage       *string                               `json:"errorMessage,omitempty"`
	ProgressPercentage *int64                                `json:"progressPercentage,omitempty"`
	ProvisioningStatus *GalleryImageStatusProvisioningStatus `json:"provisioningStatus,omitempty"`
}

type GalleryImageStatusDownloadStatus

type GalleryImageStatusDownloadStatus struct {
	DownloadSizeInMB *int64 `json:"downloadSizeInMB,omitempty"`
}

type GalleryImageStatusProvisioningStatus

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

type GalleryImageVersion

type GalleryImageVersion struct {
	Name       *string                        `json:"name,omitempty"`
	Properties *GalleryImageVersionProperties `json:"properties,omitempty"`
}

type GalleryImageVersionProperties

type GalleryImageVersionProperties struct {
	StorageProfile GalleryImageVersionStorageProfile `json:"storageProfile"`
}

type GalleryImageVersionStorageProfile

type GalleryImageVersionStorageProfile struct {
	OsDiskImage *GalleryDiskImage `json:"osDiskImage,omitempty"`
}

type GalleryImages

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

type GalleryImagesClient

type GalleryImagesClient struct {
	Client *resourcemanager.Client
}

func NewGalleryImagesClientWithBaseURI

func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error)

func (GalleryImagesClient) CreateOrUpdate

CreateOrUpdate ...

func (GalleryImagesClient) CreateOrUpdateThenPoll

func (c GalleryImagesClient) CreateOrUpdateThenPoll(ctx context.Context, id GalleryImageId, input GalleryImages) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (GalleryImagesClient) Delete

Delete ...

func (GalleryImagesClient) DeleteThenPoll

func (c GalleryImagesClient) DeleteThenPoll(ctx context.Context, id GalleryImageId) error

DeleteThenPoll performs Delete then polls until it's completed

func (GalleryImagesClient) Get

Get ...

func (GalleryImagesClient) List

List ...

func (GalleryImagesClient) ListAll

ListAll ...

func (GalleryImagesClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (GalleryImagesClient) ListAllCompleteMatchingPredicate

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

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GalleryImagesClient) ListComplete

ListComplete retrieves all the results into a single object

func (GalleryImagesClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GalleryImagesClient) Update

Update ...

func (GalleryImagesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type GalleryImagesOperationPredicate

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

func (GalleryImagesOperationPredicate) Matches

type GalleryImagesUpdateRequest

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

type GetOperationResponse

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

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              []GalleryImages
}

type ListAllOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type OperatingSystemTypes

type OperatingSystemTypes string
const (
	OperatingSystemTypesLinux   OperatingSystemTypes = "Linux"
	OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
)

func (*OperatingSystemTypes) UnmarshalJSON

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

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        *GalleryImages
}

Jump to

Keyboard shortcuts

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