images

package
v0.20231113.1151754 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images Documentation

The images SDK allows for interaction with the Azure Resource Manager Service devcenter (API Version 2023-04-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/devcenter/2023-04-01/images"

Client Initialization

client := images.NewImagesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ImagesClient.Get

ctx := context.TODO()
id := images.NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "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: ImagesClient.ListByDevCenter

ctx := context.TODO()
id := images.NewDevCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue")

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

Example Usage: ImagesClient.ListByGallery

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForHibernateSupport

func PossibleValuesForHibernateSupport() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateDevCenterID

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

ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID

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 DevCenterId

type DevCenterId struct {
	SubscriptionId    string
	ResourceGroupName string
	DevCenterName     string
}

DevCenterId is a struct representing the Resource ID for a Dev Center

func NewDevCenterID

func NewDevCenterID(subscriptionId string, resourceGroupName string, devCenterName string) DevCenterId

NewDevCenterID returns a new DevCenterId struct

func ParseDevCenterID

func ParseDevCenterID(input string) (*DevCenterId, error)

ParseDevCenterID parses 'input' into a DevCenterId

func ParseDevCenterIDInsensitively

func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error)

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

func (DevCenterId) ID

func (id DevCenterId) ID() string

ID returns the formatted Dev Center ID

func (DevCenterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Dev Center ID

func (DevCenterId) String

func (id DevCenterId) String() string

String returns a human-readable description of this Dev Center ID

type GalleryId

type GalleryId struct {
	SubscriptionId    string
	ResourceGroupName string
	DevCenterName     string
	GalleryName       string
}

GalleryId is a struct representing the Resource ID for a Gallery

func NewGalleryID

func NewGalleryID(subscriptionId string, resourceGroupName string, devCenterName 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 GetOperationResponse

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

type HibernateSupport

type HibernateSupport string
const (
	HibernateSupportDisabled HibernateSupport = "Disabled"
	HibernateSupportEnabled  HibernateSupport = "Enabled"
)

func (*HibernateSupport) UnmarshalJSON

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

type Image

type Image struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ImageProperties       `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ImageId

type ImageId struct {
	SubscriptionId    string
	ResourceGroupName string
	DevCenterName     string
	GalleryName       string
	ImageName         string
}

ImageId is a struct representing the Resource ID for a Image

func NewImageID

func NewImageID(subscriptionId string, resourceGroupName string, devCenterName string, galleryName 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 ImageOperationPredicate

type ImageOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ImageOperationPredicate) Matches

func (p ImageOperationPredicate) Matches(input Image) bool

type ImageProperties

type ImageProperties struct {
	Description                     *string                          `json:"description,omitempty"`
	HibernateSupport                *HibernateSupport                `json:"hibernateSupport,omitempty"`
	Offer                           *string                          `json:"offer,omitempty"`
	ProvisioningState               *ProvisioningState               `json:"provisioningState,omitempty"`
	Publisher                       *string                          `json:"publisher,omitempty"`
	RecommendedMachineConfiguration *RecommendedMachineConfiguration `json:"recommendedMachineConfiguration,omitempty"`
	Sku                             *string                          `json:"sku,omitempty"`
}

type ImagesClient

type ImagesClient struct {
	Client *resourcemanager.Client
}

func NewImagesClientWithBaseURI

func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error)

func (ImagesClient) Get

func (c ImagesClient) Get(ctx context.Context, id ImageId) (result GetOperationResponse, err error)

Get ...

func (ImagesClient) ListByDevCenter

ListByDevCenter ...

func (ImagesClient) ListByDevCenterComplete

ListByDevCenterComplete retrieves all the results into a single object

func (ImagesClient) ListByDevCenterCompleteMatchingPredicate

func (c ImagesClient) ListByDevCenterCompleteMatchingPredicate(ctx context.Context, id DevCenterId, options ListByDevCenterOperationOptions, predicate ImageOperationPredicate) (result ListByDevCenterCompleteResult, err error)

ListByDevCenterCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ImagesClient) ListByGallery

ListByGallery ...

func (ImagesClient) ListByGalleryComplete

ListByGalleryComplete retrieves all the results into a single object

func (ImagesClient) ListByGalleryCompleteMatchingPredicate

func (c ImagesClient) ListByGalleryCompleteMatchingPredicate(ctx context.Context, id GalleryId, options ListByGalleryOperationOptions, predicate ImageOperationPredicate) (result ListByGalleryCompleteResult, err error)

ListByGalleryCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByDevCenterCompleteResult

type ListByDevCenterCompleteResult struct {
	Items []Image
}

type ListByDevCenterOperationOptions

type ListByDevCenterOperationOptions struct {
	Top *int64
}

func DefaultListByDevCenterOperationOptions

func DefaultListByDevCenterOperationOptions() ListByDevCenterOperationOptions

func (ListByDevCenterOperationOptions) ToHeaders

func (ListByDevCenterOperationOptions) ToOData

func (ListByDevCenterOperationOptions) ToQuery

type ListByDevCenterOperationResponse

type ListByDevCenterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Image
}

type ListByGalleryCompleteResult

type ListByGalleryCompleteResult struct {
	Items []Image
}

type ListByGalleryOperationOptions

type ListByGalleryOperationOptions struct {
	Top *int64
}

func DefaultListByGalleryOperationOptions

func DefaultListByGalleryOperationOptions() ListByGalleryOperationOptions

func (ListByGalleryOperationOptions) ToHeaders

func (ListByGalleryOperationOptions) ToOData

func (ListByGalleryOperationOptions) ToQuery

type ListByGalleryOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted                  ProvisioningState = "Accepted"
	ProvisioningStateCanceled                  ProvisioningState = "Canceled"
	ProvisioningStateCreated                   ProvisioningState = "Created"
	ProvisioningStateCreating                  ProvisioningState = "Creating"
	ProvisioningStateDeleted                   ProvisioningState = "Deleted"
	ProvisioningStateDeleting                  ProvisioningState = "Deleting"
	ProvisioningStateFailed                    ProvisioningState = "Failed"
	ProvisioningStateMovingResources           ProvisioningState = "MovingResources"
	ProvisioningStateNotSpecified              ProvisioningState = "NotSpecified"
	ProvisioningStateRolloutInProgress         ProvisioningState = "RolloutInProgress"
	ProvisioningStateRunning                   ProvisioningState = "Running"
	ProvisioningStateStorageProvisioningFailed ProvisioningState = "StorageProvisioningFailed"
	ProvisioningStateSucceeded                 ProvisioningState = "Succeeded"
	ProvisioningStateTransientFailure          ProvisioningState = "TransientFailure"
	ProvisioningStateUpdated                   ProvisioningState = "Updated"
	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"`
}

Jump to

Keyboard shortcuts

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