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 ¶
- func PossibleValuesForConnectionType() []string
- func PossibleValuesForEnableState() []string
- func PossibleValuesForProvisioningState() []string
- func PossibleValuesForShutdownOnIdleMode() []string
- func ValidateLabPlanID(input interface{}, key string) (warnings []string, errors []error)
- type AutoShutdownProfile
- type ConnectionProfile
- type ConnectionType
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type EnableState
- type GetOperationResponse
- type LabPlan
- type LabPlanClient
- func (c LabPlanClient) CreateOrUpdate(ctx context.Context, id LabPlanId, input LabPlan) (result CreateOrUpdateOperationResponse, err error)
- func (c LabPlanClient) CreateOrUpdateThenPoll(ctx context.Context, id LabPlanId, input LabPlan) error
- func (c LabPlanClient) Delete(ctx context.Context, id LabPlanId) (result DeleteOperationResponse, err error)
- func (c LabPlanClient) DeleteThenPoll(ctx context.Context, id LabPlanId) error
- func (c LabPlanClient) Get(ctx context.Context, id LabPlanId) (result GetOperationResponse, err error)
- func (c LabPlanClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c LabPlanClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c LabPlanClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c LabPlanClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
- func (c LabPlanClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c LabPlanClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListBySubscriptionCompleteResult, err error)
- func (c LabPlanClient) Update(ctx context.Context, id LabPlanId, input LabPlanUpdate) (result UpdateOperationResponse, err error)
- func (c LabPlanClient) UpdateThenPoll(ctx context.Context, id LabPlanId, input LabPlanUpdate) error
- type LabPlanId
- type LabPlanNetworkProfile
- type LabPlanOperationPredicate
- type LabPlanProperties
- type LabPlanUpdate
- type LabPlanUpdateProperties
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type ProvisioningState
- type ShutdownOnIdleMode
- type SupportInfo
- type UpdateOperationResponse
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 ¶
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 DeleteOperationResponse ¶
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 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 ¶
func (c LabPlanClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (LabPlanClient) ListByResourceGroupComplete ¶
func (c LabPlanClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c LabPlanClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (LabPlanClient) ListBySubscriptionComplete ¶
func (c LabPlanClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
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 ¶
LabPlanId is a struct representing the Resource ID for a Lab Plan
func NewLabPlanID ¶
NewLabPlanID returns a new LabPlanId struct
func ParseLabPlanID ¶
ParseLabPlanID parses 'input' into a LabPlanId
func ParseLabPlanIDInsensitively ¶
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) Segments ¶
func (id LabPlanId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Lab Plan ID
type LabPlanNetworkProfile ¶
type LabPlanNetworkProfile struct {
SubnetId *string `json:"subnetId,omitempty"`
}
type LabPlanOperationPredicate ¶
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"` 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"` SupportInfo *SupportInfo `json:"supportInfo,omitempty"` }
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 ¶
Source Files ¶
- client.go
- constants.go
- id_labplan.go
- method_createorupdate.go
- method_delete.go
- method_get.go
- method_listbyresourcegroup.go
- method_listbysubscription.go
- method_update.go
- model_autoshutdownprofile.go
- model_connectionprofile.go
- model_labplan.go
- model_labplannetworkprofile.go
- model_labplanproperties.go
- model_labplanupdate.go
- model_labplanupdateproperties.go
- model_supportinfo.go
- predicates.go
- version.go