galleryimages

package
v0.20240209.1120443 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleryimages Documentation

The galleryimages SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2021-07-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/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", "galleryValue", "imageValue")

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


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", "galleryValue", "imageValue")

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", "galleryValue", "imageValue")

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.ListByGallery

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

// alternatively `client.ListByGallery(ctx, id)` can be used to do batched pagination
items, err := client.ListByGalleryComplete(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", "galleryValue", "imageValue")

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


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 PossibleValuesForHyperVGeneration

func PossibleValuesForHyperVGeneration() []string

func PossibleValuesForOperatingSystemStateTypes

func PossibleValuesForOperatingSystemStateTypes() []string

func PossibleValuesForOperatingSystemTypes

func PossibleValuesForOperatingSystemTypes() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []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 CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Disallowed

type Disallowed struct {
	DiskTypes *[]string `json:"diskTypes,omitempty"`
}

type GalleryImage

type GalleryImage struct {
	Id         *string                 `json:"id,omitempty"`
	Location   string                  `json:"location"`
	Name       *string                 `json:"name,omitempty"`
	Properties *GalleryImageProperties `json:"properties,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type GalleryImageFeature

type GalleryImageFeature struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

type GalleryImageId

type GalleryImageId struct {
	SubscriptionId    string
	ResourceGroupName string
	GalleryName       string
	ImageName         string
}

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

func NewGalleryImageID

func NewGalleryImageID(subscriptionId string, resourceGroupName string, galleryName string, imageName 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 GalleryImageOperationPredicate

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

func (GalleryImageOperationPredicate) Matches

type GalleryImageProperties

type GalleryImageProperties struct {
	Description         *string                          `json:"description,omitempty"`
	Disallowed          *Disallowed                      `json:"disallowed,omitempty"`
	EndOfLifeDate       *string                          `json:"endOfLifeDate,omitempty"`
	Eula                *string                          `json:"eula,omitempty"`
	Features            *[]GalleryImageFeature           `json:"features,omitempty"`
	HyperVGeneration    *HyperVGeneration                `json:"hyperVGeneration,omitempty"`
	Identifier          GalleryImageIdentifier           `json:"identifier"`
	OsState             OperatingSystemStateTypes        `json:"osState"`
	OsType              OperatingSystemTypes             `json:"osType"`
	PrivacyStatementUri *string                          `json:"privacyStatementUri,omitempty"`
	ProvisioningState   *ProvisioningState               `json:"provisioningState,omitempty"`
	PurchasePlan        *ImagePurchasePlan               `json:"purchasePlan,omitempty"`
	Recommended         *RecommendedMachineConfiguration `json:"recommended,omitempty"`
	ReleaseNoteUri      *string                          `json:"releaseNoteUri,omitempty"`
}

func (*GalleryImageProperties) GetEndOfLifeDateAsTime

func (o *GalleryImageProperties) GetEndOfLifeDateAsTime() (*time.Time, error)

func (*GalleryImageProperties) SetEndOfLifeDateAsTime

func (o *GalleryImageProperties) SetEndOfLifeDateAsTime(input time.Time)

type GalleryImageUpdate

type GalleryImageUpdate struct {
	Id         *string                 `json:"id,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *GalleryImageProperties `json:"properties,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 GalleryImage) 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) ListByGallery

ListByGallery ...

func (GalleryImagesClient) ListByGalleryComplete

ListByGalleryComplete retrieves all the results into a single object

func (GalleryImagesClient) ListByGalleryCompleteMatchingPredicate

func (c GalleryImagesClient) ListByGalleryCompleteMatchingPredicate(ctx context.Context, id commonids.SharedImageGalleryId, predicate GalleryImageOperationPredicate) (result ListByGalleryCompleteResult, err error)

ListByGalleryCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GalleryImagesClient) Update

Update ...

func (GalleryImagesClient) UpdateThenPoll

func (c GalleryImagesClient) UpdateThenPoll(ctx context.Context, id GalleryImageId, input GalleryImageUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type GetOperationResponse

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

type HyperVGeneration

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

func (*HyperVGeneration) UnmarshalJSON

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

type ImagePurchasePlan

type ImagePurchasePlan struct {
	Name      *string `json:"name,omitempty"`
	Product   *string `json:"product,omitempty"`
	Publisher *string `json:"publisher,omitempty"`
}

type ListByGalleryCompleteResult

type ListByGalleryCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []GalleryImage
}

type ListByGalleryOperationResponse

type ListByGalleryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]GalleryImage
}

type OperatingSystemStateTypes

type OperatingSystemStateTypes string
const (
	OperatingSystemStateTypesGeneralized OperatingSystemStateTypes = "Generalized"
	OperatingSystemStateTypesSpecialized OperatingSystemStateTypes = "Specialized"
)

func (*OperatingSystemStateTypes) UnmarshalJSON

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

type OperatingSystemTypes

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

func (*OperatingSystemTypes) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMigrating ProvisioningState = "Migrating"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RecommendedMachineConfiguration

type RecommendedMachineConfiguration struct {
	Memory *ResourceRange `json:"memory,omitempty"`
	VCPUs  *ResourceRange `json:"vCPUs,omitempty"`
}

type ResourceRange

type ResourceRange struct {
	Max *int64 `json:"max,omitempty"`
	Min *int64 `json:"min,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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