labplan

package
v0.20240315.1084643 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2021-10-01-preview/labplan Documentation

The labplan SDK allows for interaction with the Azure Resource Manager Service labservices (API Version 2021-10-01-preview).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2021-10-01-preview/labplan"

Client Initialization

client := labplan.NewLabPlanClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LabPlanClient.CreateOrUpdate

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

payload := labplan.LabPlan{
	// ...
}


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

Example Usage: LabPlanClient.Delete

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

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

Example Usage: LabPlanClient.Get

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

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: LabPlanClient.ListByResourceGroup

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

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

Example Usage: LabPlanClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: LabPlanClient.Update

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

payload := labplan.LabPlanUpdate{
	// ...
}


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 PossibleValuesForConnectionType

func PossibleValuesForConnectionType() []string

func PossibleValuesForEnableState

func PossibleValuesForEnableState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForShutdownOnIdleMode

func PossibleValuesForShutdownOnIdleMode() []string

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 AutoShutdownProfile

type AutoShutdownProfile struct {
	DisconnectDelay          *string             `json:"disconnectDelay,omitempty"`
	IdleDelay                *string             `json:"idleDelay,omitempty"`
	NoConnectDelay           *string             `json:"noConnectDelay,omitempty"`
	ShutdownOnDisconnect     *EnableState        `json:"shutdownOnDisconnect,omitempty"`
	ShutdownOnIdle           *ShutdownOnIdleMode `json:"shutdownOnIdle,omitempty"`
	ShutdownWhenNotConnected *EnableState        `json:"shutdownWhenNotConnected,omitempty"`
}

type ConnectionProfile

type ConnectionProfile struct {
	ClientRdpAccess *ConnectionType `json:"clientRdpAccess,omitempty"`
	ClientSshAccess *ConnectionType `json:"clientSshAccess,omitempty"`
	WebRdpAccess    *ConnectionType `json:"webRdpAccess,omitempty"`
	WebSshAccess    *ConnectionType `json:"webSshAccess,omitempty"`
}

type ConnectionType

type ConnectionType string
const (
	ConnectionTypeNone    ConnectionType = "None"
	ConnectionTypePrivate ConnectionType = "Private"
	ConnectionTypePublic  ConnectionType = "Public"
)

func (*ConnectionType) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EnableState

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

func (*EnableState) UnmarshalJSON

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

type GetOperationResponse

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

type LabPlan

type LabPlan struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties LabPlanProperties      `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type LabPlanClient

type LabPlanClient struct {
	Client *resourcemanager.Client
}

func NewLabPlanClientWithBaseURI

func NewLabPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*LabPlanClient, error)

func (LabPlanClient) CreateOrUpdate

func (c LabPlanClient) CreateOrUpdate(ctx context.Context, id LabPlanId, input LabPlan) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (LabPlanClient) CreateOrUpdateThenPoll

func (c LabPlanClient) CreateOrUpdateThenPoll(ctx context.Context, id LabPlanId, input LabPlan) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (LabPlanClient) Delete

func (c LabPlanClient) Delete(ctx context.Context, id LabPlanId) (result DeleteOperationResponse, err error)

Delete ...

func (LabPlanClient) DeleteThenPoll

func (c LabPlanClient) DeleteThenPoll(ctx context.Context, id LabPlanId) error

DeleteThenPoll performs Delete then polls until it's completed

func (LabPlanClient) Get

func (c LabPlanClient) Get(ctx context.Context, id LabPlanId) (result GetOperationResponse, err error)

Get ...

func (LabPlanClient) ListByResourceGroup

ListByResourceGroup ...

func (LabPlanClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (LabPlanClient) ListByResourceGroupCompleteMatchingPredicate

func (c LabPlanClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LabPlanOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LabPlanClient) ListBySubscription

ListBySubscription ...

func (LabPlanClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (LabPlanClient) ListBySubscriptionCompleteMatchingPredicate

func (c LabPlanClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LabPlanOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LabPlanClient) Update

func (c LabPlanClient) Update(ctx context.Context, id LabPlanId, input LabPlanUpdate) (result UpdateOperationResponse, err error)

Update ...

func (LabPlanClient) UpdateThenPoll

func (c LabPlanClient) UpdateThenPoll(ctx context.Context, id LabPlanId, input LabPlanUpdate) error

UpdateThenPoll performs Update then polls until it's completed

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) FromParseResult

func (id *LabPlanId) FromParseResult(input resourceids.ParseResult) error

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 LabPlanNetworkProfile

type LabPlanNetworkProfile struct {
	SubnetId *string `json:"subnetId,omitempty"`
}

type LabPlanOperationPredicate

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

func (LabPlanOperationPredicate) Matches

func (p LabPlanOperationPredicate) Matches(input LabPlan) bool

type LabPlanProperties

type LabPlanProperties struct {
	AllowedRegions             *[]string              `json:"allowedRegions,omitempty"`
	DefaultAutoShutdownProfile *AutoShutdownProfile   `json:"defaultAutoShutdownProfile,omitempty"`
	DefaultConnectionProfile   *ConnectionProfile     `json:"defaultConnectionProfile,omitempty"`
	DefaultNetworkProfile      *LabPlanNetworkProfile `json:"defaultNetworkProfile,omitempty"`
	LinkedLmsInstance          *string                `json:"linkedLmsInstance,omitempty"`
	ProvisioningState          *ProvisioningState     `json:"provisioningState,omitempty"`
	SharedGalleryId            *string                `json:"sharedGalleryId,omitempty"`
	SupportInfo                *SupportInfo           `json:"supportInfo,omitempty"`
}

type LabPlanUpdate

type LabPlanUpdate struct {
	Properties *LabPlanUpdateProperties `json:"properties,omitempty"`
	Tags       *[]string                `json:"tags,omitempty"`
}

type LabPlanUpdateProperties

type LabPlanUpdateProperties struct {
	AllowedRegions             *[]string              `json:"allowedRegions,omitempty"`
	DefaultAutoShutdownProfile *AutoShutdownProfile   `json:"defaultAutoShutdownProfile,omitempty"`
	DefaultConnectionProfile   *ConnectionProfile     `json:"defaultConnectionProfile,omitempty"`
	DefaultNetworkProfile      *LabPlanNetworkProfile `json:"defaultNetworkProfile,omitempty"`
	LinkedLmsInstance          *string                `json:"linkedLmsInstance,omitempty"`
	SharedGalleryId            *string                `json:"sharedGalleryId,omitempty"`
	SupportInfo                *SupportInfo           `json:"supportInfo,omitempty"`
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LabPlan
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LabPlan
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LabPlan
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LabPlan
}

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON

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

type ShutdownOnIdleMode

type ShutdownOnIdleMode string
const (
	ShutdownOnIdleModeLowUsage    ShutdownOnIdleMode = "LowUsage"
	ShutdownOnIdleModeNone        ShutdownOnIdleMode = "None"
	ShutdownOnIdleModeUserAbsence ShutdownOnIdleMode = "UserAbsence"
)

func (*ShutdownOnIdleMode) UnmarshalJSON

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

type SupportInfo

type SupportInfo struct {
	Email        *string `json:"email,omitempty"`
	Instructions *string `json:"instructions,omitempty"`
	Phone        *string `json:"phone,omitempty"`
	Url          *string `json:"url,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LabPlan
}

Jump to

Keyboard shortcuts

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