galleryimages

package
v0.20221128.1190504 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MPL-2.0 Imports: 11 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-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.NewImageID("12345678-1234-9876-4563-123456789012", "locationValue", "galleryUniqueValue", "galleryImageValue")

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


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

Example Usage: GalleryImagesClient.Delete

ctx := context.TODO()
id := galleryimages.NewImageID("12345678-1234-9876-4563-123456789012", "locationValue", "galleryUniqueValue", "galleryImageValue")

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

Example Usage: GalleryImagesClient.Get

ctx := context.TODO()
id := galleryimages.NewImageID("12345678-1234-9876-4563-123456789012", "locationValue", "galleryUniqueValue", "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.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.NewImageID("12345678-1234-9876-4563-123456789012", "locationValue", "galleryUniqueValue", "galleryImageValue")

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 ValidateGalleryID

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

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

func ValidateImageID

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

ValidateImageID checks that 'input' can be parsed as a Image ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

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"`
	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 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"`
	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"`
	Recommended         *RecommendedMachineConfiguration `json:"recommended"`
	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"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type GalleryImagesClient

type GalleryImagesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewGalleryImagesClientWithBaseURI

func NewGalleryImagesClientWithBaseURI(endpoint string) GalleryImagesClient

func (GalleryImagesClient) CreateOrUpdate

func (c GalleryImagesClient) CreateOrUpdate(ctx context.Context, id ImageId, input GalleryImage) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (GalleryImagesClient) CreateOrUpdateThenPoll

func (c GalleryImagesClient) CreateOrUpdateThenPoll(ctx context.Context, id ImageId, input GalleryImage) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (GalleryImagesClient) Delete

func (c GalleryImagesClient) Delete(ctx context.Context, id ImageId) (result DeleteOperationResponse, err error)

Delete ...

func (GalleryImagesClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (GalleryImagesClient) Get

Get ...

func (GalleryImagesClient) ListByGallery

ListByGallery ...

func (GalleryImagesClient) ListByGalleryComplete

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

ListByGalleryComplete retrieves all of the results into a single object

func (GalleryImagesClient) ListByGalleryCompleteMatchingPredicate

func (c GalleryImagesClient) ListByGalleryCompleteMatchingPredicate(ctx context.Context, id GalleryId, predicate GalleryImageOperationPredicate) (resp ListByGalleryCompleteResult, err error)

ListByGalleryCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (GalleryImagesClient) Update

Update ...

func (GalleryImagesClient) UpdateThenPoll

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

UpdateThenPoll performs Update then polls until it's completed

type GetOperationResponse

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

type HyperVGeneration

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

type ImageId

type ImageId struct {
	SubscriptionId    string
	Location          string
	GalleryUniqueName string
	GalleryImageName  string
}

ImageId is a struct representing the Resource ID for a Image

func NewImageID

func NewImageID(subscriptionId string, location string, galleryUniqueName string, galleryImageName string) ImageId

NewImageID returns a new ImageId struct

func ParseImageID

func ParseImageID(input string) (*ImageId, error)

ParseImageID parses 'input' into a ImageId

func ParseImageIDInsensitively

func ParseImageIDInsensitively(input string) (*ImageId, error)

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

func (ImageId) ID

func (id ImageId) ID() string

ID returns the formatted Image ID

func (ImageId) Segments

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

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

func (ImageId) String

func (id ImageId) String() string

String returns a human-readable description of this Image ID

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
	Model        *[]GalleryImage
	// contains filtered or unexported fields
}

func (ListByGalleryOperationResponse) HasMore

func (ListByGalleryOperationResponse) LoadMore

type OperatingSystemStateTypes

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

type OperatingSystemTypes

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

type ProvisioningState

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

type RecommendedMachineConfiguration

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

type ResourceRange

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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