galleryimages

package
v0.20230809.1073815 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryimages Documentation

The galleryimages SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2022-03-03).

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/compute/2022-03-03/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 := galleryimages.NewGalleryID("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 PossibleValuesForArchitecture

func PossibleValuesForArchitecture() []string

func PossibleValuesForGalleryProvisioningState

func PossibleValuesForGalleryProvisioningState() []string

func PossibleValuesForHyperVGeneration

func PossibleValuesForHyperVGeneration() []string

func PossibleValuesForOperatingSystemStateTypes

func PossibleValuesForOperatingSystemStateTypes() []string

func PossibleValuesForOperatingSystemTypes

func PossibleValuesForOperatingSystemTypes() []string

func ValidateGalleryID

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

ValidateGalleryID checks that 'input' can be parsed as a Gallery ID

func ValidateGalleryImageID added in v0.20230523.1140858

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

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

Types

type Architecture

type Architecture string
const (
	ArchitectureArmSixFour Architecture = "Arm64"
	ArchitectureXSixFour   Architecture = "x64"
)

func (*Architecture) UnmarshalJSON added in v0.20230808.1103829

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

type CreateOrUpdateOperationResponse

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

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 GalleryId

type GalleryId struct {
	SubscriptionId    string
	ResourceGroupName string
	GalleryName       string
}

GalleryId is a struct representing the Resource ID for a Gallery

func NewGalleryID

func NewGalleryID(subscriptionId string, resourceGroupName string, galleryName string) GalleryId

NewGalleryID returns a new GalleryId struct

func ParseGalleryID

func ParseGalleryID(input string) (*GalleryId, error)

ParseGalleryID parses 'input' into a GalleryId

func ParseGalleryIDInsensitively

func ParseGalleryIDInsensitively(input string) (*GalleryId, error)

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

func (GalleryId) ID

func (id GalleryId) ID() string

ID returns the formatted Gallery ID

func (GalleryId) Segments

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

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

func (GalleryId) String

func (id GalleryId) String() string

String returns a human-readable description of this Gallery ID

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 added in v0.20230523.1140858

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 added in v0.20230523.1140858

func NewGalleryImageID(subscriptionId string, resourceGroupName string, galleryName string, imageName string) GalleryImageId

NewGalleryImageID returns a new GalleryImageId struct

func ParseGalleryImageID added in v0.20230523.1140858

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

ParseGalleryImageID parses 'input' into a GalleryImageId

func ParseGalleryImageIDInsensitively added in v0.20230523.1140858

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) ID added in v0.20230523.1140858

func (id GalleryImageId) ID() string

ID returns the formatted Gallery Image ID

func (GalleryImageId) Segments added in v0.20230523.1140858

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

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

func (GalleryImageId) String added in v0.20230523.1140858

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 {
	Architecture        *Architecture                    `json:"architecture,omitempty"`
	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   *GalleryProvisioningState        `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

func (c GalleryImagesClient) ListByGallery(ctx context.Context, id GalleryId) (result ListByGalleryOperationResponse, err error)

ListByGallery ...

func (GalleryImagesClient) ListByGalleryComplete

func (c GalleryImagesClient) ListByGalleryComplete(ctx context.Context, id GalleryId) (ListByGalleryCompleteResult, error)

ListByGalleryComplete retrieves all the results into a single object

func (GalleryImagesClient) ListByGalleryCompleteMatchingPredicate

func (c GalleryImagesClient) ListByGalleryCompleteMatchingPredicate(ctx context.Context, id GalleryId, 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 GalleryProvisioningState

type GalleryProvisioningState string
const (
	GalleryProvisioningStateCreating  GalleryProvisioningState = "Creating"
	GalleryProvisioningStateDeleting  GalleryProvisioningState = "Deleting"
	GalleryProvisioningStateFailed    GalleryProvisioningState = "Failed"
	GalleryProvisioningStateMigrating GalleryProvisioningState = "Migrating"
	GalleryProvisioningStateSucceeded GalleryProvisioningState = "Succeeded"
	GalleryProvisioningStateUpdating  GalleryProvisioningState = "Updating"
)

func (*GalleryProvisioningState) UnmarshalJSON added in v0.20230808.1103829

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

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 added in v0.20230808.1103829

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 {
	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 added in v0.20230808.1103829

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

type OperatingSystemTypes

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

func (*OperatingSystemTypes) UnmarshalJSON added in v0.20230808.1103829

func (s *OperatingSystemTypes) 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
}

Jump to

Keyboard shortcuts

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