galleryimageversions

package
v0.20230508.1171356 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

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

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

Client Initialization

client := galleryimageversions.NewGalleryImageVersionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GalleryImageVersionsClient.CreateOrUpdate

ctx := context.TODO()
id := galleryimageversions.NewVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "sharedGalleryValue", "imageValue", "versionValue")

payload := galleryimageversions.GalleryImageVersion{
	// ...
}


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

Example Usage: GalleryImageVersionsClient.Delete

ctx := context.TODO()
id := galleryimageversions.NewVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "sharedGalleryValue", "imageValue", "versionValue")

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

Example Usage: GalleryImageVersionsClient.Get

ctx := context.TODO()
id := galleryimageversions.NewVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "sharedGalleryValue", "imageValue", "versionValue")

read, err := client.Get(ctx, id, galleryimageversions.DefaultGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: GalleryImageVersionsClient.ListByGalleryImage

ctx := context.TODO()
id := galleryimageversions.NewImageID("12345678-1234-9876-4563-123456789012", "locationValue", "sharedGalleryValue", "imageValue")

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

Example Usage: GalleryImageVersionsClient.Update

ctx := context.TODO()
id := galleryimageversions.NewVersionID("12345678-1234-9876-4563-123456789012", "locationValue", "sharedGalleryValue", "imageValue", "versionValue")

payload := galleryimageversions.GalleryImageVersionUpdate{
	// ...
}


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 PossibleValuesForAggregatedReplicationState

func PossibleValuesForAggregatedReplicationState() []string

func PossibleValuesForHostCaching

func PossibleValuesForHostCaching() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForReplicationMode

func PossibleValuesForReplicationMode() []string

func PossibleValuesForReplicationState

func PossibleValuesForReplicationState() []string

func PossibleValuesForReplicationStatusTypes

func PossibleValuesForReplicationStatusTypes() []string

func PossibleValuesForStorageAccountType

func PossibleValuesForStorageAccountType() []string

func ValidateImageID

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

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

func ValidateVersionID

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

ValidateVersionID checks that 'input' can be parsed as a Version ID

Types

type AggregatedReplicationState

type AggregatedReplicationState string
const (
	AggregatedReplicationStateCompleted  AggregatedReplicationState = "Completed"
	AggregatedReplicationStateFailed     AggregatedReplicationState = "Failed"
	AggregatedReplicationStateInProgress AggregatedReplicationState = "InProgress"
	AggregatedReplicationStateUnknown    AggregatedReplicationState = "Unknown"
)

type CreateOrUpdateOperationResponse

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

type DataDiskImageEncryption

type DataDiskImageEncryption struct {
	DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"`
	Lun                 int64   `json:"lun"`
}

type DeleteOperationResponse

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

type DiskImageEncryption

type DiskImageEncryption struct {
	DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"`
}

type EncryptionImages

type EncryptionImages struct {
	DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
	OsDiskImage    *DiskImageEncryption       `json:"osDiskImage,omitempty"`
}

type GalleryArtifactPublishingProfileBase

type GalleryArtifactPublishingProfileBase struct {
	EndOfLifeDate      *string             `json:"endOfLifeDate,omitempty"`
	ExcludeFromLatest  *bool               `json:"excludeFromLatest,omitempty"`
	PublishedDate      *string             `json:"publishedDate,omitempty"`
	ReplicaCount       *int64              `json:"replicaCount,omitempty"`
	ReplicationMode    *ReplicationMode    `json:"replicationMode,omitempty"`
	StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"`
	TargetRegions      *[]TargetRegion     `json:"targetRegions,omitempty"`
}

func (*GalleryArtifactPublishingProfileBase) GetEndOfLifeDateAsTime

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

func (*GalleryArtifactPublishingProfileBase) GetPublishedDateAsTime

func (o *GalleryArtifactPublishingProfileBase) GetPublishedDateAsTime() (*time.Time, error)

func (*GalleryArtifactPublishingProfileBase) SetEndOfLifeDateAsTime

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

func (*GalleryArtifactPublishingProfileBase) SetPublishedDateAsTime

func (o *GalleryArtifactPublishingProfileBase) SetPublishedDateAsTime(input time.Time)

type GalleryArtifactVersionSource

type GalleryArtifactVersionSource struct {
	Id  *string `json:"id,omitempty"`
	Uri *string `json:"uri,omitempty"`
}

type GalleryDataDiskImage

type GalleryDataDiskImage struct {
	HostCaching *HostCaching                  `json:"hostCaching,omitempty"`
	Lun         int64                         `json:"lun"`
	SizeInGB    *int64                        `json:"sizeInGB,omitempty"`
	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
}

type GalleryDiskImage

type GalleryDiskImage struct {
	HostCaching *HostCaching                  `json:"hostCaching,omitempty"`
	SizeInGB    *int64                        `json:"sizeInGB,omitempty"`
	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
}

type GalleryImageVersion

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

type GalleryImageVersionOperationPredicate

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

func (GalleryImageVersionOperationPredicate) Matches

type GalleryImageVersionProperties

type GalleryImageVersionProperties struct {
	ProvisioningState *ProvisioningState                    `json:"provisioningState,omitempty"`
	PublishingProfile *GalleryArtifactPublishingProfileBase `json:"publishingProfile,omitempty"`
	ReplicationStatus *ReplicationStatus                    `json:"replicationStatus,omitempty"`
	StorageProfile    GalleryImageVersionStorageProfile     `json:"storageProfile"`
}

type GalleryImageVersionStorageProfile

type GalleryImageVersionStorageProfile struct {
	DataDiskImages *[]GalleryDataDiskImage       `json:"dataDiskImages,omitempty"`
	OsDiskImage    *GalleryDiskImage             `json:"osDiskImage,omitempty"`
	Source         *GalleryArtifactVersionSource `json:"source,omitempty"`
}

type GalleryImageVersionUpdate

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

type GalleryImageVersionsClient

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

func NewGalleryImageVersionsClientWithBaseURI

func NewGalleryImageVersionsClientWithBaseURI(endpoint string) GalleryImageVersionsClient

func (GalleryImageVersionsClient) CreateOrUpdate

CreateOrUpdate ...

func (GalleryImageVersionsClient) CreateOrUpdateThenPoll

func (c GalleryImageVersionsClient) CreateOrUpdateThenPoll(ctx context.Context, id VersionId, input GalleryImageVersion) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (GalleryImageVersionsClient) Delete

Delete ...

func (GalleryImageVersionsClient) DeleteThenPoll

func (c GalleryImageVersionsClient) DeleteThenPoll(ctx context.Context, id VersionId) error

DeleteThenPoll performs Delete then polls until it's completed

func (GalleryImageVersionsClient) Get

Get ...

func (GalleryImageVersionsClient) ListByGalleryImage

ListByGalleryImage ...

func (GalleryImageVersionsClient) ListByGalleryImageComplete

ListByGalleryImageComplete retrieves all of the results into a single object

func (GalleryImageVersionsClient) ListByGalleryImageCompleteMatchingPredicate

func (c GalleryImageVersionsClient) ListByGalleryImageCompleteMatchingPredicate(ctx context.Context, id ImageId, predicate GalleryImageVersionOperationPredicate) (resp ListByGalleryImageCompleteResult, err error)

ListByGalleryImageCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (GalleryImageVersionsClient) Update

Update ...

func (GalleryImageVersionsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type GetOperationOptions

type GetOperationOptions struct {
	Expand *ReplicationStatusTypes
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

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

type HostCaching

type HostCaching string
const (
	HostCachingNone      HostCaching = "None"
	HostCachingReadOnly  HostCaching = "ReadOnly"
	HostCachingReadWrite HostCaching = "ReadWrite"
)

type ImageId

type ImageId struct {
	SubscriptionId    string
	LocationName      string
	SharedGalleryName string
	ImageName         string
}

ImageId is a struct representing the Resource ID for a Image

func NewImageID

func NewImageID(subscriptionId string, locationName string, sharedGalleryName string, imageName 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 ListByGalleryImageCompleteResult

type ListByGalleryImageCompleteResult struct {
	Items []GalleryImageVersion
}

type ListByGalleryImageOperationResponse

type ListByGalleryImageOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]GalleryImageVersion
	// contains filtered or unexported fields
}

func (ListByGalleryImageOperationResponse) HasMore

func (ListByGalleryImageOperationResponse) LoadMore

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 RegionalReplicationStatus

type RegionalReplicationStatus struct {
	Details  *string           `json:"details,omitempty"`
	Progress *int64            `json:"progress,omitempty"`
	Region   *string           `json:"region,omitempty"`
	State    *ReplicationState `json:"state,omitempty"`
}

type ReplicationMode

type ReplicationMode string
const (
	ReplicationModeFull    ReplicationMode = "Full"
	ReplicationModeShallow ReplicationMode = "Shallow"
)

type ReplicationState

type ReplicationState string
const (
	ReplicationStateCompleted   ReplicationState = "Completed"
	ReplicationStateFailed      ReplicationState = "Failed"
	ReplicationStateReplicating ReplicationState = "Replicating"
	ReplicationStateUnknown     ReplicationState = "Unknown"
)

type ReplicationStatus

type ReplicationStatus struct {
	AggregatedState *AggregatedReplicationState  `json:"aggregatedState,omitempty"`
	Summary         *[]RegionalReplicationStatus `json:"summary,omitempty"`
}

type ReplicationStatusTypes

type ReplicationStatusTypes string
const (
	ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus"
)

type StorageAccountType

type StorageAccountType string
const (
	StorageAccountTypePremiumLRS  StorageAccountType = "Premium_LRS"
	StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
	StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS"
)

type TargetRegion

type TargetRegion struct {
	Encryption           *EncryptionImages   `json:"encryption,omitempty"`
	Name                 string              `json:"name"`
	RegionalReplicaCount *int64              `json:"regionalReplicaCount,omitempty"`
	StorageAccountType   *StorageAccountType `json:"storageAccountType,omitempty"`
}

type UpdateOperationResponse

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

type VersionId

type VersionId struct {
	SubscriptionId    string
	LocationName      string
	SharedGalleryName string
	ImageName         string
	VersionName       string
}

VersionId is a struct representing the Resource ID for a Version

func NewVersionID

func NewVersionID(subscriptionId string, locationName string, sharedGalleryName string, imageName string, versionName string) VersionId

NewVersionID returns a new VersionId struct

func ParseVersionID

func ParseVersionID(input string) (*VersionId, error)

ParseVersionID parses 'input' into a VersionId

func ParseVersionIDInsensitively

func ParseVersionIDInsensitively(input string) (*VersionId, error)

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

func (VersionId) ID

func (id VersionId) ID() string

ID returns the formatted Version ID

func (VersionId) Segments

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

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

func (VersionId) String

func (id VersionId) String() string

String returns a human-readable description of this Version ID

Jump to

Keyboard shortcuts

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