image

package
v0.20230525.1191903 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/image Documentation

The image SDK allows for interaction with the Azure Resource Manager Service labservices (API Version 2022-08-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/labservices/2022-08-01/image"

Client Initialization

client := image.NewImageClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ImageClient.CreateOrUpdate

ctx := context.TODO()
id := image.NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue", "imageValue")

payload := image.Image{
	// ...
}


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

Example Usage: ImageClient.Get

ctx := context.TODO()
id := image.NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue", "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: ImageClient.ListByLabPlan

ctx := context.TODO()
id := image.NewLabPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue")

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

Example Usage: ImageClient.Update

ctx := context.TODO()
id := image.NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labPlanValue", "imageValue")

payload := image.ImageUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEnableState

func PossibleValuesForEnableState() []string

func PossibleValuesForOsState

func PossibleValuesForOsState() []string

func PossibleValuesForOsType

func PossibleValuesForOsType() []string

func PossibleValuesForProvisioningState

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

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

ValidateLabPlanID checks that 'input' can be parsed as a Lab Plan ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Image
}

type EnableState

type EnableState string
const (
	EnableStateDisabled EnableState = "Disabled"
	EnableStateEnabled  EnableState = "Enabled"
)

type GetOperationResponse

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

type Image

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

type ImageClient

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

func NewImageClientWithBaseURI

func NewImageClientWithBaseURI(endpoint string) ImageClient

func (ImageClient) CreateOrUpdate

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

CreateOrUpdate ...

func (ImageClient) Get

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

Get ...

func (ImageClient) ListByLabPlan

func (c ImageClient) ListByLabPlan(ctx context.Context, id LabPlanId) (resp ListByLabPlanOperationResponse, err error)

ListByLabPlan ...

func (ImageClient) ListByLabPlanComplete

func (c ImageClient) ListByLabPlanComplete(ctx context.Context, id LabPlanId) (ListByLabPlanCompleteResult, error)

ListByLabPlanComplete retrieves all of the results into a single object

func (ImageClient) ListByLabPlanCompleteMatchingPredicate

func (c ImageClient) ListByLabPlanCompleteMatchingPredicate(ctx context.Context, id LabPlanId, predicate ImageOperationPredicate) (resp ListByLabPlanCompleteResult, err error)

ListByLabPlanCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ImageClient) Update

func (c ImageClient) Update(ctx context.Context, id ImageId, input ImageUpdate) (result UpdateOperationResponse, err error)

Update ...

type ImageId

type ImageId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabPlanName       string
	ImageName         string
}

ImageId is a struct representing the Resource ID for a Image

func NewImageID

func NewImageID(subscriptionId string, resourceGroupName string, labPlanName 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 {
	Author            *string            `json:"author,omitempty"`
	AvailableRegions  *[]string          `json:"availableRegions,omitempty"`
	Description       *string            `json:"description,omitempty"`
	DisplayName       *string            `json:"displayName,omitempty"`
	EnabledState      EnableState        `json:"enabledState"`
	IconUrl           *string            `json:"iconUrl,omitempty"`
	Offer             *string            `json:"offer,omitempty"`
	OsState           *OsState           `json:"osState,omitempty"`
	OsType            *OsType            `json:"osType,omitempty"`
	Plan              *string            `json:"plan,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Publisher         *string            `json:"publisher,omitempty"`
	SharedGalleryId   *string            `json:"sharedGalleryId,omitempty"`
	Sku               *string            `json:"sku,omitempty"`
	TermsStatus       *EnableState       `json:"termsStatus,omitempty"`
	Version           *string            `json:"version,omitempty"`
}

type ImageUpdate

type ImageUpdate struct {
	Properties *ImageUpdateProperties `json:"properties,omitempty"`
}

type ImageUpdateProperties

type ImageUpdateProperties struct {
	EnabledState *EnableState `json:"enabledState,omitempty"`
}

type LabPlanId

type LabPlanId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabPlanName       string
}

LabPlanId is a struct representing the Resource ID for a Lab Plan

func NewLabPlanID

func NewLabPlanID(subscriptionId string, resourceGroupName string, labPlanName string) LabPlanId

NewLabPlanID returns a new LabPlanId struct

func ParseLabPlanID

func ParseLabPlanID(input string) (*LabPlanId, error)

ParseLabPlanID parses 'input' into a LabPlanId

func ParseLabPlanIDInsensitively

func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error)

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

func (LabPlanId) ID

func (id LabPlanId) ID() string

ID returns the formatted Lab Plan ID

func (LabPlanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Lab Plan ID

func (LabPlanId) String

func (id LabPlanId) String() string

String returns a human-readable description of this Lab Plan ID

type ListByLabPlanCompleteResult

type ListByLabPlanCompleteResult struct {
	Items []Image
}

type ListByLabPlanOperationResponse

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

func (ListByLabPlanOperationResponse) HasMore

func (ListByLabPlanOperationResponse) LoadMore

type OsState

type OsState string
const (
	OsStateGeneralized OsState = "Generalized"
	OsStateSpecialized OsState = "Specialized"
)

type OsType

type OsType string
const (
	OsTypeLinux   OsType = "Linux"
	OsTypeWindows OsType = "Windows"
)

type ProvisioningState

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Image
}

Jump to

Keyboard shortcuts

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