Documentation ¶
Index ¶
- type ActionType
- type AutoShutdownProfile
- type ClientFactory
- func (c *ClientFactory) NewImagesClient() *ImagesClient
- func (c *ClientFactory) NewLabPlansClient() *LabPlansClient
- func (c *ClientFactory) NewLabsClient() *LabsClient
- func (c *ClientFactory) NewOperationResultsClient() *OperationResultsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewSKUsClient() *SKUsClient
- func (c *ClientFactory) NewSchedulesClient() *SchedulesClient
- func (c *ClientFactory) NewUsagesClient() *UsagesClient
- func (c *ClientFactory) NewUsersClient() *UsersClient
- func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
- type ConnectionProfile
- type ConnectionType
- type CreateOption
- type CreatedByType
- type Credentials
- type EnableState
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type Identity
- type Image
- type ImageProperties
- type ImageReference
- type ImageUpdate
- type ImageUpdateProperties
- type ImagesClient
- func (client *ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labPlanName string, ...) (ImagesClientCreateOrUpdateResponse, error)
- func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, labPlanName string, ...) (ImagesClientGetResponse, error)
- func (client *ImagesClient) NewListByLabPlanPager(resourceGroupName string, labPlanName string, ...) *runtime.Pager[ImagesClientListByLabPlanResponse]
- func (client *ImagesClient) Update(ctx context.Context, resourceGroupName string, labPlanName string, ...) (ImagesClientUpdateResponse, error)
- type ImagesClientCreateOrUpdateOptions
- type ImagesClientCreateOrUpdateResponse
- type ImagesClientGetOptions
- type ImagesClientGetResponse
- type ImagesClientListByLabPlanOptions
- type ImagesClientListByLabPlanResponse
- type ImagesClientUpdateOptions
- type ImagesClientUpdateResponse
- type InvitationState
- type InviteBody
- type Lab
- type LabNetworkProfile
- type LabPlan
- type LabPlanNetworkProfile
- type LabPlanProperties
- type LabPlanUpdate
- type LabPlanUpdateProperties
- type LabPlansClient
- func (client *LabPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, labPlanName string, ...) (*runtime.Poller[LabPlansClientCreateOrUpdateResponse], error)
- func (client *LabPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, labPlanName string, ...) (*runtime.Poller[LabPlansClientDeleteResponse], error)
- func (client *LabPlansClient) BeginSaveImage(ctx context.Context, resourceGroupName string, labPlanName string, ...) (*runtime.Poller[LabPlansClientSaveImageResponse], error)
- func (client *LabPlansClient) BeginUpdate(ctx context.Context, resourceGroupName string, labPlanName string, ...) (*runtime.Poller[LabPlansClientUpdateResponse], error)
- func (client *LabPlansClient) Get(ctx context.Context, resourceGroupName string, labPlanName string, ...) (LabPlansClientGetResponse, error)
- func (client *LabPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *LabPlansClientListByResourceGroupOptions) *runtime.Pager[LabPlansClientListByResourceGroupResponse]
- func (client *LabPlansClient) NewListBySubscriptionPager(options *LabPlansClientListBySubscriptionOptions) *runtime.Pager[LabPlansClientListBySubscriptionResponse]
- type LabPlansClientBeginCreateOrUpdateOptions
- type LabPlansClientBeginDeleteOptions
- type LabPlansClientBeginSaveImageOptions
- type LabPlansClientBeginUpdateOptions
- type LabPlansClientCreateOrUpdateResponse
- type LabPlansClientDeleteResponse
- type LabPlansClientGetOptions
- type LabPlansClientGetResponse
- type LabPlansClientListByResourceGroupOptions
- type LabPlansClientListByResourceGroupResponse
- type LabPlansClientListBySubscriptionOptions
- type LabPlansClientListBySubscriptionResponse
- type LabPlansClientSaveImageResponse
- type LabPlansClientUpdateResponse
- type LabProperties
- type LabServicesSKUTier
- type LabState
- type LabUpdate
- type LabUpdateProperties
- type LabsClient
- func (client *LabsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, body Lab, ...) (*runtime.Poller[LabsClientCreateOrUpdateResponse], error)
- func (client *LabsClient) BeginDelete(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[LabsClientDeleteResponse], error)
- func (client *LabsClient) BeginPublish(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[LabsClientPublishResponse], error)
- func (client *LabsClient) BeginSyncGroup(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[LabsClientSyncGroupResponse], error)
- func (client *LabsClient) BeginUpdate(ctx context.Context, resourceGroupName string, labName string, body LabUpdate, ...) (*runtime.Poller[LabsClientUpdateResponse], error)
- func (client *LabsClient) Get(ctx context.Context, resourceGroupName string, labName string, ...) (LabsClientGetResponse, error)
- func (client *LabsClient) NewListByResourceGroupPager(resourceGroupName string, options *LabsClientListByResourceGroupOptions) *runtime.Pager[LabsClientListByResourceGroupResponse]
- func (client *LabsClient) NewListBySubscriptionPager(options *LabsClientListBySubscriptionOptions) *runtime.Pager[LabsClientListBySubscriptionResponse]
- type LabsClientBeginCreateOrUpdateOptions
- type LabsClientBeginDeleteOptions
- type LabsClientBeginPublishOptions
- type LabsClientBeginSyncGroupOptions
- type LabsClientBeginUpdateOptions
- type LabsClientCreateOrUpdateResponse
- type LabsClientDeleteResponse
- type LabsClientGetOptions
- type LabsClientGetResponse
- type LabsClientListByResourceGroupOptions
- type LabsClientListByResourceGroupResponse
- type LabsClientListBySubscriptionOptions
- type LabsClientListBySubscriptionResponse
- type LabsClientPublishResponse
- type LabsClientSyncGroupResponse
- type LabsClientUpdateResponse
- type ListUsagesResult
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationResult
- type OperationResultsClient
- type OperationResultsClientGetOptions
- type OperationResultsClientGetResponse
- type OperationStatus
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type OsState
- type OsType
- type PagedImages
- type PagedLabPlans
- type PagedLabs
- type PagedSKUInfos
- type PagedSchedules
- type PagedUsers
- type PagedVirtualMachines
- type ProvisioningState
- type ProxyResource
- type RecurrenceFrequency
- type RecurrencePattern
- type RegistrationState
- type ResetPasswordBody
- type Resource
- type RestrictionReasonCode
- type RestrictionType
- type RosterProfile
- type SKU
- type SKUCapabilities
- type SKUCapacity
- type SKUCost
- type SKUInfo
- type SKURestrictions
- type SKUTier
- type SKUsClient
- type SKUsClientListOptions
- type SKUsClientListResponse
- type SaveImageBody
- type ScaleType
- type Schedule
- type ScheduleProperties
- type ScheduleUpdate
- type ScheduleUpdateProperties
- type SchedulesClient
- func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[SchedulesClientDeleteResponse], error)
- func (client *SchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, ...) (SchedulesClientCreateOrUpdateResponse, error)
- func (client *SchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, ...) (SchedulesClientGetResponse, error)
- func (client *SchedulesClient) NewListByLabPager(resourceGroupName string, labName string, ...) *runtime.Pager[SchedulesClientListByLabResponse]
- func (client *SchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, ...) (SchedulesClientUpdateResponse, error)
- type SchedulesClientBeginDeleteOptions
- type SchedulesClientCreateOrUpdateOptions
- type SchedulesClientCreateOrUpdateResponse
- type SchedulesClientDeleteResponse
- type SchedulesClientGetOptions
- type SchedulesClientGetResponse
- type SchedulesClientListByLabOptions
- type SchedulesClientListByLabResponse
- type SchedulesClientUpdateOptions
- type SchedulesClientUpdateResponse
- type SecurityProfile
- type ShutdownOnIdleMode
- type SupportInfo
- type SystemData
- type TrackedResource
- type TrackedResourceUpdate
- type Usage
- type UsageName
- type UsageUnit
- type UsagesClient
- type UsagesClientListByLocationOptions
- type UsagesClientListByLocationResponse
- type User
- type UserProperties
- type UserUpdate
- type UserUpdateProperties
- type UsersClient
- func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, ...) (*runtime.Poller[UsersClientCreateOrUpdateResponse], error)
- func (client *UsersClient) BeginDelete(ctx context.Context, resourceGroupName string, labName string, userName string, ...) (*runtime.Poller[UsersClientDeleteResponse], error)
- func (client *UsersClient) BeginInvite(ctx context.Context, resourceGroupName string, labName string, userName string, ...) (*runtime.Poller[UsersClientInviteResponse], error)
- func (client *UsersClient) BeginUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, ...) (*runtime.Poller[UsersClientUpdateResponse], error)
- func (client *UsersClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, ...) (UsersClientGetResponse, error)
- func (client *UsersClient) NewListByLabPager(resourceGroupName string, labName string, options *UsersClientListByLabOptions) *runtime.Pager[UsersClientListByLabResponse]
- type UsersClientBeginCreateOrUpdateOptions
- type UsersClientBeginDeleteOptions
- type UsersClientBeginInviteOptions
- type UsersClientBeginUpdateOptions
- type UsersClientCreateOrUpdateResponse
- type UsersClientDeleteResponse
- type UsersClientGetOptions
- type UsersClientGetResponse
- type UsersClientInviteResponse
- type UsersClientListByLabOptions
- type UsersClientListByLabResponse
- type UsersClientUpdateResponse
- type VirtualMachine
- type VirtualMachineAdditionalCapabilities
- type VirtualMachineConnectionProfile
- type VirtualMachineProfile
- type VirtualMachineProperties
- type VirtualMachineState
- type VirtualMachineType
- type VirtualMachinesClient
- func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[VirtualMachinesClientRedeployResponse], error)
- func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[VirtualMachinesClientReimageResponse], error)
- func (client *VirtualMachinesClient) BeginResetPassword(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[VirtualMachinesClientResetPasswordResponse], error)
- func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
- func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, labName string, ...) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
- func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, labName string, ...) (VirtualMachinesClientGetResponse, error)
- func (client *VirtualMachinesClient) NewListByLabPager(resourceGroupName string, labName string, ...) *runtime.Pager[VirtualMachinesClientListByLabResponse]
- type VirtualMachinesClientBeginRedeployOptions
- type VirtualMachinesClientBeginReimageOptions
- type VirtualMachinesClientBeginResetPasswordOptions
- type VirtualMachinesClientBeginStartOptions
- type VirtualMachinesClientBeginStopOptions
- type VirtualMachinesClientGetOptions
- type VirtualMachinesClientGetResponse
- type VirtualMachinesClientListByLabOptions
- type VirtualMachinesClientListByLabResponse
- type VirtualMachinesClientRedeployResponse
- type VirtualMachinesClientReimageResponse
- type VirtualMachinesClientResetPasswordResponse
- type VirtualMachinesClientStartResponse
- type VirtualMachinesClientStopResponse
- type WeekDay
Examples ¶
- ImagesClient.CreateOrUpdate
- ImagesClient.Get
- ImagesClient.NewListByLabPlanPager
- ImagesClient.Update
- LabPlansClient.BeginCreateOrUpdate
- LabPlansClient.BeginDelete
- LabPlansClient.BeginSaveImage
- LabPlansClient.BeginUpdate
- LabPlansClient.Get
- LabPlansClient.NewListByResourceGroupPager
- LabPlansClient.NewListBySubscriptionPager
- LabsClient.BeginCreateOrUpdate
- LabsClient.BeginDelete
- LabsClient.BeginPublish
- LabsClient.BeginSyncGroup
- LabsClient.BeginUpdate
- LabsClient.Get
- LabsClient.NewListByResourceGroupPager
- LabsClient.NewListBySubscriptionPager
- OperationResultsClient.Get
- OperationsClient.NewListPager
- SKUsClient.NewListPager
- SchedulesClient.BeginDelete
- SchedulesClient.CreateOrUpdate
- SchedulesClient.Get
- SchedulesClient.NewListByLabPager
- SchedulesClient.Update
- UsagesClient.NewListByLocationPager
- UsersClient.BeginCreateOrUpdate
- UsersClient.BeginDelete
- UsersClient.BeginInvite
- UsersClient.BeginUpdate
- UsersClient.Get
- UsersClient.NewListByLabPager
- VirtualMachinesClient.BeginRedeploy
- VirtualMachinesClient.BeginReimage
- VirtualMachinesClient.BeginResetPassword
- VirtualMachinesClient.BeginStart
- VirtualMachinesClient.BeginStop
- VirtualMachinesClient.Get
- VirtualMachinesClient.NewListByLabPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type AutoShutdownProfile ¶
type AutoShutdownProfile struct { // The amount of time a VM will stay running after a user disconnects if this behavior is enabled. DisconnectDelay *string // The amount of time a VM will idle before it is shutdown if this behavior is enabled. IdleDelay *string // The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled. NoConnectDelay *string // Whether shutdown on disconnect is enabled ShutdownOnDisconnect *EnableState // Whether a VM will get shutdown when it has idled for a period of time. ShutdownOnIdle *ShutdownOnIdleMode // Whether a VM will get shutdown when it hasn't been connected to after a period of time. ShutdownWhenNotConnected *EnableState }
AutoShutdownProfile - Profile for how to handle shutting down virtual machines.
func (AutoShutdownProfile) MarshalJSON ¶ added in v1.0.0
func (a AutoShutdownProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoShutdownProfile.
func (*AutoShutdownProfile) UnmarshalJSON ¶ added in v1.0.0
func (a *AutoShutdownProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoShutdownProfile.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewImagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewImagesClient() *ImagesClient
NewImagesClient creates a new instance of ImagesClient.
func (*ClientFactory) NewLabPlansClient ¶ added in v1.1.0
func (c *ClientFactory) NewLabPlansClient() *LabPlansClient
NewLabPlansClient creates a new instance of LabPlansClient.
func (*ClientFactory) NewLabsClient ¶ added in v1.1.0
func (c *ClientFactory) NewLabsClient() *LabsClient
NewLabsClient creates a new instance of LabsClient.
func (*ClientFactory) NewOperationResultsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationResultsClient() *OperationResultsClient
NewOperationResultsClient creates a new instance of OperationResultsClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewSKUsClient ¶ added in v1.1.0
func (c *ClientFactory) NewSKUsClient() *SKUsClient
NewSKUsClient creates a new instance of SKUsClient.
func (*ClientFactory) NewSchedulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewSchedulesClient() *SchedulesClient
NewSchedulesClient creates a new instance of SchedulesClient.
func (*ClientFactory) NewUsagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewUsagesClient() *UsagesClient
NewUsagesClient creates a new instance of UsagesClient.
func (*ClientFactory) NewUsersClient ¶ added in v1.1.0
func (c *ClientFactory) NewUsersClient() *UsersClient
NewUsersClient creates a new instance of UsersClient.
func (*ClientFactory) NewVirtualMachinesClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.
type ConnectionProfile ¶
type ConnectionProfile struct { // The enabled access level for Client Access over RDP. ClientRdpAccess *ConnectionType // The enabled access level for Client Access over SSH. ClientSSHAccess *ConnectionType // The enabled access level for Web Access over RDP. WebRdpAccess *ConnectionType // The enabled access level for Web Access over SSH. WebSSHAccess *ConnectionType }
ConnectionProfile - Connection profile for how users connect to lab virtual machines.
func (ConnectionProfile) MarshalJSON ¶ added in v1.0.0
func (c ConnectionProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectionProfile.
func (*ConnectionProfile) UnmarshalJSON ¶ added in v1.0.0
func (c *ConnectionProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionProfile.
type ConnectionType ¶
type ConnectionType string
ConnectionType - A connection type for access labs and VMs (Public, Private or None).
const ( ConnectionTypeNone ConnectionType = "None" ConnectionTypePrivate ConnectionType = "Private" ConnectionTypePublic ConnectionType = "Public" )
func PossibleConnectionTypeValues ¶
func PossibleConnectionTypeValues() []ConnectionType
PossibleConnectionTypeValues returns the possible values for the ConnectionType const type.
type CreateOption ¶
type CreateOption string
CreateOption - Indicates what lab virtual machines are created from.
const ( // CreateOptionImage - An image is used to create all lab user virtual machines. When this option is set, no template VM will // be created. CreateOptionImage CreateOption = "Image" // CreateOptionTemplateVM - A template VM will be used to create all lab user virtual machines. CreateOptionTemplateVM CreateOption = "TemplateVM" )
func PossibleCreateOptionValues ¶
func PossibleCreateOptionValues() []CreateOption
PossibleCreateOptionValues returns the possible values for the CreateOption const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type Credentials ¶
type Credentials struct { // REQUIRED; The username to use when signing in to lab VMs. Username *string // The password for the user. This is required for the TemplateVM createOption. Password *string }
Credentials for a user on a lab VM.
func (Credentials) MarshalJSON ¶ added in v1.0.0
func (c Credentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Credentials.
func (*Credentials) UnmarshalJSON ¶ added in v1.0.0
func (c *Credentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Credentials.
type EnableState ¶
type EnableState string
EnableState - Property enabled state.
const ( EnableStateDisabled EnableState = "Disabled" EnableStateEnabled EnableState = "Enabled" )
func PossibleEnableStateValues ¶
func PossibleEnableStateValues() []EnableState
PossibleEnableStateValues returns the possible values for the EnableState const type.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v1.0.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v1.0.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶ added in v1.0.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
func (ErrorResponse) MarshalJSON ¶ added in v1.0.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.0.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type Identity ¶ added in v1.0.0
type Identity struct { // The identity type. Type *string // READ-ONLY; The principal ID of resource identity. PrincipalID *string // READ-ONLY; The tenant ID of resource. TenantID *string }
Identity for the resource.
func (Identity) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaller interface for type Identity.
func (*Identity) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Identity.
type Image ¶
type Image struct { // REQUIRED; Image resource properties Properties *ImageProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the image. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Image - Lab services virtual machine image
func (Image) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Image.
func (*Image) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Image.
type ImageProperties ¶
type ImageProperties struct { // The available regions of the image in the shared gallery. AvailableRegions []*string // Is the image enabled EnabledState *EnableState // READ-ONLY; The image author. Author *string // READ-ONLY; A description of the image. Description *string // READ-ONLY; The image display name. DisplayName *string // READ-ONLY; URL of the image icon. IconURL *string // READ-ONLY; The OS State of the image. OSState *OsState // READ-ONLY; The OS Type of the image. OSType *OsType // READ-ONLY; The ID of an offer associated with the image. Offer *string // READ-ONLY; The ID of marketplace plan associated with the image (optional). Plan *string // READ-ONLY; Current provisioning state of the image. ProvisioningState *ProvisioningState // READ-ONLY; The ID of the publisher of the image. Publisher *string // READ-ONLY; The image SKU. SKU *string SharedGalleryID *string // READ-ONLY; The status of image terms of use (enabled = accepted, disabled = not accepted). TermsStatus *EnableState // READ-ONLY; The image version. Version *string }
ImageProperties - Properties of an image resource.
func (ImageProperties) MarshalJSON ¶
func (i ImageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageProperties.
func (*ImageProperties) UnmarshalJSON ¶ added in v1.0.0
func (i *ImageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageProperties.
type ImageReference ¶
type ImageReference struct { // Image resource ID ID *string // The image offer if applicable. Offer *string // The image publisher Publisher *string // The image SKU SKU *string // The image version specified on creation. Version *string // READ-ONLY; The actual version of the image after use. ExactVersion *string }
ImageReference - Image reference information. Used in the virtual machine profile.
func (ImageReference) MarshalJSON ¶ added in v1.0.0
func (i ImageReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageReference.
func (*ImageReference) UnmarshalJSON ¶ added in v1.0.0
func (i *ImageReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.
type ImageUpdate ¶
type ImageUpdate struct { // Image resource properties Properties *ImageUpdateProperties }
ImageUpdate - Lab services virtual machine image for updates.
func (ImageUpdate) MarshalJSON ¶
func (i ImageUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageUpdate.
func (*ImageUpdate) UnmarshalJSON ¶ added in v1.0.0
func (i *ImageUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageUpdate.
type ImageUpdateProperties ¶
type ImageUpdateProperties struct { // Is the image enabled EnabledState *EnableState }
ImageUpdateProperties - Properties of an image resource update
func (ImageUpdateProperties) MarshalJSON ¶
func (i ImageUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageUpdateProperties.
func (*ImageUpdateProperties) UnmarshalJSON ¶ added in v1.0.0
func (i *ImageUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageUpdateProperties.
type ImagesClient ¶
type ImagesClient struct {
// contains filtered or unexported fields
}
ImagesClient contains the methods for the Images group. Don't use this type directly, use NewImagesClient() instead.
func NewImagesClient ¶
func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImagesClient, error)
NewImagesClient creates a new instance of ImagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ImagesClient) CreateOrUpdate ¶
func (client *ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labPlanName string, imageName string, body Image, options *ImagesClientCreateOrUpdateOptions) (ImagesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Updates an image resource via PUT. Creating new resources via PUT will not function. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- imageName - The image name.
- body - The request body.
- options - ImagesClientCreateOrUpdateOptions contains the optional parameters for the ImagesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/putImage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewImagesClient().CreateOrUpdate(ctx, "testrg123", "testlabplan", "image1", armlabservices.Image{ Properties: &armlabservices.ImageProperties{ EnabledState: to.Ptr(armlabservices.EnableStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Image = armlabservices.Image{ // Name: to.Ptr("image1"), // Type: to.Ptr("Microsoft.LabServices/Image"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1"), // Properties: &armlabservices.ImageProperties{ // EnabledState: to.Ptr(armlabservices.EnableStateEnabled), // Description: to.Ptr("A description of the image"), // DisplayName: to.Ptr("Windows Server 2019 Datacenter"), // Offer: to.Ptr("WindowsServer"), // OSType: to.Ptr(armlabservices.OsTypeWindows), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*ImagesClient) Get ¶
func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, labPlanName string, imageName string, options *ImagesClientGetOptions) (ImagesClientGetResponse, error)
Get - Gets an image resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- imageName - The image name.
- options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/getImage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewImagesClient().Get(ctx, "testrg123", "testlabplan", "image1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Image = armlabservices.Image{ // Name: to.Ptr("image1"), // Type: to.Ptr("Microsoft.LabServices/Image"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1"), // Properties: &armlabservices.ImageProperties{ // EnabledState: to.Ptr(armlabservices.EnableStateEnabled), // Description: to.Ptr("A description of the image"), // DisplayName: to.Ptr("Windows Server 2019 Datacenter"), // Offer: to.Ptr("WindowsServer"), // OSType: to.Ptr(armlabservices.OsTypeWindows), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // Publisher: to.Ptr("Microsoft"), // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/2019.0.20190410"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*ImagesClient) NewListByLabPlanPager ¶ added in v0.4.0
func (client *ImagesClient) NewListByLabPlanPager(resourceGroupName string, labPlanName string, options *ImagesClientListByLabPlanOptions) *runtime.Pager[ImagesClientListByLabPlanResponse]
NewListByLabPlanPager - Gets all images from galleries attached to a lab plan.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- options - ImagesClientListByLabPlanOptions contains the optional parameters for the ImagesClient.NewListByLabPlanPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/listImages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewImagesClient().NewListByLabPlanPager("testrg123", "testlabplan", &armlabservices.ImagesClientListByLabPlanOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedImages = armlabservices.PagedImages{ // Value: []*armlabservices.Image{ // { // Name: to.Ptr("image1"), // Type: to.Ptr("Microsoft.LabServices/Image"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1"), // Properties: &armlabservices.ImageProperties{ // EnabledState: to.Ptr(armlabservices.EnableStateEnabled), // Description: to.Ptr("A description of the image"), // DisplayName: to.Ptr("Windows Server 2019 Datacenter"), // Offer: to.Ptr("WindowsServer"), // OSType: to.Ptr(armlabservices.OsTypeWindows), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("image2"), // Type: to.Ptr("Microsoft.LabServices/Image"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image2"), // Properties: &armlabservices.ImageProperties{ // EnabledState: to.Ptr(armlabservices.EnableStateEnabled), // Description: to.Ptr("An example custom image response"), // DisplayName: to.Ptr("A custom image"), // OSType: to.Ptr(armlabservices.OsTypeWindows), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/sig/images/test-1"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*ImagesClient) Update ¶
func (client *ImagesClient) Update(ctx context.Context, resourceGroupName string, labPlanName string, imageName string, body ImageUpdate, options *ImagesClientUpdateOptions) (ImagesClientUpdateResponse, error)
Update - Updates an image resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- imageName - The image name.
- body - The request body.
- options - ImagesClientUpdateOptions contains the optional parameters for the ImagesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/patchImage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewImagesClient().Update(ctx, "testrg123", "testlabplan", "image1", armlabservices.ImageUpdate{ Properties: &armlabservices.ImageUpdateProperties{ EnabledState: to.Ptr(armlabservices.EnableStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Image = armlabservices.Image{ // Name: to.Ptr("image1"), // Type: to.Ptr("Microsoft.LabServices/Image"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1"), // Properties: &armlabservices.ImageProperties{ // EnabledState: to.Ptr(armlabservices.EnableStateEnabled), // Description: to.Ptr("A description of the image"), // DisplayName: to.Ptr("Windows Server 2019 Datacenter"), // Offer: to.Ptr("WindowsServer"), // OSType: to.Ptr(armlabservices.OsTypeWindows), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
type ImagesClientCreateOrUpdateOptions ¶ added in v0.2.0
type ImagesClientCreateOrUpdateOptions struct { }
ImagesClientCreateOrUpdateOptions contains the optional parameters for the ImagesClient.CreateOrUpdate method.
type ImagesClientCreateOrUpdateResponse ¶ added in v0.2.0
type ImagesClientCreateOrUpdateResponse struct { // Lab services virtual machine image Image }
ImagesClientCreateOrUpdateResponse contains the response from method ImagesClient.CreateOrUpdate.
type ImagesClientGetOptions ¶ added in v0.2.0
type ImagesClientGetOptions struct { }
ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
type ImagesClientGetResponse ¶ added in v0.2.0
type ImagesClientGetResponse struct { // Lab services virtual machine image Image }
ImagesClientGetResponse contains the response from method ImagesClient.Get.
type ImagesClientListByLabPlanOptions ¶ added in v0.2.0
type ImagesClientListByLabPlanOptions struct { // The filter to apply to the operation. Filter *string }
ImagesClientListByLabPlanOptions contains the optional parameters for the ImagesClient.NewListByLabPlanPager method.
type ImagesClientListByLabPlanResponse ¶ added in v0.2.0
type ImagesClientListByLabPlanResponse struct { // Paged list of Lab services virtual machine images. PagedImages }
ImagesClientListByLabPlanResponse contains the response from method ImagesClient.NewListByLabPlanPager.
type ImagesClientUpdateOptions ¶ added in v0.2.0
type ImagesClientUpdateOptions struct { }
ImagesClientUpdateOptions contains the optional parameters for the ImagesClient.Update method.
type ImagesClientUpdateResponse ¶ added in v0.2.0
type ImagesClientUpdateResponse struct { // Lab services virtual machine image Image }
ImagesClientUpdateResponse contains the response from method ImagesClient.Update.
type InvitationState ¶
type InvitationState string
InvitationState - The lab user invitation state.
const ( // InvitationStateFailed - There was an error while sending the invitation. InvitationStateFailed InvitationState = "Failed" // InvitationStateNotSent - The invitation has not been sent. InvitationStateNotSent InvitationState = "NotSent" // InvitationStateSending - Currently sending the invitation. InvitationStateSending InvitationState = "Sending" // InvitationStateSent - The invitation has been successfully sent. InvitationStateSent InvitationState = "Sent" )
func PossibleInvitationStateValues ¶
func PossibleInvitationStateValues() []InvitationState
PossibleInvitationStateValues returns the possible values for the InvitationState const type.
type InviteBody ¶
type InviteBody struct { // Custom text for the invite email. Text *string }
InviteBody - Body for a user invite request
func (InviteBody) MarshalJSON ¶ added in v1.0.0
func (i InviteBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InviteBody.
func (*InviteBody) UnmarshalJSON ¶ added in v1.0.0
func (i *InviteBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InviteBody.
type Lab ¶
type Lab struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Lab resource properties Properties *LabProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the lab. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Lab - The lab resource.
func (Lab) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Lab.
func (*Lab) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Lab.
type LabNetworkProfile ¶
type LabNetworkProfile struct { // The external load balancer resource id LoadBalancerID *string // The external public IP resource id PublicIPID *string // The external subnet resource id SubnetID *string }
LabNetworkProfile - Profile for how to handle networking for Labs.
func (LabNetworkProfile) MarshalJSON ¶ added in v1.0.0
func (l LabNetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabNetworkProfile.
func (*LabNetworkProfile) UnmarshalJSON ¶ added in v1.0.0
func (l *LabNetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabNetworkProfile.
type LabPlan ¶
type LabPlan struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Lab plan resource properties Properties *LabPlanProperties // Managed Identity Information Identity *Identity // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the lab plan. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
LabPlan - Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they can provide a set of default configurations that will apply at the time of creating a lab, but these defaults can still be overwritten.
func (LabPlan) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LabPlan.
func (*LabPlan) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type LabPlan.
type LabPlanNetworkProfile ¶
type LabPlanNetworkProfile struct { // The external subnet resource id SubnetID *string }
LabPlanNetworkProfile - Profile for how to handle networking for Lab Plans.
func (LabPlanNetworkProfile) MarshalJSON ¶ added in v1.0.0
func (l LabPlanNetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabPlanNetworkProfile.
func (*LabPlanNetworkProfile) UnmarshalJSON ¶ added in v1.0.0
func (l *LabPlanNetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabPlanNetworkProfile.
type LabPlanProperties ¶
type LabPlanProperties struct { // The allowed regions for the lab creator to use when creating labs using this lab plan. AllowedRegions []*string // The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. DefaultAutoShutdownProfile *AutoShutdownProfile // The default lab connection profile. This can be changed on a lab resource and only provides a default profile. DefaultConnectionProfile *ConnectionProfile // The lab plan network profile. To enforce lab network policies they must be defined here and cannot be changed when there // are existing labs associated with this lab plan. DefaultNetworkProfile *LabPlanNetworkProfile // Base Url of the lms instance this lab plan can link lab rosters against. LinkedLmsInstance *string // will be persisted in this gallery. Shared images from the gallery can be made // available to use when creating new labs. SharedGalleryID *string // Support contact information and instructions for users of the lab plan. This information is displayed to lab owners and // virtual machine users for all labs in the lab plan. SupportInfo *SupportInfo // READ-ONLY; Current provisioning state of the lab plan. ProvisioningState *ProvisioningState }
LabPlanProperties - Lab plan resource properties
func (LabPlanProperties) MarshalJSON ¶
func (l LabPlanProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabPlanProperties.
func (*LabPlanProperties) UnmarshalJSON ¶ added in v1.0.0
func (l *LabPlanProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabPlanProperties.
type LabPlanUpdate ¶
type LabPlanUpdate struct { // Managed Identity Information Identity *Identity // Lab plan resource update properties Properties *LabPlanUpdateProperties // Resource tags. Tags []*string }
LabPlanUpdate - Contains lab configuration and default settings. This variant is used for PATCH.
func (LabPlanUpdate) MarshalJSON ¶
func (l LabPlanUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabPlanUpdate.
func (*LabPlanUpdate) UnmarshalJSON ¶ added in v1.0.0
func (l *LabPlanUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabPlanUpdate.
type LabPlanUpdateProperties ¶
type LabPlanUpdateProperties struct { // The allowed regions for the lab creator to use when creating labs using this lab plan. AllowedRegions []*string // The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. DefaultAutoShutdownProfile *AutoShutdownProfile // The default lab connection profile. This can be changed on a lab resource and only provides a default profile. DefaultConnectionProfile *ConnectionProfile // The lab plan network profile. To enforce lab network policies they must be defined here and cannot be changed when there // are existing labs associated with this lab plan. DefaultNetworkProfile *LabPlanNetworkProfile // Base Url of the lms instance this lab plan can link lab rosters against. LinkedLmsInstance *string // will be persisted in this gallery. Shared images from the gallery can be made // available to use when creating new labs. SharedGalleryID *string // Support contact information and instructions for users of the lab plan. This information is displayed to lab owners and // virtual machine users for all labs in the lab plan. SupportInfo *SupportInfo }
LabPlanUpdateProperties - Lab plan resource properties for updates
func (LabPlanUpdateProperties) MarshalJSON ¶
func (l LabPlanUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabPlanUpdateProperties.
func (*LabPlanUpdateProperties) UnmarshalJSON ¶ added in v1.0.0
func (l *LabPlanUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabPlanUpdateProperties.
type LabPlansClient ¶
type LabPlansClient struct {
// contains filtered or unexported fields
}
LabPlansClient contains the methods for the LabPlans group. Don't use this type directly, use NewLabPlansClient() instead.
func NewLabPlansClient ¶
func NewLabPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LabPlansClient, error)
NewLabPlansClient creates a new instance of LabPlansClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LabPlansClient) BeginCreateOrUpdate ¶
func (client *LabPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, labPlanName string, body LabPlan, options *LabPlansClientBeginCreateOrUpdateOptions) (*runtime.Poller[LabPlansClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Operation to create or update a Lab Plan resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- body - The request body.
- options - LabPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the LabPlansClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/putLabPlan.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabPlansClient().BeginCreateOrUpdate(ctx, "testrg123", "testlabplan", armlabservices.LabPlan{ Location: to.Ptr("westus"), Properties: &armlabservices.LabPlanProperties{ DefaultAutoShutdownProfile: &armlabservices.AutoShutdownProfile{ DisconnectDelay: to.Ptr("PT5M"), IdleDelay: to.Ptr("PT5M"), NoConnectDelay: to.Ptr("PT5M"), ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), }, DefaultConnectionProfile: &armlabservices.ConnectionProfile{ ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), }, DefaultNetworkProfile: &armlabservices.LabPlanNetworkProfile{ SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), }, SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig"), SupportInfo: &armlabservices.SupportInfo{ Email: to.Ptr("help@contoso.com"), Instructions: to.Ptr("Contact support for help."), Phone: to.Ptr("+1-202-555-0123"), URL: to.Ptr("help.contoso.com"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LabPlan = armlabservices.LabPlan{ // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/LabPlan"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabPlanProperties{ // DefaultAutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // DefaultConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // DefaultNetworkProfile: &armlabservices.LabPlanNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig"), // SupportInfo: &armlabservices.SupportInfo{ // Email: to.Ptr("help@contoso.com"), // Instructions: to.Ptr("Contact support for help."), // Phone: to.Ptr("+1-202-555-0123"), // URL: to.Ptr("help.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*LabPlansClient) BeginDelete ¶
func (client *LabPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, labPlanName string, options *LabPlansClientBeginDeleteOptions) (*runtime.Poller[LabPlansClientDeleteResponse], error)
BeginDelete - Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan, nor does it delete shared images added to a gallery via the lab plan permission container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- options - LabPlansClientBeginDeleteOptions contains the optional parameters for the LabPlansClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/deleteLabPlan.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabPlansClient().BeginDelete(ctx, "testrg123", "testlabplan", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LabPlansClient) BeginSaveImage ¶
func (client *LabPlansClient) BeginSaveImage(ctx context.Context, resourceGroupName string, labPlanName string, body SaveImageBody, options *LabPlansClientBeginSaveImageOptions) (*runtime.Poller[LabPlansClientSaveImageResponse], error)
BeginSaveImage - Saves an image from a lab VM to the attached shared image gallery. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- body - The request body.
- options - LabPlansClientBeginSaveImageOptions contains the optional parameters for the LabPlansClient.BeginSaveImage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/saveImageVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabPlansClient().BeginSaveImage(ctx, "testrg123", "testlabplan", armlabservices.SaveImageBody{ Name: to.Ptr("Test Image"), LabVirtualMachineID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/virtualMachines/template"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LabPlansClient) BeginUpdate ¶
func (client *LabPlansClient) BeginUpdate(ctx context.Context, resourceGroupName string, labPlanName string, body LabPlanUpdate, options *LabPlansClientBeginUpdateOptions) (*runtime.Poller[LabPlansClientUpdateResponse], error)
BeginUpdate - Operation to update a Lab Plan resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- body - The request body.
- options - LabPlansClientBeginUpdateOptions contains the optional parameters for the LabPlansClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/patchLabPlan.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabPlansClient().BeginUpdate(ctx, "testrg123", "testlabplan", armlabservices.LabPlanUpdate{ Properties: &armlabservices.LabPlanUpdateProperties{ DefaultConnectionProfile: &armlabservices.ConnectionProfile{ ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LabPlan = armlabservices.LabPlan{ // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/LabPlan"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabPlanProperties{ // DefaultAutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // DefaultConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // DefaultNetworkProfile: &armlabservices.LabPlanNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig"), // SupportInfo: &armlabservices.SupportInfo{ // Email: to.Ptr("help@contoso.com"), // Instructions: to.Ptr("Contact support for help."), // Phone: to.Ptr("+1-202-555-0123"), // URL: to.Ptr("help.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*LabPlansClient) Get ¶
func (client *LabPlansClient) Get(ctx context.Context, resourceGroupName string, labPlanName string, options *LabPlansClientGetOptions) (LabPlansClientGetResponse, error)
Get - Retrieves the properties of a Lab Plan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labPlanName - The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.
- options - LabPlansClientGetOptions contains the optional parameters for the LabPlansClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/getLabPlan.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLabPlansClient().Get(ctx, "testrg123", "testlabplan", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LabPlan = armlabservices.LabPlan{ // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/LabPlan"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // Location: to.Ptr("westus"), // Identity: &armlabservices.Identity{ // Type: to.Ptr("SystemAssigned"), // PrincipalID: to.Ptr("a799d834-d3c9-4554-ba5d-3771a995aa6a"), // TenantID: to.Ptr("8c33e124-0581-45e0-84d4-f80d59de7806"), // }, // Properties: &armlabservices.LabPlanProperties{ // DefaultAutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // DefaultConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // DefaultNetworkProfile: &armlabservices.LabPlanNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig"), // SupportInfo: &armlabservices.SupportInfo{ // Email: to.Ptr("help@contoso.com"), // Instructions: to.Ptr("Contact support for help."), // Phone: to.Ptr("+1-202-555-0123"), // URL: to.Ptr("help.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*LabPlansClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *LabPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *LabPlansClientListByResourceGroupOptions) *runtime.Pager[LabPlansClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns a list of all lab plans for a subscription and resource group.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - LabPlansClientListByResourceGroupOptions contains the optional parameters for the LabPlansClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listResourceGroupLabPlans.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLabPlansClient().NewListByResourceGroupPager("testrg123", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedLabPlans = armlabservices.PagedLabPlans{ // Value: []*armlabservices.LabPlan{ // { // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/LabPlan"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabPlanProperties{ // DefaultAutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // DefaultConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // DefaultNetworkProfile: &armlabservices.LabPlanNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig"), // SupportInfo: &armlabservices.SupportInfo{ // Email: to.Ptr("help@contoso.com"), // Instructions: to.Ptr("Contact support for help."), // Phone: to.Ptr("+1-202-555-0123"), // URL: to.Ptr("help.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*LabPlansClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *LabPlansClient) NewListBySubscriptionPager(options *LabPlansClientListBySubscriptionOptions) *runtime.Pager[LabPlansClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns a list of all lab plans within a subscription
Generated from API version 2022-08-01
- options - LabPlansClientListBySubscriptionOptions contains the optional parameters for the LabPlansClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listLabPlans.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLabPlansClient().NewListBySubscriptionPager(&armlabservices.LabPlansClientListBySubscriptionOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedLabPlans = armlabservices.PagedLabPlans{ // Value: []*armlabservices.LabPlan{ // { // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/LabPlan"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // Location: to.Ptr("westus"), // Identity: &armlabservices.Identity{ // Type: to.Ptr("SystemAssigned"), // PrincipalID: to.Ptr("a799d834-d3c9-4554-ba5d-3771a995aa6a"), // TenantID: to.Ptr("8c33e124-0581-45e0-84d4-f80d59de7806"), // }, // Properties: &armlabservices.LabPlanProperties{ // DefaultAutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT15M"), // NoConnectDelay: to.Ptr("PT15M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // DefaultConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // DefaultNetworkProfile: &armlabservices.LabPlanNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // SharedGalleryID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig"), // SupportInfo: &armlabservices.SupportInfo{ // Email: to.Ptr("help@contoso.com"), // Instructions: to.Ptr("Contact support for help."), // Phone: to.Ptr("+1-202-555-0123"), // URL: to.Ptr("help.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
type LabPlansClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type LabPlansClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the LabPlansClient.BeginCreateOrUpdate method.
type LabPlansClientBeginDeleteOptions ¶ added in v0.2.0
type LabPlansClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabPlansClientBeginDeleteOptions contains the optional parameters for the LabPlansClient.BeginDelete method.
type LabPlansClientBeginSaveImageOptions ¶ added in v0.2.0
type LabPlansClientBeginSaveImageOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabPlansClientBeginSaveImageOptions contains the optional parameters for the LabPlansClient.BeginSaveImage method.
type LabPlansClientBeginUpdateOptions ¶ added in v0.2.0
type LabPlansClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabPlansClientBeginUpdateOptions contains the optional parameters for the LabPlansClient.BeginUpdate method.
type LabPlansClientCreateOrUpdateResponse ¶ added in v0.2.0
type LabPlansClientCreateOrUpdateResponse struct { // Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they can provide a set of default // configurations that will apply at the time of creating a lab, but these defaults can still be overwritten. LabPlan }
LabPlansClientCreateOrUpdateResponse contains the response from method LabPlansClient.BeginCreateOrUpdate.
type LabPlansClientDeleteResponse ¶ added in v0.2.0
type LabPlansClientDeleteResponse struct { }
LabPlansClientDeleteResponse contains the response from method LabPlansClient.BeginDelete.
type LabPlansClientGetOptions ¶ added in v0.2.0
type LabPlansClientGetOptions struct { }
LabPlansClientGetOptions contains the optional parameters for the LabPlansClient.Get method.
type LabPlansClientGetResponse ¶ added in v0.2.0
type LabPlansClientGetResponse struct { // Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they can provide a set of default // configurations that will apply at the time of creating a lab, but these defaults can still be overwritten. LabPlan }
LabPlansClientGetResponse contains the response from method LabPlansClient.Get.
type LabPlansClientListByResourceGroupOptions ¶ added in v0.2.0
type LabPlansClientListByResourceGroupOptions struct { }
LabPlansClientListByResourceGroupOptions contains the optional parameters for the LabPlansClient.NewListByResourceGroupPager method.
type LabPlansClientListByResourceGroupResponse ¶ added in v0.2.0
type LabPlansClientListByResourceGroupResponse struct { // Paged list of lab plans. PagedLabPlans }
LabPlansClientListByResourceGroupResponse contains the response from method LabPlansClient.NewListByResourceGroupPager.
type LabPlansClientListBySubscriptionOptions ¶ added in v0.2.0
type LabPlansClientListBySubscriptionOptions struct { // The filter to apply to the operation. Filter *string }
LabPlansClientListBySubscriptionOptions contains the optional parameters for the LabPlansClient.NewListBySubscriptionPager method.
type LabPlansClientListBySubscriptionResponse ¶ added in v0.2.0
type LabPlansClientListBySubscriptionResponse struct { // Paged list of lab plans. PagedLabPlans }
LabPlansClientListBySubscriptionResponse contains the response from method LabPlansClient.NewListBySubscriptionPager.
type LabPlansClientSaveImageResponse ¶ added in v0.2.0
type LabPlansClientSaveImageResponse struct { }
LabPlansClientSaveImageResponse contains the response from method LabPlansClient.BeginSaveImage.
type LabPlansClientUpdateResponse ¶ added in v0.2.0
type LabPlansClientUpdateResponse struct { // Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they can provide a set of default // configurations that will apply at the time of creating a lab, but these defaults can still be overwritten. LabPlan }
LabPlansClientUpdateResponse contains the response from method LabPlansClient.BeginUpdate.
type LabProperties ¶
type LabProperties struct { // The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting // idle. AutoShutdownProfile *AutoShutdownProfile // The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports // are open. ConnectionProfile *ConnectionProfile // The description of the lab. Description *string // The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating // a lab via labs.azure.com. Setting a labPlanId on an existing lab provides // organization.. LabPlanID *string // The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab has been // created. NetworkProfile *LabNetworkProfile // The lab user list management profile. RosterProfile *RosterProfile // The lab security profile. SecurityProfile *SecurityProfile // The title of the lab. Title *string // The profile used for creating lab virtual machines. VirtualMachineProfile *VirtualMachineProfile // READ-ONLY; Current provisioning state of the lab. ProvisioningState *ProvisioningState // READ-ONLY; The lab state. State *LabState }
LabProperties - Properties of a lab resource.
func (LabProperties) MarshalJSON ¶ added in v1.0.0
func (l LabProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabProperties.
func (*LabProperties) UnmarshalJSON ¶ added in v1.0.0
func (l *LabProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabProperties.
type LabServicesSKUTier ¶
type LabServicesSKUTier string
LabServicesSKUTier - The tier of the SKU.
const ( LabServicesSKUTierPremium LabServicesSKUTier = "Premium" LabServicesSKUTierStandard LabServicesSKUTier = "Standard" )
func PossibleLabServicesSKUTierValues ¶
func PossibleLabServicesSKUTierValues() []LabServicesSKUTier
PossibleLabServicesSKUTierValues returns the possible values for the LabServicesSKUTier const type.
type LabState ¶
type LabState string
LabState - The state of a virtual machine.
const ( // LabStateDraft - The lab is currently in draft (has not been published). LabStateDraft LabState = "Draft" // LabStatePublished - The lab has been published. LabStatePublished LabState = "Published" // LabStatePublishing - The lab is publishing. LabStatePublishing LabState = "Publishing" // LabStateScaling - The lab is scaling. LabStateScaling LabState = "Scaling" // LabStateSyncing - The lab is syncing users. LabStateSyncing LabState = "Syncing" )
func PossibleLabStateValues ¶
func PossibleLabStateValues() []LabState
PossibleLabStateValues returns the possible values for the LabState const type.
type LabUpdate ¶
type LabUpdate struct { // Lab resource properties Properties *LabUpdateProperties // Resource tags. Tags []*string }
LabUpdate - The lab resource for updates.
func (LabUpdate) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LabUpdate.
func (*LabUpdate) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type LabUpdate.
type LabUpdateProperties ¶
type LabUpdateProperties struct { // The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting // idle. AutoShutdownProfile *AutoShutdownProfile // The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports // are open. ConnectionProfile *ConnectionProfile // The description of the lab. Description *string // The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating // a lab via labs.azure.com. Setting a labPlanId on an existing lab provides // organization.. LabPlanID *string // The lab user list management profile. RosterProfile *RosterProfile // The lab security profile. SecurityProfile *SecurityProfile // The title of the lab. Title *string // The profile used for creating lab virtual machines. VirtualMachineProfile *VirtualMachineProfile }
LabUpdateProperties - Properties of a lab resource used for updates.
func (LabUpdateProperties) MarshalJSON ¶ added in v1.0.0
func (l LabUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LabUpdateProperties.
func (*LabUpdateProperties) UnmarshalJSON ¶ added in v1.0.0
func (l *LabUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LabUpdateProperties.
type LabsClient ¶
type LabsClient struct {
// contains filtered or unexported fields
}
LabsClient contains the methods for the Labs group. Don't use this type directly, use NewLabsClient() instead.
func NewLabsClient ¶
func NewLabsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LabsClient, error)
NewLabsClient creates a new instance of LabsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LabsClient) BeginCreateOrUpdate ¶
func (client *LabsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, body Lab, options *LabsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LabsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Operation to create or update a lab resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- body - The request body.
- options - LabsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/putLab.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabsClient().BeginCreateOrUpdate(ctx, "testrg123", "testlab", armlabservices.Lab{ Location: to.Ptr("westus"), Properties: &armlabservices.LabProperties{ Description: to.Ptr("This is a test lab."), AutoShutdownProfile: &armlabservices.AutoShutdownProfile{ DisconnectDelay: to.Ptr("PT5M"), IdleDelay: to.Ptr("PT5M"), NoConnectDelay: to.Ptr("PT5M"), ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), }, ConnectionProfile: &armlabservices.ConnectionProfile{ ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), }, LabPlanID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), SecurityProfile: &armlabservices.SecurityProfile{ OpenAccess: to.Ptr(armlabservices.EnableStateDisabled), }, Title: to.Ptr("Test Lab"), VirtualMachineProfile: &armlabservices.VirtualMachineProfile{ AdditionalCapabilities: &armlabservices.VirtualMachineAdditionalCapabilities{ InstallGpuDrivers: to.Ptr(armlabservices.EnableStateDisabled), }, AdminUser: &armlabservices.Credentials{ Username: to.Ptr("test-user"), }, CreateOption: to.Ptr(armlabservices.CreateOptionTemplateVM), ImageReference: &armlabservices.ImageReference{ Offer: to.Ptr("WindowsServer"), Publisher: to.Ptr("Microsoft"), SKU: to.Ptr("2019-Datacenter"), Version: to.Ptr("2019.0.20190410"), }, SKU: &armlabservices.SKU{ Name: to.Ptr("Medium"), }, UsageQuota: to.Ptr("PT10H"), UseSharedPassword: to.Ptr(armlabservices.EnableStateDisabled), }, NetworkProfile: &armlabservices.LabNetworkProfile{ SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), }, State: to.Ptr(armlabservices.LabStateDraft), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Lab = armlabservices.Lab{ // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/Lab"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabProperties{ // Description: to.Ptr("This is a test lab."), // AutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // ConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // LabPlanID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // SecurityProfile: &armlabservices.SecurityProfile{ // OpenAccess: to.Ptr(armlabservices.EnableStateDisabled), // RegistrationCode: to.Ptr("fAkEcodE"), // }, // Title: to.Ptr("Test Lab"), // VirtualMachineProfile: &armlabservices.VirtualMachineProfile{ // AdditionalCapabilities: &armlabservices.VirtualMachineAdditionalCapabilities{ // InstallGpuDrivers: to.Ptr(armlabservices.EnableStateDisabled), // }, // AdminUser: &armlabservices.Credentials{ // Username: to.Ptr("test-user"), // }, // CreateOption: to.Ptr(armlabservices.CreateOptionTemplateVM), // ImageReference: &armlabservices.ImageReference{ // Offer: to.Ptr("WindowsServer"), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // OSType: to.Ptr(armlabservices.OsTypeWindows), // SKU: &armlabservices.SKU{ // Name: to.Ptr("Medium"), // Capacity: to.Ptr[int32](20), // }, // UsageQuota: to.Ptr("PT10H"), // UseSharedPassword: to.Ptr(armlabservices.EnableStateDisabled), // }, // NetworkProfile: &armlabservices.LabNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.LabStateDraft), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*LabsClient) BeginDelete ¶
func (client *LabsClient) BeginDelete(ctx context.Context, resourceGroupName string, labName string, options *LabsClientBeginDeleteOptions) (*runtime.Poller[LabsClientDeleteResponse], error)
BeginDelete - Operation to delete a lab resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - LabsClientBeginDeleteOptions contains the optional parameters for the LabsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/deleteLab.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabsClient().BeginDelete(ctx, "testrg123", "testlab", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LabsClient) BeginPublish ¶
func (client *LabsClient) BeginPublish(ctx context.Context, resourceGroupName string, labName string, options *LabsClientBeginPublishOptions) (*runtime.Poller[LabsClientPublishResponse], error)
BeginPublish - Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - LabsClientBeginPublishOptions contains the optional parameters for the LabsClient.BeginPublish method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/publishLab.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabsClient().BeginPublish(ctx, "testrg123", "testlab", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LabsClient) BeginSyncGroup ¶
func (client *LabsClient) BeginSyncGroup(ctx context.Context, resourceGroupName string, labName string, options *LabsClientBeginSyncGroupOptions) (*runtime.Poller[LabsClientSyncGroupResponse], error)
BeginSyncGroup - Action used to manually kick off an AAD group sync job. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - LabsClientBeginSyncGroupOptions contains the optional parameters for the LabsClient.BeginSyncGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/syncLab.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabsClient().BeginSyncGroup(ctx, "testrg123", "testlab", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LabsClient) BeginUpdate ¶
func (client *LabsClient) BeginUpdate(ctx context.Context, resourceGroupName string, labName string, body LabUpdate, options *LabsClientBeginUpdateOptions) (*runtime.Poller[LabsClientUpdateResponse], error)
BeginUpdate - Operation to update a lab resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- body - The request body.
- options - LabsClientBeginUpdateOptions contains the optional parameters for the LabsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/patchLab.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLabsClient().BeginUpdate(ctx, "testrg123", "testlab", armlabservices.LabUpdate{ Properties: &armlabservices.LabUpdateProperties{ SecurityProfile: &armlabservices.SecurityProfile{ OpenAccess: to.Ptr(armlabservices.EnableStateEnabled), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Lab = armlabservices.Lab{ // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/Lab"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabProperties{ // Description: to.Ptr("This is a test lab."), // AutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // ConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // LabPlanID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // SecurityProfile: &armlabservices.SecurityProfile{ // OpenAccess: to.Ptr(armlabservices.EnableStateEnabled), // RegistrationCode: to.Ptr("fAkEcodE"), // }, // Title: to.Ptr("Test Lab"), // VirtualMachineProfile: &armlabservices.VirtualMachineProfile{ // AdditionalCapabilities: &armlabservices.VirtualMachineAdditionalCapabilities{ // InstallGpuDrivers: to.Ptr(armlabservices.EnableStateDisabled), // }, // AdminUser: &armlabservices.Credentials{ // Username: to.Ptr("test-user"), // }, // CreateOption: to.Ptr(armlabservices.CreateOptionTemplateVM), // ImageReference: &armlabservices.ImageReference{ // Offer: to.Ptr("WindowsServer"), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // SKU: &armlabservices.SKU{ // Name: to.Ptr("Medium"), // Capacity: to.Ptr[int32](20), // }, // UsageQuota: to.Ptr("PT10H"), // UseSharedPassword: to.Ptr(armlabservices.EnableStateDisabled), // }, // NetworkProfile: &armlabservices.LabNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/id"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.LabStateDraft), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*LabsClient) Get ¶
func (client *LabsClient) Get(ctx context.Context, resourceGroupName string, labName string, options *LabsClientGetOptions) (LabsClientGetResponse, error)
Get - Returns the properties of a lab resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - LabsClientGetOptions contains the optional parameters for the LabsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/getLab.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLabsClient().Get(ctx, "testrg123", "testlab", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Lab = armlabservices.Lab{ // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/Lab"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabProperties{ // Description: to.Ptr("This is a test lab."), // AutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // ConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // LabPlanID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // SecurityProfile: &armlabservices.SecurityProfile{ // OpenAccess: to.Ptr(armlabservices.EnableStateDisabled), // RegistrationCode: to.Ptr("fAkEcodE"), // }, // Title: to.Ptr("Test Lab"), // VirtualMachineProfile: &armlabservices.VirtualMachineProfile{ // AdditionalCapabilities: &armlabservices.VirtualMachineAdditionalCapabilities{ // InstallGpuDrivers: to.Ptr(armlabservices.EnableStateDisabled), // }, // AdminUser: &armlabservices.Credentials{ // Username: to.Ptr("test-user"), // }, // CreateOption: to.Ptr(armlabservices.CreateOptionTemplateVM), // ImageReference: &armlabservices.ImageReference{ // Offer: to.Ptr("WindowsServer"), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // OSType: to.Ptr(armlabservices.OsTypeWindows), // SKU: &armlabservices.SKU{ // Name: to.Ptr("Medium"), // Capacity: to.Ptr[int32](20), // }, // UsageQuota: to.Ptr("PT10H"), // UseSharedPassword: to.Ptr(armlabservices.EnableStateDisabled), // }, // NetworkProfile: &armlabservices.LabNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.LabStateDraft), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*LabsClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *LabsClient) NewListByResourceGroupPager(resourceGroupName string, options *LabsClientListByResourceGroupOptions) *runtime.Pager[LabsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns a list of all labs in a resource group.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - LabsClientListByResourceGroupOptions contains the optional parameters for the LabsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listResourceGroupLabs.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLabsClient().NewListByResourceGroupPager("testrg123", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedLabs = armlabservices.PagedLabs{ // Value: []*armlabservices.Lab{ // { // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/Lab"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabProperties{ // Description: to.Ptr("This is a test lab."), // AutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // ConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // LabPlanID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // SecurityProfile: &armlabservices.SecurityProfile{ // OpenAccess: to.Ptr(armlabservices.EnableStateDisabled), // RegistrationCode: to.Ptr("fAkEcodE"), // }, // Title: to.Ptr("Test Lab"), // VirtualMachineProfile: &armlabservices.VirtualMachineProfile{ // AdditionalCapabilities: &armlabservices.VirtualMachineAdditionalCapabilities{ // InstallGpuDrivers: to.Ptr(armlabservices.EnableStateDisabled), // }, // AdminUser: &armlabservices.Credentials{ // Username: to.Ptr("test-user"), // }, // CreateOption: to.Ptr(armlabservices.CreateOptionTemplateVM), // ImageReference: &armlabservices.ImageReference{ // Offer: to.Ptr("WindowsServer"), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // OSType: to.Ptr(armlabservices.OsTypeWindows), // SKU: &armlabservices.SKU{ // Name: to.Ptr("Medium"), // Capacity: to.Ptr[int32](20), // }, // UsageQuota: to.Ptr("PT10H"), // UseSharedPassword: to.Ptr(armlabservices.EnableStateDisabled), // }, // NetworkProfile: &armlabservices.LabNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.LabStateDraft), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*LabsClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *LabsClient) NewListBySubscriptionPager(options *LabsClientListBySubscriptionOptions) *runtime.Pager[LabsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns a list of all labs for a subscription.
Generated from API version 2022-08-01
- options - LabsClientListBySubscriptionOptions contains the optional parameters for the LabsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listLabs.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLabsClient().NewListBySubscriptionPager(&armlabservices.LabsClientListBySubscriptionOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedLabs = armlabservices.PagedLabs{ // Value: []*armlabservices.Lab{ // { // Name: to.Ptr("testlabplan"), // Type: to.Ptr("Microsoft.LabServices/Lab"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab"), // Location: to.Ptr("westus"), // Properties: &armlabservices.LabProperties{ // Description: to.Ptr("This is a test lab."), // AutoShutdownProfile: &armlabservices.AutoShutdownProfile{ // DisconnectDelay: to.Ptr("PT5M"), // IdleDelay: to.Ptr("PT5M"), // NoConnectDelay: to.Ptr("PT5M"), // ShutdownOnDisconnect: to.Ptr(armlabservices.EnableStateEnabled), // ShutdownOnIdle: to.Ptr(armlabservices.ShutdownOnIdleModeUserAbsence), // ShutdownWhenNotConnected: to.Ptr(armlabservices.EnableStateEnabled), // }, // ConnectionProfile: &armlabservices.ConnectionProfile{ // ClientRdpAccess: to.Ptr(armlabservices.ConnectionTypePublic), // ClientSSHAccess: to.Ptr(armlabservices.ConnectionTypePublic), // WebRdpAccess: to.Ptr(armlabservices.ConnectionTypeNone), // WebSSHAccess: to.Ptr(armlabservices.ConnectionTypeNone), // }, // LabPlanID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"), // SecurityProfile: &armlabservices.SecurityProfile{ // OpenAccess: to.Ptr(armlabservices.EnableStateDisabled), // RegistrationCode: to.Ptr("fAkEcodE"), // }, // Title: to.Ptr("Test Lab"), // VirtualMachineProfile: &armlabservices.VirtualMachineProfile{ // AdditionalCapabilities: &armlabservices.VirtualMachineAdditionalCapabilities{ // InstallGpuDrivers: to.Ptr(armlabservices.EnableStateDisabled), // }, // AdminUser: &armlabservices.Credentials{ // Username: to.Ptr("test-user"), // }, // CreateOption: to.Ptr(armlabservices.CreateOptionTemplateVM), // ImageReference: &armlabservices.ImageReference{ // Offer: to.Ptr("WindowsServer"), // Publisher: to.Ptr("Microsoft"), // SKU: to.Ptr("2019-Datacenter"), // Version: to.Ptr("2019.0.20190410"), // }, // OSType: to.Ptr(armlabservices.OsTypeWindows), // SKU: &armlabservices.SKU{ // Name: to.Ptr("Medium"), // Capacity: to.Ptr[int32](20), // }, // UsageQuota: to.Ptr("PT10H"), // UseSharedPassword: to.Ptr(armlabservices.EnableStateDisabled), // }, // NetworkProfile: &armlabservices.LabNetworkProfile{ // SubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.LabStateDraft), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
type LabsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type LabsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabsClient.BeginCreateOrUpdate method.
type LabsClientBeginDeleteOptions ¶ added in v0.2.0
type LabsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabsClientBeginDeleteOptions contains the optional parameters for the LabsClient.BeginDelete method.
type LabsClientBeginPublishOptions ¶ added in v0.2.0
type LabsClientBeginPublishOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabsClientBeginPublishOptions contains the optional parameters for the LabsClient.BeginPublish method.
type LabsClientBeginSyncGroupOptions ¶ added in v0.2.0
type LabsClientBeginSyncGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabsClientBeginSyncGroupOptions contains the optional parameters for the LabsClient.BeginSyncGroup method.
type LabsClientBeginUpdateOptions ¶ added in v0.2.0
type LabsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LabsClientBeginUpdateOptions contains the optional parameters for the LabsClient.BeginUpdate method.
type LabsClientCreateOrUpdateResponse ¶ added in v0.2.0
type LabsClientCreateOrUpdateResponse struct { // The lab resource. Lab }
LabsClientCreateOrUpdateResponse contains the response from method LabsClient.BeginCreateOrUpdate.
type LabsClientDeleteResponse ¶ added in v0.2.0
type LabsClientDeleteResponse struct { }
LabsClientDeleteResponse contains the response from method LabsClient.BeginDelete.
type LabsClientGetOptions ¶ added in v0.2.0
type LabsClientGetOptions struct { }
LabsClientGetOptions contains the optional parameters for the LabsClient.Get method.
type LabsClientGetResponse ¶ added in v0.2.0
type LabsClientGetResponse struct { // The lab resource. Lab }
LabsClientGetResponse contains the response from method LabsClient.Get.
type LabsClientListByResourceGroupOptions ¶ added in v0.2.0
type LabsClientListByResourceGroupOptions struct { }
LabsClientListByResourceGroupOptions contains the optional parameters for the LabsClient.NewListByResourceGroupPager method.
type LabsClientListByResourceGroupResponse ¶ added in v0.2.0
type LabsClientListByResourceGroupResponse struct { // Paged list of labs. PagedLabs }
LabsClientListByResourceGroupResponse contains the response from method LabsClient.NewListByResourceGroupPager.
type LabsClientListBySubscriptionOptions ¶ added in v0.2.0
type LabsClientListBySubscriptionOptions struct { // The filter to apply to the operation. Filter *string }
LabsClientListBySubscriptionOptions contains the optional parameters for the LabsClient.NewListBySubscriptionPager method.
type LabsClientListBySubscriptionResponse ¶ added in v0.2.0
type LabsClientListBySubscriptionResponse struct { // Paged list of labs. PagedLabs }
LabsClientListBySubscriptionResponse contains the response from method LabsClient.NewListBySubscriptionPager.
type LabsClientPublishResponse ¶ added in v0.2.0
type LabsClientPublishResponse struct { }
LabsClientPublishResponse contains the response from method LabsClient.BeginPublish.
type LabsClientSyncGroupResponse ¶ added in v0.2.0
type LabsClientSyncGroupResponse struct { }
LabsClientSyncGroupResponse contains the response from method LabsClient.BeginSyncGroup.
type LabsClientUpdateResponse ¶ added in v0.2.0
type LabsClientUpdateResponse struct { // The lab resource. Lab }
LabsClientUpdateResponse contains the response from method LabsClient.BeginUpdate.
type ListUsagesResult ¶
type ListUsagesResult struct { // The array page of Usages. Value []*Usage // READ-ONLY; The link to get the next page of Usage result. NextLink *string }
ListUsagesResult - List of Core Usages.
func (ListUsagesResult) MarshalJSON ¶
func (l ListUsagesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListUsagesResult.
func (*ListUsagesResult) UnmarshalJSON ¶ added in v1.0.0
func (l *ListUsagesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.0.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.0.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v1.0.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationResult ¶
type OperationResult struct { // REQUIRED; The operation status Status *OperationStatus // End time EndTime *time.Time // The error for a failure if the operation failed. Error *ErrorDetail // Percent completion PercentComplete *float32 // Start time StartTime *time.Time // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string }
OperationResult - A long running operation result
func (OperationResult) MarshalJSON ¶
func (o OperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResult.
func (*OperationResult) UnmarshalJSON ¶
func (o *OperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult.
type OperationResultsClient ¶
type OperationResultsClient struct {
// contains filtered or unexported fields
}
OperationResultsClient contains the methods for the OperationResults group. Don't use this type directly, use NewOperationResultsClient() instead.
func NewOperationResultsClient ¶
func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultsClient, error)
NewOperationResultsClient creates a new instance of OperationResultsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationResultsClient) Get ¶
func (client *OperationResultsClient) Get(ctx context.Context, operationResultID string, options *OperationResultsClientGetOptions) (OperationResultsClientGetResponse, error)
Get - Returns an azure operation result. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- operationResultID - The operation result ID / name.
- options - OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/OperationResults/getOperationResult.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewOperationResultsClient().Get(ctx, "a64149d8-84cb-4566-ab8e-b4ee1a074174", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationResult = armlabservices.OperationResult{ // Name: to.Ptr("a64149d8-84cb-4566-ab8e-b4ee1a074174"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // Status: to.Ptr(armlabservices.OperationStatusInProgress), // } }
Output:
type OperationResultsClientGetOptions ¶ added in v0.2.0
type OperationResultsClientGetOptions struct { }
OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.
type OperationResultsClientGetResponse ¶ added in v0.2.0
type OperationResultsClientGetResponse struct { // A long running operation result OperationResult }
OperationResultsClientGetResponse contains the response from method OperationResultsClient.Get.
type OperationStatus ¶
type OperationStatus string
OperationStatus - The operation status
const ( // OperationStatusCanceled - Not supported yet OperationStatusCanceled OperationStatus = "Canceled" // OperationStatusFailed - The operation failed OperationStatusFailed OperationStatus = "Failed" // OperationStatusInProgress - The operation is running OperationStatusInProgress OperationStatus = "InProgress" // OperationStatusNotStarted - The operation has been accepted but hasn't started. OperationStatusNotStarted OperationStatus = "NotStarted" // OperationStatusSucceeded - The operation Succeeded OperationStatusSucceeded OperationStatus = "Succeeded" )
func PossibleOperationStatusValues ¶
func PossibleOperationStatusValues() []OperationStatus
PossibleOperationStatusValues returns the possible values for the OperationStatus const type.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Returns a list of all operations.
Generated from API version 2022-08-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabServices/listOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armlabservices.OperationListResult{ // Value: []*armlabservices.Operation{ // { // Name: to.Ptr("Microsoft.LabServices/labPlans/write"), // Display: &armlabservices.OperationDisplay{ // Description: to.Ptr("Create new or update an existing lab plan."), // Operation: to.Ptr("Create or Update Lab Plan"), // Provider: to.Ptr("Microsoft Azure Lab Services"), // Resource: to.Ptr("Microsoft.LabServices/labPlans"), // }, // IsDataAction: to.Ptr(false), // Origin: to.Ptr(armlabservices.OriginUserSystem), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type OsState ¶
type OsState string
OsState - The operating system state.
func PossibleOsStateValues ¶
func PossibleOsStateValues() []OsState
PossibleOsStateValues returns the possible values for the OsState const type.
type OsType ¶
type OsType string
OsType - The operating system type.
func PossibleOsTypeValues ¶
func PossibleOsTypeValues() []OsType
PossibleOsTypeValues returns the possible values for the OsType const type.
type PagedImages ¶
type PagedImages struct { // READ-ONLY; The link to get the next page of image results. NextLink *string // READ-ONLY; The array page of virtual machine images. Value []*Image }
PagedImages - Paged list of Lab services virtual machine images.
func (PagedImages) MarshalJSON ¶
func (p PagedImages) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedImages.
func (*PagedImages) UnmarshalJSON ¶ added in v1.0.0
func (p *PagedImages) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedImages.
type PagedLabPlans ¶
type PagedLabPlans struct { // READ-ONLY; The link to get the next page of lab plan results. NextLink *string // READ-ONLY; The array page of lab plans. Value []*LabPlan }
PagedLabPlans - Paged list of lab plans.
func (PagedLabPlans) MarshalJSON ¶
func (p PagedLabPlans) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedLabPlans.
func (*PagedLabPlans) UnmarshalJSON ¶ added in v1.0.0
func (p *PagedLabPlans) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedLabPlans.
type PagedLabs ¶
type PagedLabs struct { // READ-ONLY; The link to get the next page of image results. NextLink *string // READ-ONLY; The array page of lab results. Value []*Lab }
PagedLabs - Paged list of labs.
func (PagedLabs) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type PagedLabs.
func (*PagedLabs) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type PagedLabs.
type PagedSKUInfos ¶ added in v0.2.0
type PagedSKUInfos struct { // READ-ONLY; The link to get the next page of sku results. NextLink *string // READ-ONLY; The array page of sku results. Value []*SKUInfo }
PagedSKUInfos - Paged list of lab services skus.
func (PagedSKUInfos) MarshalJSON ¶ added in v0.2.0
func (p PagedSKUInfos) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedSKUInfos.
func (*PagedSKUInfos) UnmarshalJSON ¶ added in v1.0.0
func (p *PagedSKUInfos) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedSKUInfos.
type PagedSchedules ¶
type PagedSchedules struct { // READ-ONLY; The link to get the next page of schedule results. NextLink *string // READ-ONLY; The array page of schedule results. Value []*Schedule }
PagedSchedules - Paged list of schedules.
func (PagedSchedules) MarshalJSON ¶
func (p PagedSchedules) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedSchedules.
func (*PagedSchedules) UnmarshalJSON ¶ added in v1.0.0
func (p *PagedSchedules) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedSchedules.
type PagedUsers ¶
type PagedUsers struct { // READ-ONLY; The link to get the next page of image results. NextLink *string // READ-ONLY; The array page of user results. Value []*User }
PagedUsers - Paged list of users.
func (PagedUsers) MarshalJSON ¶
func (p PagedUsers) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedUsers.
func (*PagedUsers) UnmarshalJSON ¶ added in v1.0.0
func (p *PagedUsers) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedUsers.
type PagedVirtualMachines ¶
type PagedVirtualMachines struct { // READ-ONLY; The link to get the next page of virtual machine results. NextLink *string // READ-ONLY; The array page of virtual machine results. Value []*VirtualMachine }
PagedVirtualMachines - Paged list of lab services virtual machines.
func (PagedVirtualMachines) MarshalJSON ¶
func (p PagedVirtualMachines) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedVirtualMachines.
func (*PagedVirtualMachines) UnmarshalJSON ¶ added in v1.0.0
func (p *PagedVirtualMachines) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedVirtualMachines.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Resource provisioning state.
const ( // ProvisioningStateCreating - Resource is in the process of being created. ProvisioningStateCreating ProvisioningState = "Creating" // ProvisioningStateDeleting - Resource is in the process of being deleted. ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed - Previous operation on the resource has failed leaving resource in unhealthy state. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateLocked - The resource is locked and changes are currently blocked. This could be due to maintenance or // a scheduled operation. The state will go back to succeeded once the locking operation has finished. ProvisioningStateLocked ProvisioningState = "Locked" // ProvisioningStateSucceeded - Resource is in healthy state after creation or update operation. ProvisioningStateSucceeded ProvisioningState = "Succeeded" // ProvisioningStateUpdating - New property values are being applied to the resource. ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v1.0.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.0.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type RecurrenceFrequency ¶
type RecurrenceFrequency string
RecurrenceFrequency - Schedule recurrence frequencies.
const ( // RecurrenceFrequencyDaily - Schedule will run every days. RecurrenceFrequencyDaily RecurrenceFrequency = "Daily" // RecurrenceFrequencyWeekly - Schedule will run every week on days specified in weekDays. RecurrenceFrequencyWeekly RecurrenceFrequency = "Weekly" )
func PossibleRecurrenceFrequencyValues ¶
func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency
PossibleRecurrenceFrequencyValues returns the possible values for the RecurrenceFrequency const type.
type RecurrencePattern ¶
type RecurrencePattern struct { // REQUIRED; When the recurrence will expire. This date is inclusive. ExpirationDate *time.Time // REQUIRED; The frequency of the recurrence. Frequency *RecurrenceFrequency // The interval to invoke the schedule on. For example, interval = 2 and RecurrenceFrequency.Daily will run every 2 days. // When no interval is supplied, an interval of 1 is used. Interval *int32 // The week days the schedule runs. Used for when the Frequency is set to Weekly. WeekDays []*WeekDay }
RecurrencePattern - Recurrence pattern of a lab schedule.
func (RecurrencePattern) MarshalJSON ¶
func (r RecurrencePattern) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecurrencePattern.
func (*RecurrencePattern) UnmarshalJSON ¶
func (r *RecurrencePattern) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecurrencePattern.
type RegistrationState ¶
type RegistrationState string
RegistrationState - The user lab registration state.
const ( // RegistrationStateNotRegistered - User has registered with the lab. RegistrationStateNotRegistered RegistrationState = "NotRegistered" // RegistrationStateRegistered - User has not yet registered with the lab. RegistrationStateRegistered RegistrationState = "Registered" )
func PossibleRegistrationStateValues ¶
func PossibleRegistrationStateValues() []RegistrationState
PossibleRegistrationStateValues returns the possible values for the RegistrationState const type.
type ResetPasswordBody ¶
type ResetPasswordBody struct { // REQUIRED; The password Password *string // REQUIRED; The user whose password is being reset Username *string }
ResetPasswordBody - Body of a reset password request.
func (ResetPasswordBody) MarshalJSON ¶ added in v1.0.0
func (r ResetPasswordBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResetPasswordBody.
func (*ResetPasswordBody) UnmarshalJSON ¶ added in v1.0.0
func (r *ResetPasswordBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResetPasswordBody.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type RestrictionReasonCode ¶
type RestrictionReasonCode string
RestrictionReasonCode - The reason for the restriction.
const ( RestrictionReasonCodeNotAvailableForSubscription RestrictionReasonCode = "NotAvailableForSubscription" RestrictionReasonCodeQuotaID RestrictionReasonCode = "QuotaId" )
func PossibleRestrictionReasonCodeValues ¶
func PossibleRestrictionReasonCodeValues() []RestrictionReasonCode
PossibleRestrictionReasonCodeValues returns the possible values for the RestrictionReasonCode const type.
type RestrictionType ¶
type RestrictionType string
RestrictionType - The type of restriction.
const (
RestrictionTypeLocation RestrictionType = "Location"
)
func PossibleRestrictionTypeValues ¶
func PossibleRestrictionTypeValues() []RestrictionType
PossibleRestrictionTypeValues returns the possible values for the RestrictionType const type.
type RosterProfile ¶
type RosterProfile struct { // The AAD group ID which this lab roster is populated from. Having this set enables AAD sync mode. ActiveDirectoryGroupID *string // The base URI identifying the lms instance. LmsInstance *string // The unique id of the azure lab services tool in the lms. LtiClientID *string // The unique context identifier for the lab in the lms. LtiContextID *string // The uri of the names and roles service endpoint on the lms for the class attached to this lab. LtiRosterEndpoint *string }
RosterProfile - The lab user list management profile.
func (RosterProfile) MarshalJSON ¶ added in v1.0.0
func (r RosterProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RosterProfile.
func (*RosterProfile) UnmarshalJSON ¶ added in v1.0.0
func (r *RosterProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RosterProfile.
type SKU ¶
type SKU struct { // REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code Name *string // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the // resource this may be omitted. Capacity *int32 // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Size *string // This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required // on a PUT. Tier *SKUTier }
SKU - The resource model definition representing SKU
func (SKU) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUCapabilities ¶ added in v0.2.0
type SKUCapabilities struct { // READ-ONLY; The name of the capability for a SKU. Name *string // READ-ONLY; The value of the capability for a SKU. Value *string }
SKUCapabilities - The array of capabilities of a lab services SKU.
func (SKUCapabilities) MarshalJSON ¶ added in v1.0.0
func (s SKUCapabilities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUCapabilities.
func (*SKUCapabilities) UnmarshalJSON ¶ added in v1.0.0
func (s *SKUCapabilities) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapabilities.
type SKUCapacity ¶ added in v0.2.0
type SKUCapacity struct { // READ-ONLY; The default capacity for this resource. Default *int64 // READ-ONLY; The highest permitted capacity for this resource. Maximum *int64 // READ-ONLY; The lowest permitted capacity for this resource. Minimum *int64 // READ-ONLY; The localized name of the resource. ScaleType *ScaleType }
SKUCapacity - The scale out/in options of the SKU.
func (SKUCapacity) MarshalJSON ¶ added in v1.0.0
func (s SKUCapacity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUCapacity.
func (*SKUCapacity) UnmarshalJSON ¶ added in v1.0.0
func (s *SKUCapacity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity.
type SKUCost ¶ added in v0.2.0
type SKUCost struct { // READ-ONLY; The extended unit. ExtendedUnit *string // READ-ONLY; The meter id. MeterID *string // READ-ONLY; The quantity of units charged. Quantity *float32 }
SKUCost - The array of costs of a lab services SKU.
func (SKUCost) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaller interface for type SKUCost.
func (*SKUCost) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKUCost.
type SKUInfo ¶ added in v0.2.0
type SKUInfo struct { // The scale out/in options of the SKU. Capacity *SKUCapacity // READ-ONLY; The capabilities of the SKU. Capabilities []*SKUCapabilities // READ-ONLY; Metadata for retrieving price info of a lab services SKUs. Costs []*SKUCost // READ-ONLY; The family of the SKU. Family *string // READ-ONLY; List of locations that are available for a size. Locations []*string // READ-ONLY; The name of the SKU. Name *string // READ-ONLY; The lab services resource type. ResourceType *string // READ-ONLY; Restrictions of a lab services SKUs. Restrictions []*SKURestrictions // READ-ONLY; The SKU size. Size *string // READ-ONLY; The tier of the SKU. Tier *LabServicesSKUTier }
SKUInfo - Azure Lab Services resource SKUs
func (SKUInfo) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type SKUInfo.
func (*SKUInfo) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfo.
type SKURestrictions ¶ added in v0.2.0
type SKURestrictions struct { // READ-ONLY; The reason for the restriction. ReasonCode *RestrictionReasonCode // READ-ONLY; The type of restriction. Type *RestrictionType // READ-ONLY; The values of the restriction. Values []*string }
SKURestrictions - The restriction details.
func (SKURestrictions) MarshalJSON ¶ added in v0.2.0
func (s SKURestrictions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKURestrictions.
func (*SKURestrictions) UnmarshalJSON ¶ added in v1.0.0
func (s *SKURestrictions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictions.
type SKUTier ¶
type SKUTier string
SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
func PossibleSKUTierValues ¶
func PossibleSKUTierValues() []SKUTier
PossibleSKUTierValues returns the possible values for the SKUTier const type.
type SKUsClient ¶
type SKUsClient struct {
// contains filtered or unexported fields
}
SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.
func NewSKUsClient ¶
func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error)
NewSKUsClient creates a new instance of SKUsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SKUsClient) NewListPager ¶ added in v0.4.0
func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]
NewListPager - Returns a list of Azure Lab Services resource SKUs.
Generated from API version 2022-08-01
- options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Skus/listSkus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSKUsClient().NewListPager(&armlabservices.SKUsClientListOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedSKUInfos = armlabservices.PagedSKUInfos{ // Value: []*armlabservices.SKUInfo{ // { // Name: to.Ptr("Standard_Fv2_2_4GB_64_S_SSD"), // Capabilities: []*armlabservices.SKUCapabilities{ // { // Name: to.Ptr("vCPUs"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("MemoryGB"), // Value: to.Ptr("4"), // }, // { // Name: to.Ptr("StorageGB"), // Value: to.Ptr("64"), // }, // { // Name: to.Ptr("StorageType"), // Value: to.Ptr("StandardSSD"), // }, // { // Name: to.Ptr("HyperVGenerations"), // Value: to.Ptr("V1,V2"), // }, // { // Name: to.Ptr("IsGpu"), // Value: to.Ptr("False"), // }}, // Capacity: &armlabservices.SKUCapacity{ // Default: to.Ptr[int64](1), // Maximum: to.Ptr[int64](400), // Minimum: to.Ptr[int64](0), // ScaleType: to.Ptr(armlabservices.ScaleTypeAutomatic), // }, // Costs: []*armlabservices.SKUCost{ // { // ExtendedUnit: to.Ptr("WindowsHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](20.4), // }, // { // ExtendedUnit: to.Ptr("HybridBenefitHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](20.4), // }, // { // ExtendedUnit: to.Ptr("InactiveHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](0.7), // }, // { // ExtendedUnit: to.Ptr("LinuxHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](20.4), // }}, // Family: to.Ptr("Fv2"), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("labs"), // Size: to.Ptr("Fv2_2_4GB_64_S_SSD"), // Tier: to.Ptr(armlabservices.LabServicesSKUTierStandard), // }, // { // Name: to.Ptr("Standard_Fv2_2_4GB_256_S_SSD"), // Capabilities: []*armlabservices.SKUCapabilities{ // { // Name: to.Ptr("vCPUs"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("MemoryGB"), // Value: to.Ptr("4"), // }, // { // Name: to.Ptr("StorageGB"), // Value: to.Ptr("256"), // }, // { // Name: to.Ptr("StorageType"), // Value: to.Ptr("StandardSSD"), // }, // { // Name: to.Ptr("HyperVGenerations"), // Value: to.Ptr("V1,V2"), // }, // { // Name: to.Ptr("IsGpu"), // Value: to.Ptr("False"), // }}, // Capacity: &armlabservices.SKUCapacity{ // Default: to.Ptr[int64](1), // Maximum: to.Ptr[int64](400), // Minimum: to.Ptr[int64](0), // ScaleType: to.Ptr(armlabservices.ScaleTypeAutomatic), // }, // Costs: []*armlabservices.SKUCost{ // { // ExtendedUnit: to.Ptr("WindowsHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](22.8), // }, // { // ExtendedUnit: to.Ptr("HybridBenefitHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](22.8), // }, // { // ExtendedUnit: to.Ptr("InactiveHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](2.7), // }, // { // ExtendedUnit: to.Ptr("LinuxHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](22.8), // }}, // Family: to.Ptr("Fv2"), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("labs"), // Size: to.Ptr("Fv2_2_4GB_256_S_SSD"), // Tier: to.Ptr(armlabservices.LabServicesSKUTierStandard), // }, // { // Name: to.Ptr("Standard_Dv4_2_8GB_128_S_SSD"), // Capabilities: []*armlabservices.SKUCapabilities{ // { // Name: to.Ptr("vCPUs"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("MemoryGB"), // Value: to.Ptr("8"), // }, // { // Name: to.Ptr("StorageGB"), // Value: to.Ptr("128"), // }, // { // Name: to.Ptr("StorageType"), // Value: to.Ptr("StandardSSD"), // }, // { // Name: to.Ptr("HyperVGenerations"), // Value: to.Ptr("V1,V2"), // }, // { // Name: to.Ptr("IsGpu"), // Value: to.Ptr("False"), // }}, // Capacity: &armlabservices.SKUCapacity{ // Default: to.Ptr[int64](1), // Maximum: to.Ptr[int64](400), // Minimum: to.Ptr[int64](0), // ScaleType: to.Ptr(armlabservices.ScaleTypeAutomatic), // }, // Costs: []*armlabservices.SKUCost{ // { // ExtendedUnit: to.Ptr("WindowsHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](24.2), // }, // { // ExtendedUnit: to.Ptr("HybridBenefitHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](24.2), // }, // { // ExtendedUnit: to.Ptr("InactiveHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](1.4), // }, // { // ExtendedUnit: to.Ptr("LinuxHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](24.2), // }}, // Family: to.Ptr("Dv4"), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("labs"), // Size: to.Ptr("Dv4_2_8GB_128_S_SSD"), // Tier: to.Ptr(armlabservices.LabServicesSKUTierStandard), // }, // { // Name: to.Ptr("Standard_Dv4_2_8GB_256_S_SSD"), // Capabilities: []*armlabservices.SKUCapabilities{ // { // Name: to.Ptr("vCPUs"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("MemoryGB"), // Value: to.Ptr("8"), // }, // { // Name: to.Ptr("StorageGB"), // Value: to.Ptr("256"), // }, // { // Name: to.Ptr("StorageType"), // Value: to.Ptr("StandardSSD"), // }, // { // Name: to.Ptr("HyperVGenerations"), // Value: to.Ptr("V1,V2"), // }, // { // Name: to.Ptr("IsGpu"), // Value: to.Ptr("False"), // }}, // Capacity: &armlabservices.SKUCapacity{ // Default: to.Ptr[int64](1), // Maximum: to.Ptr[int64](400), // Minimum: to.Ptr[int64](0), // ScaleType: to.Ptr(armlabservices.ScaleTypeAutomatic), // }, // Costs: []*armlabservices.SKUCost{ // { // ExtendedUnit: to.Ptr("WindowsHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](25.8), // }, // { // ExtendedUnit: to.Ptr("HybridBenefitHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](25.8), // }, // { // ExtendedUnit: to.Ptr("InactiveHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](2.7), // }, // { // ExtendedUnit: to.Ptr("LinuxHourly"), // MeterID: to.Ptr(""), // Quantity: to.Ptr[float32](25.8), // }}, // Family: to.Ptr("Dv4"), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("labs"), // Size: to.Ptr("Dv4_2_8GB_256_S_SSD"), // Tier: to.Ptr(armlabservices.LabServicesSKUTierStandard), // }}, // } } }
Output:
type SKUsClientListOptions ¶ added in v0.2.0
type SKUsClientListOptions struct { // The filter to apply to the operation. Filter *string }
SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
type SKUsClientListResponse ¶ added in v0.2.0
type SKUsClientListResponse struct { // Paged list of lab services skus. PagedSKUInfos }
SKUsClientListResponse contains the response from method SKUsClient.NewListPager.
type SaveImageBody ¶
type SaveImageBody struct { // The ID of the lab virtual machine you want to save an image from. LabVirtualMachineID *string // The name for the image we create. Name *string }
SaveImageBody - Body for the save image POST
func (SaveImageBody) MarshalJSON ¶ added in v1.0.0
func (s SaveImageBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SaveImageBody.
func (*SaveImageBody) UnmarshalJSON ¶ added in v1.0.0
func (s *SaveImageBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SaveImageBody.
type ScaleType ¶
type ScaleType string
ScaleType - The localized name of the resource.
const ( // ScaleTypeAutomatic - The user is permitted to scale this SKU in and out. ScaleTypeAutomatic ScaleType = "Automatic" // ScaleTypeManual - The user must manually scale this SKU in and out. ScaleTypeManual ScaleType = "Manual" // ScaleTypeNone - The capacity is not adjustable in any way. ScaleTypeNone ScaleType = "None" )
func PossibleScaleTypeValues ¶
func PossibleScaleTypeValues() []ScaleType
PossibleScaleTypeValues returns the possible values for the ScaleType const type.
type Schedule ¶
type Schedule struct { // REQUIRED; Schedule resource properties Properties *ScheduleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the schedule. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Schedule for automatically turning virtual machines in a lab on and off at specified times.
func (Schedule) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Schedule.
func (*Schedule) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Schedule.
type ScheduleProperties ¶
type ScheduleProperties struct { // Notes for this schedule. Notes *string // The recurrence pattern of the scheduled actions. RecurrencePattern *RecurrencePattern // When lab user virtual machines will be started. Timestamp offsets will be ignored and timeZoneId is used instead. StartAt *time.Time // When lab user virtual machines will be stopped. Timestamp offsets will be ignored and timeZoneId is used instead. StopAt *time.Time // The IANA timezone id for the schedule. TimeZoneID *string // READ-ONLY; Current provisioning state of the schedule. ProvisioningState *ProvisioningState }
ScheduleProperties - Schedule resource properties
func (ScheduleProperties) MarshalJSON ¶
func (s ScheduleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScheduleProperties.
func (*ScheduleProperties) UnmarshalJSON ¶
func (s *ScheduleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleProperties.
type ScheduleUpdate ¶
type ScheduleUpdate struct { // Schedule resource properties Properties *ScheduleUpdateProperties }
ScheduleUpdate - Schedule for automatically turning virtual machines in a lab on and off at specified times. Used for updates.
func (ScheduleUpdate) MarshalJSON ¶
func (s ScheduleUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScheduleUpdate.
func (*ScheduleUpdate) UnmarshalJSON ¶ added in v1.0.0
func (s *ScheduleUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleUpdate.
type ScheduleUpdateProperties ¶
type ScheduleUpdateProperties struct { // Notes for this schedule. Notes *string // The recurrence pattern of the scheduled actions. RecurrencePattern *RecurrencePattern // When lab user virtual machines will be started. Timestamp offsets will be ignored and timeZoneId is used instead. StartAt *time.Time // When lab user virtual machines will be stopped. Timestamp offsets will be ignored and timeZoneId is used instead. StopAt *time.Time // The IANA timezone id for the schedule. TimeZoneID *string }
ScheduleUpdateProperties - Schedule resource properties used for updates.
func (ScheduleUpdateProperties) MarshalJSON ¶
func (s ScheduleUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScheduleUpdateProperties.
func (*ScheduleUpdateProperties) UnmarshalJSON ¶
func (s *ScheduleUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleUpdateProperties.
type SchedulesClient ¶
type SchedulesClient struct {
// contains filtered or unexported fields
}
SchedulesClient contains the methods for the Schedules group. Don't use this type directly, use NewSchedulesClient() instead.
func NewSchedulesClient ¶
func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SchedulesClient, error)
NewSchedulesClient creates a new instance of SchedulesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SchedulesClient) BeginDelete ¶
func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupName string, labName string, scheduleName string, options *SchedulesClientBeginDeleteOptions) (*runtime.Poller[SchedulesClientDeleteResponse], error)
BeginDelete - Operation to delete a schedule resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- scheduleName - The name of the schedule that uniquely identifies it within containing lab. Used in resource URIs.
- options - SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/deleteSchedule.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSchedulesClient().BeginDelete(ctx, "testrg123", "testlab", "schedule1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SchedulesClient) CreateOrUpdate ¶
func (client *SchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, scheduleName string, body Schedule, options *SchedulesClientCreateOrUpdateOptions) (SchedulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Operation to create or update a lab schedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- scheduleName - The name of the schedule that uniquely identifies it within containing lab. Used in resource URIs.
- body - The request body.
- options - SchedulesClientCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/putSchedule.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSchedulesClient().CreateOrUpdate(ctx, "testrg123", "testlab", "schedule1", armlabservices.Schedule{ Properties: &armlabservices.ScheduleProperties{ Notes: to.Ptr("Schedule 1 for students"), RecurrencePattern: &armlabservices.RecurrencePattern{ ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t }()), Frequency: to.Ptr(armlabservices.RecurrenceFrequencyDaily), Interval: to.Ptr[int32](2), }, StartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T12:00:00.000Z"); return t }()), StopAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T18:00:00.000Z"); return t }()), TimeZoneID: to.Ptr("America/Los_Angeles"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Schedule = armlabservices.Schedule{ // Name: to.Ptr("schedule1"), // Type: to.Ptr("Microsoft.LabServices/Schedule"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1"), // Properties: &armlabservices.ScheduleProperties{ // Notes: to.Ptr("Schedule 1 for students"), // RecurrencePattern: &armlabservices.RecurrencePattern{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t}()), // Frequency: to.Ptr(armlabservices.RecurrenceFrequencyDaily), // Interval: to.Ptr[int32](2), // }, // StartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T12:00:00.000Z"); return t}()), // StopAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T18:00:00.000Z"); return t}()), // TimeZoneID: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*SchedulesClient) Get ¶
func (client *SchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, scheduleName string, options *SchedulesClientGetOptions) (SchedulesClientGetResponse, error)
Get - Returns the properties of a lab Schedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- scheduleName - The name of the schedule that uniquely identifies it within containing lab. Used in resource URIs.
- options - SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/getSchedule.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSchedulesClient().Get(ctx, "testrg123", "testlab", "schedule1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Schedule = armlabservices.Schedule{ // Name: to.Ptr("schedule1"), // Type: to.Ptr("Microsoft.LabServices/Schedule"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1"), // Properties: &armlabservices.ScheduleProperties{ // Notes: to.Ptr("Schedule 1 for students"), // RecurrencePattern: &armlabservices.RecurrencePattern{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t}()), // Frequency: to.Ptr(armlabservices.RecurrenceFrequencyDaily), // Interval: to.Ptr[int32](1), // }, // StartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T12:00:00.000Z"); return t}()), // StopAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T18:00:00.000Z"); return t}()), // TimeZoneID: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*SchedulesClient) NewListByLabPager ¶ added in v0.4.0
func (client *SchedulesClient) NewListByLabPager(resourceGroupName string, labName string, options *SchedulesClientListByLabOptions) *runtime.Pager[SchedulesClientListByLabResponse]
NewListByLabPager - Returns a list of all schedules for a lab.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - SchedulesClientListByLabOptions contains the optional parameters for the SchedulesClient.NewListByLabPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/listSchedule.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSchedulesClient().NewListByLabPager("testrg123", "testlab", &armlabservices.SchedulesClientListByLabOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedSchedules = armlabservices.PagedSchedules{ // Value: []*armlabservices.Schedule{ // { // Name: to.Ptr("schedule1"), // Type: to.Ptr("Microsoft.LabServices/Schedule"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1"), // Properties: &armlabservices.ScheduleProperties{ // Notes: to.Ptr("Schedule 1 for students"), // RecurrencePattern: &armlabservices.RecurrencePattern{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t}()), // Frequency: to.Ptr(armlabservices.RecurrenceFrequencyDaily), // Interval: to.Ptr[int32](1), // }, // StartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T12:00:00.000Z"); return t}()), // StopAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T18:00:00.000Z"); return t}()), // TimeZoneID: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("schedule2"), // Type: to.Ptr("Microsoft.LabServices/Schedule"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule2"), // Properties: &armlabservices.ScheduleProperties{ // Notes: to.Ptr("Schedule 2 for students"), // RecurrencePattern: &armlabservices.RecurrencePattern{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t}()), // Frequency: to.Ptr(armlabservices.RecurrenceFrequencyWeekly), // WeekDays: []*armlabservices.WeekDay{ // to.Ptr(armlabservices.WeekDayMonday), // to.Ptr(armlabservices.WeekDayTuesday), // to.Ptr(armlabservices.WeekDayWednesday), // to.Ptr(armlabservices.WeekDayThursday), // to.Ptr(armlabservices.WeekDayFriday)}, // }, // StartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T12:00:00.000Z"); return t}()), // StopAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T18:00:00.000Z"); return t}()), // TimeZoneID: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*SchedulesClient) Update ¶
func (client *SchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, scheduleName string, body ScheduleUpdate, options *SchedulesClientUpdateOptions) (SchedulesClientUpdateResponse, error)
Update - Operation to update a lab schedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- scheduleName - The name of the schedule that uniquely identifies it within containing lab. Used in resource URIs.
- body - The request body.
- options - SchedulesClientUpdateOptions contains the optional parameters for the SchedulesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/patchSchedule.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSchedulesClient().Update(ctx, "testrg123", "testlab", "schedule1", armlabservices.ScheduleUpdate{ Properties: &armlabservices.ScheduleUpdateProperties{ RecurrencePattern: &armlabservices.RecurrencePattern{ ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t }()), Frequency: to.Ptr(armlabservices.RecurrenceFrequencyDaily), Interval: to.Ptr[int32](2), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Schedule = armlabservices.Schedule{ // Name: to.Ptr("schedule1"), // Type: to.Ptr("Microsoft.LabServices/Schedule"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1"), // Properties: &armlabservices.ScheduleProperties{ // Notes: to.Ptr("Schedule 1 for students"), // RecurrencePattern: &armlabservices.RecurrencePattern{ // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-14T23:59:59.000Z"); return t}()), // Frequency: to.Ptr(armlabservices.RecurrenceFrequencyDaily), // Interval: to.Ptr[int32](2), // }, // StartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T12:00:00.000Z"); return t}()), // StopAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-26T18:00:00.000Z"); return t}()), // TimeZoneID: to.Ptr("America/Los_Angeles"), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
type SchedulesClientBeginDeleteOptions ¶ added in v0.2.0
type SchedulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method.
type SchedulesClientCreateOrUpdateOptions ¶ added in v0.2.0
type SchedulesClientCreateOrUpdateOptions struct { }
SchedulesClientCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.CreateOrUpdate method.
type SchedulesClientCreateOrUpdateResponse ¶ added in v0.2.0
type SchedulesClientCreateOrUpdateResponse struct { // Schedule for automatically turning virtual machines in a lab on and off at specified times. Schedule }
SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.CreateOrUpdate.
type SchedulesClientDeleteResponse ¶ added in v0.2.0
type SchedulesClientDeleteResponse struct { }
SchedulesClientDeleteResponse contains the response from method SchedulesClient.BeginDelete.
type SchedulesClientGetOptions ¶ added in v0.2.0
type SchedulesClientGetOptions struct { }
SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method.
type SchedulesClientGetResponse ¶ added in v0.2.0
type SchedulesClientGetResponse struct { // Schedule for automatically turning virtual machines in a lab on and off at specified times. Schedule }
SchedulesClientGetResponse contains the response from method SchedulesClient.Get.
type SchedulesClientListByLabOptions ¶ added in v0.2.0
type SchedulesClientListByLabOptions struct { // The filter to apply to the operation. Filter *string }
SchedulesClientListByLabOptions contains the optional parameters for the SchedulesClient.NewListByLabPager method.
type SchedulesClientListByLabResponse ¶ added in v0.2.0
type SchedulesClientListByLabResponse struct { // Paged list of schedules. PagedSchedules }
SchedulesClientListByLabResponse contains the response from method SchedulesClient.NewListByLabPager.
type SchedulesClientUpdateOptions ¶ added in v0.2.0
type SchedulesClientUpdateOptions struct { }
SchedulesClientUpdateOptions contains the optional parameters for the SchedulesClient.Update method.
type SchedulesClientUpdateResponse ¶ added in v0.2.0
type SchedulesClientUpdateResponse struct { // Schedule for automatically turning virtual machines in a lab on and off at specified times. Schedule }
SchedulesClientUpdateResponse contains the response from method SchedulesClient.Update.
type SecurityProfile ¶
type SecurityProfile struct { // Whether any user or only specified users can register to a lab. OpenAccess *EnableState // READ-ONLY; The registration code for the lab. RegistrationCode *string }
SecurityProfile - The lab security profile.
func (SecurityProfile) MarshalJSON ¶ added in v1.0.0
func (s SecurityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityProfile.
func (*SecurityProfile) UnmarshalJSON ¶ added in v1.0.0
func (s *SecurityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile.
type ShutdownOnIdleMode ¶
type ShutdownOnIdleMode string
ShutdownOnIdleMode - Defines whether to shut down VM on idle and the criteria for idle detection.
const ( // ShutdownOnIdleModeLowUsage - The VM will be considered as idle when user is absent and the resource (CPU and disk) consumption // is low. ShutdownOnIdleModeLowUsage ShutdownOnIdleMode = "LowUsage" // ShutdownOnIdleModeNone - The VM won't be shut down when it is idle. ShutdownOnIdleModeNone ShutdownOnIdleMode = "None" // ShutdownOnIdleModeUserAbsence - The VM will be considered as idle when there is no keyboard or mouse input. ShutdownOnIdleModeUserAbsence ShutdownOnIdleMode = "UserAbsence" )
func PossibleShutdownOnIdleModeValues ¶
func PossibleShutdownOnIdleModeValues() []ShutdownOnIdleMode
PossibleShutdownOnIdleModeValues returns the possible values for the ShutdownOnIdleMode const type.
type SupportInfo ¶
type SupportInfo struct { // Support contact email address. Email *string // Support instructions. Instructions *string // Support contact phone number. Phone *string // Support web address. URL *string }
SupportInfo - Support contact information and instructions.
func (SupportInfo) MarshalJSON ¶ added in v1.0.0
func (s SupportInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SupportInfo.
func (*SupportInfo) UnmarshalJSON ¶ added in v1.0.0
func (s *SupportInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SupportInfo.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.0.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type TrackedResourceUpdate ¶
type TrackedResourceUpdate struct { // Resource tags. Tags []*string }
TrackedResourceUpdate - Base tracked resource type for all PATCH updates.
func (TrackedResourceUpdate) MarshalJSON ¶
func (t TrackedResourceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResourceUpdate.
func (*TrackedResourceUpdate) UnmarshalJSON ¶ added in v1.0.0
func (t *TrackedResourceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResourceUpdate.
type Usage ¶
type Usage struct { // The current usage. CurrentValue *int64 // The fully qualified arm resource id. ID *string // The limit integer. Limit *int64 // The name. Name *UsageName // The unit details. Unit *UsageUnit }
Usage - The core usage details.
func (Usage) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
type UsageName ¶
type UsageName struct { // The localized name of the resource. LocalizedValue *string // The instances of the resource. SKUInstances []*string // The name of the resource. Value *string }
UsageName - The Usage Names.
func (UsageName) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaller interface for type UsageName.
func (*UsageName) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.
type UsageUnit ¶
type UsageUnit string
UsageUnit - The unit details.
const (
UsageUnitCount UsageUnit = "Count"
)
func PossibleUsageUnitValues ¶
func PossibleUsageUnitValues() []UsageUnit
PossibleUsageUnitValues returns the possible values for the UsageUnit const type.
type UsagesClient ¶
type UsagesClient struct {
// contains filtered or unexported fields
}
UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.
func NewUsagesClient ¶
func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)
NewUsagesClient creates a new instance of UsagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UsagesClient) NewListByLocationPager ¶ added in v0.4.0
func (client *UsagesClient) NewListByLocationPager(location string, options *UsagesClientListByLocationOptions) *runtime.Pager[UsagesClientListByLocationResponse]
NewListByLocationPager - Returns list of usage per SKU family for the specified subscription in the specified region.
Generated from API version 2022-08-01
- location - The location name.
- options - UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Usages/getUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsagesClient().NewListByLocationPager("eastus2", &armlabservices.UsagesClientListByLocationOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListUsagesResult = armlabservices.ListUsagesResult{ // Value: []*armlabservices.Usage{ // { // Name: &armlabservices.UsageName{ // Value: to.Ptr("NCasv3T4"), // }, // CurrentValue: to.Ptr[int64](10), // ID: to.Ptr(""), // Limit: to.Ptr[int64](100), // Unit: to.Ptr(armlabservices.UsageUnitCount), // }, // { // Name: &armlabservices.UsageName{ // Value: to.Ptr("ESv4"), // }, // CurrentValue: to.Ptr[int64](5), // ID: to.Ptr(""), // Limit: to.Ptr[int64](30), // Unit: to.Ptr(armlabservices.UsageUnitCount), // }}, // } } }
Output:
type UsagesClientListByLocationOptions ¶ added in v0.2.0
type UsagesClientListByLocationOptions struct { // The filter to apply to the operation. Filter *string }
UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method.
type UsagesClientListByLocationResponse ¶ added in v0.2.0
type UsagesClientListByLocationResponse struct { // List of Core Usages. ListUsagesResult }
UsagesClientListByLocationResponse contains the response from method UsagesClient.NewListByLocationPager.
type User ¶
type User struct { // REQUIRED; User resource properties Properties *UserProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the user resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
User of a lab that can register for and use virtual machines within the lab.
func (User) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type User.
func (*User) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaller interface for type User.
type UserProperties ¶
type UserProperties struct { // REQUIRED; Email address of the user. Email *string // The amount of usage quota time the user gets in addition to the lab usage quota. AdditionalUsageQuota *string // READ-ONLY; Display name of the user, for example user's full name. DisplayName *string // READ-ONLY; Date and time when the invitation message was sent to the user. InvitationSent *time.Time // READ-ONLY; State of the invitation message for the user. InvitationState *InvitationState // READ-ONLY; Current provisioning state of the user resource. ProvisioningState *ProvisioningState // READ-ONLY; State of the user's registration within the lab. RegistrationState *RegistrationState // READ-ONLY; How long the user has used their virtual machines in this lab. TotalUsage *string }
UserProperties - User resource properties
func (UserProperties) MarshalJSON ¶
func (u UserProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserProperties.
func (*UserProperties) UnmarshalJSON ¶
func (u *UserProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserProperties.
type UserUpdate ¶
type UserUpdate struct { // User resource properties Properties *UserUpdateProperties }
UserUpdate - User of a lab that can register for and use virtual machines within the lab. Used for updates.
func (UserUpdate) MarshalJSON ¶
func (u UserUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserUpdate.
func (*UserUpdate) UnmarshalJSON ¶ added in v1.0.0
func (u *UserUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdate.
type UserUpdateProperties ¶
type UserUpdateProperties struct { // The amount of usage quota time the user gets in addition to the lab usage quota. AdditionalUsageQuota *string }
UserUpdateProperties - User resource properties used for updates.
func (UserUpdateProperties) MarshalJSON ¶
func (u UserUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserUpdateProperties.
func (*UserUpdateProperties) UnmarshalJSON ¶
func (u *UserUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateProperties.
type UsersClient ¶
type UsersClient struct {
// contains filtered or unexported fields
}
UsersClient contains the methods for the Users group. Don't use this type directly, use NewUsersClient() instead.
func NewUsersClient ¶
func NewUsersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsersClient, error)
NewUsersClient creates a new instance of UsersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UsersClient) BeginCreateOrUpdate ¶
func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, body User, options *UsersClientBeginCreateOrUpdateOptions) (*runtime.Poller[UsersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Operation to create or update a lab user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- userName - The name of the user that uniquely identifies it within containing lab. Used in resource URIs.
- body - The request body.
- options - UsersClientBeginCreateOrUpdateOptions contains the optional parameters for the UsersClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/putUser.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUsersClient().BeginCreateOrUpdate(ctx, "testrg123", "testlab", "testuser", armlabservices.User{ Properties: &armlabservices.UserProperties{ AdditionalUsageQuota: to.Ptr("PT10H"), Email: to.Ptr("testuser@contoso.com"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.User = armlabservices.User{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.LabServices/User"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser"), // Properties: &armlabservices.UserProperties{ // AdditionalUsageQuota: to.Ptr("PT10H"), // DisplayName: to.Ptr("Test User"), // Email: to.Ptr("testuser@contoso.com"), // InvitationState: to.Ptr(armlabservices.InvitationStateSent), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // RegistrationState: to.Ptr(armlabservices.RegistrationStateRegistered), // TotalUsage: to.Ptr("PT10H"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*UsersClient) BeginDelete ¶
func (client *UsersClient) BeginDelete(ctx context.Context, resourceGroupName string, labName string, userName string, options *UsersClientBeginDeleteOptions) (*runtime.Poller[UsersClientDeleteResponse], error)
BeginDelete - Operation to delete a user resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- userName - The name of the user that uniquely identifies it within containing lab. Used in resource URIs.
- options - UsersClientBeginDeleteOptions contains the optional parameters for the UsersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/deleteUser.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUsersClient().BeginDelete(ctx, "testrg123", "testlab", "testuser", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*UsersClient) BeginInvite ¶
func (client *UsersClient) BeginInvite(ctx context.Context, resourceGroupName string, labName string, userName string, body InviteBody, options *UsersClientBeginInviteOptions) (*runtime.Poller[UsersClientInviteResponse], error)
BeginInvite - Operation to invite a user to a lab. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- userName - The name of the user that uniquely identifies it within containing lab. Used in resource URIs.
- body - The request body.
- options - UsersClientBeginInviteOptions contains the optional parameters for the UsersClient.BeginInvite method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/inviteUser.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUsersClient().BeginInvite(ctx, "testrg123", "testlab", "testuser", armlabservices.InviteBody{ Text: to.Ptr("Invitation to lab testlab"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*UsersClient) BeginUpdate ¶
func (client *UsersClient) BeginUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, body UserUpdate, options *UsersClientBeginUpdateOptions) (*runtime.Poller[UsersClientUpdateResponse], error)
BeginUpdate - Operation to update a lab user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- userName - The name of the user that uniquely identifies it within containing lab. Used in resource URIs.
- body - The request body.
- options - UsersClientBeginUpdateOptions contains the optional parameters for the UsersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/patchUser.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewUsersClient().BeginUpdate(ctx, "testrg123", "testlab", "testuser", armlabservices.UserUpdate{ Properties: &armlabservices.UserUpdateProperties{ AdditionalUsageQuota: to.Ptr("PT10H"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.User = armlabservices.User{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.LabServices/User"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser"), // Properties: &armlabservices.UserProperties{ // AdditionalUsageQuota: to.Ptr("PT10H"), // DisplayName: to.Ptr("Test User"), // Email: to.Ptr("testuser@contoso.com"), // InvitationState: to.Ptr(armlabservices.InvitationStateSent), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // RegistrationState: to.Ptr(armlabservices.RegistrationStateRegistered), // TotalUsage: to.Ptr("PT10H"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*UsersClient) Get ¶
func (client *UsersClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, options *UsersClientGetOptions) (UsersClientGetResponse, error)
Get - Returns the properties of a lab user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- userName - The name of the user that uniquely identifies it within containing lab. Used in resource URIs.
- options - UsersClientGetOptions contains the optional parameters for the UsersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/getUser.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewUsersClient().Get(ctx, "testrg123", "testlab", "testuser", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.User = armlabservices.User{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.LabServices/User"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser"), // Properties: &armlabservices.UserProperties{ // AdditionalUsageQuota: to.Ptr("PT10H"), // DisplayName: to.Ptr("Test User"), // Email: to.Ptr("testuser@contoso.com"), // InvitationState: to.Ptr(armlabservices.InvitationStateSent), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // RegistrationState: to.Ptr(armlabservices.RegistrationStateRegistered), // TotalUsage: to.Ptr("PT10H"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*UsersClient) NewListByLabPager ¶ added in v0.4.0
func (client *UsersClient) NewListByLabPager(resourceGroupName string, labName string, options *UsersClientListByLabOptions) *runtime.Pager[UsersClientListByLabResponse]
NewListByLabPager - Returns a list of all users for a lab.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - UsersClientListByLabOptions contains the optional parameters for the UsersClient.NewListByLabPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/listUser.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsersClient().NewListByLabPager("testrg123", "testlab", &armlabservices.UsersClientListByLabOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedUsers = armlabservices.PagedUsers{ // Value: []*armlabservices.User{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.LabServices/User"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser"), // Properties: &armlabservices.UserProperties{ // AdditionalUsageQuota: to.Ptr("PT10H"), // DisplayName: to.Ptr("Test User"), // Email: to.Ptr("testuser@contoso.com"), // InvitationState: to.Ptr(armlabservices.InvitationStateSent), // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // RegistrationState: to.Ptr(armlabservices.RegistrationStateRegistered), // TotalUsage: to.Ptr("PT10H"), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
type UsersClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type UsersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
UsersClientBeginCreateOrUpdateOptions contains the optional parameters for the UsersClient.BeginCreateOrUpdate method.
type UsersClientBeginDeleteOptions ¶ added in v0.2.0
type UsersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
UsersClientBeginDeleteOptions contains the optional parameters for the UsersClient.BeginDelete method.
type UsersClientBeginInviteOptions ¶ added in v0.2.0
type UsersClientBeginInviteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
UsersClientBeginInviteOptions contains the optional parameters for the UsersClient.BeginInvite method.
type UsersClientBeginUpdateOptions ¶ added in v0.2.0
type UsersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
UsersClientBeginUpdateOptions contains the optional parameters for the UsersClient.BeginUpdate method.
type UsersClientCreateOrUpdateResponse ¶ added in v0.2.0
type UsersClientCreateOrUpdateResponse struct { // User of a lab that can register for and use virtual machines within the lab. User }
UsersClientCreateOrUpdateResponse contains the response from method UsersClient.BeginCreateOrUpdate.
type UsersClientDeleteResponse ¶ added in v0.2.0
type UsersClientDeleteResponse struct { }
UsersClientDeleteResponse contains the response from method UsersClient.BeginDelete.
type UsersClientGetOptions ¶ added in v0.2.0
type UsersClientGetOptions struct { }
UsersClientGetOptions contains the optional parameters for the UsersClient.Get method.
type UsersClientGetResponse ¶ added in v0.2.0
type UsersClientGetResponse struct { // User of a lab that can register for and use virtual machines within the lab. User }
UsersClientGetResponse contains the response from method UsersClient.Get.
type UsersClientInviteResponse ¶ added in v0.2.0
type UsersClientInviteResponse struct { }
UsersClientInviteResponse contains the response from method UsersClient.BeginInvite.
type UsersClientListByLabOptions ¶ added in v0.2.0
type UsersClientListByLabOptions struct { // The filter to apply to the operation. Filter *string }
UsersClientListByLabOptions contains the optional parameters for the UsersClient.NewListByLabPager method.
type UsersClientListByLabResponse ¶ added in v0.2.0
type UsersClientListByLabResponse struct { // Paged list of users. PagedUsers }
UsersClientListByLabResponse contains the response from method UsersClient.NewListByLabPager.
type UsersClientUpdateResponse ¶ added in v0.2.0
type UsersClientUpdateResponse struct { // User of a lab that can register for and use virtual machines within the lab. User }
UsersClientUpdateResponse contains the response from method UsersClient.BeginUpdate.
type VirtualMachine ¶
type VirtualMachine struct { // REQUIRED; Virtual machine resource properties Properties *VirtualMachineProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; System data of the Lab virtual machine. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
VirtualMachine - A lab virtual machine resource.
func (VirtualMachine) MarshalJSON ¶
func (v VirtualMachine) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachine.
func (*VirtualMachine) UnmarshalJSON ¶ added in v1.0.0
func (v *VirtualMachine) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine.
type VirtualMachineAdditionalCapabilities ¶
type VirtualMachineAdditionalCapabilities struct { // Flag to pre-install dedicated GPU drivers. InstallGpuDrivers *EnableState }
VirtualMachineAdditionalCapabilities - The additional capabilities for a lab VM.
func (VirtualMachineAdditionalCapabilities) MarshalJSON ¶ added in v1.0.0
func (v VirtualMachineAdditionalCapabilities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineAdditionalCapabilities.
func (*VirtualMachineAdditionalCapabilities) UnmarshalJSON ¶ added in v1.0.0
func (v *VirtualMachineAdditionalCapabilities) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineAdditionalCapabilities.
type VirtualMachineConnectionProfile ¶
type VirtualMachineConnectionProfile struct { // READ-ONLY; The username used to log on to the virtual machine as admin. AdminUsername *string // READ-ONLY; The username used to log on to the virtual machine as non-admin, if one exists. NonAdminUsername *string // READ-ONLY; The private IP address of the virtual machine. PrivateIPAddress *string // READ-ONLY; Port and host name separated by semicolon for connecting via RDP protocol to the virtual machine. RdpAuthority *string // READ-ONLY; URL for connecting via RDP protocol to the virtual machine in browser. RdpInBrowserURL *string // READ-ONLY; Port and host name separated by semicolon for connecting via SSH protocol to the virtual machine. SSHAuthority *string // READ-ONLY; URL for connecting via SSH protocol to the virtual machine in browser. SSHInBrowserURL *string }
VirtualMachineConnectionProfile - The connection information for the virtual machine
func (VirtualMachineConnectionProfile) MarshalJSON ¶ added in v1.0.0
func (v VirtualMachineConnectionProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineConnectionProfile.
func (*VirtualMachineConnectionProfile) UnmarshalJSON ¶ added in v1.0.0
func (v *VirtualMachineConnectionProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineConnectionProfile.
type VirtualMachineProfile ¶
type VirtualMachineProfile struct { // REQUIRED; Credentials for the admin user on the VM. AdminUser *Credentials // REQUIRED; Indicates what lab virtual machines are created from. CreateOption *CreateOption // REQUIRED; The image configuration for lab virtual machines. ImageReference *ImageReference // REQUIRED; The SKU for the lab. Defines the type of virtual machines used in the lab. SKU *SKU // REQUIRED; The initial quota alloted to each lab user. Must be a time span between 0 and 9999 hours. UsageQuota *string // Additional VM capabilities. AdditionalCapabilities *VirtualMachineAdditionalCapabilities // Credentials for the non-admin user on the VM, if one exists. NonAdminUser *Credentials UseSharedPassword *EnableState // READ-ONLY; The OS type of the image OSType *OsType }
VirtualMachineProfile - The base virtual machine configuration for a lab.
func (VirtualMachineProfile) MarshalJSON ¶ added in v1.0.0
func (v VirtualMachineProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineProfile.
func (*VirtualMachineProfile) UnmarshalJSON ¶ added in v1.0.0
func (v *VirtualMachineProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProfile.
type VirtualMachineProperties ¶
type VirtualMachineProperties struct { // READ-ONLY; The lab user ID (not the PUID!) of who claimed the virtual machine. ClaimedByUserID *string // READ-ONLY; Profile for information about connecting to the virtual machine. ConnectionProfile *VirtualMachineConnectionProfile // READ-ONLY; Current provisioning state of the virtual machine. ProvisioningState *ProvisioningState // READ-ONLY; The current state of the virtual machine State *VirtualMachineState // READ-ONLY; The type of this VM resource VMType *VirtualMachineType }
VirtualMachineProperties - Virtual machine resource properties
func (VirtualMachineProperties) MarshalJSON ¶ added in v1.0.0
func (v VirtualMachineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.
func (*VirtualMachineProperties) UnmarshalJSON ¶ added in v1.0.0
func (v *VirtualMachineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProperties.
type VirtualMachineState ¶
type VirtualMachineState string
VirtualMachineState - The state of a virtual machine.
const ( // VirtualMachineStateRedeploying - The VM is being redeployed. VirtualMachineStateRedeploying VirtualMachineState = "Redeploying" // VirtualMachineStateReimaging - The VM is being reimaged. VirtualMachineStateReimaging VirtualMachineState = "Reimaging" // VirtualMachineStateResettingPassword - The VM password is being reset. VirtualMachineStateResettingPassword VirtualMachineState = "ResettingPassword" // VirtualMachineStateRunning - The VM is running. VirtualMachineStateRunning VirtualMachineState = "Running" // VirtualMachineStateStarting - The VM is starting. VirtualMachineStateStarting VirtualMachineState = "Starting" // VirtualMachineStateStopped - The VM is currently stopped. VirtualMachineStateStopped VirtualMachineState = "Stopped" // VirtualMachineStateStopping - The VM is stopping. VirtualMachineStateStopping VirtualMachineState = "Stopping" )
func PossibleVirtualMachineStateValues ¶
func PossibleVirtualMachineStateValues() []VirtualMachineState
PossibleVirtualMachineStateValues returns the possible values for the VirtualMachineState const type.
type VirtualMachineType ¶
type VirtualMachineType string
VirtualMachineType - The type of the lab virtual machine.
const ( // VirtualMachineTypeTemplate - A template VM VirtualMachineTypeTemplate VirtualMachineType = "Template" // VirtualMachineTypeUser - A user VM VirtualMachineTypeUser VirtualMachineType = "User" )
func PossibleVirtualMachineTypeValues ¶
func PossibleVirtualMachineTypeValues() []VirtualMachineType
PossibleVirtualMachineTypeValues returns the possible values for the VirtualMachineType const type.
type VirtualMachinesClient ¶
type VirtualMachinesClient struct {
// contains filtered or unexported fields
}
VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.
func NewVirtualMachinesClient ¶
func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachinesClient) BeginRedeploy ¶
func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, options *VirtualMachinesClientBeginRedeployOptions) (*runtime.Poller[VirtualMachinesClientRedeployResponse], error)
BeginRedeploy - Action to redeploy a lab virtual machine to a different compute node. For troubleshooting connectivity. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- virtualMachineName - The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.
- options - VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/redeployVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginRedeploy(ctx, "testrg123", "testlab", "template", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginReimage ¶
func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, options *VirtualMachinesClientBeginReimageOptions) (*runtime.Poller[VirtualMachinesClientReimageResponse], error)
BeginReimage - Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest published snapshot of the reference environment of the lab. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- virtualMachineName - The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.
- options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/reimageVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginReimage(ctx, "testrg123", "testlab", "template", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginResetPassword ¶
func (client *VirtualMachinesClient) BeginResetPassword(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, body ResetPasswordBody, options *VirtualMachinesClientBeginResetPasswordOptions) (*runtime.Poller[VirtualMachinesClientResetPasswordResponse], error)
BeginResetPassword - Resets a lab virtual machine password. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- virtualMachineName - The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.
- body - The request body.
- options - VirtualMachinesClientBeginResetPasswordOptions contains the optional parameters for the VirtualMachinesClient.BeginResetPassword method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/resetPasswordVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginResetPassword(ctx, "testrg123", "testlab", "template", armlabservices.ResetPasswordBody{ Password: to.Ptr("example-password"), Username: to.Ptr("example-username"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginStart ¶
func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, options *VirtualMachinesClientBeginStartOptions) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
BeginStart - Action to start a lab virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- virtualMachineName - The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.
- options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/startVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginStart(ctx, "testrg123", "testlab", "template", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginStop ¶
func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, options *VirtualMachinesClientBeginStopOptions) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
BeginStop - Action to stop a lab virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- virtualMachineName - The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.
- options - VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/stopVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginStop(ctx, "testrg123", "testlab", "template", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) Get ¶
func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error)
Get - Returns the properties for a lab virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- virtualMachineName - The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.
- options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/getVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachinesClient().Get(ctx, "testrg123", "testlab", "template", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armlabservices.VirtualMachine{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.LabServices/VirtualMachine"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/virtualMachines/template"), // Properties: &armlabservices.VirtualMachineProperties{ // ClaimedByUserID: to.Ptr("testuser567"), // ConnectionProfile: &armlabservices.VirtualMachineConnectionProfile{ // AdminUsername: to.Ptr("user123"), // PrivateIPAddress: to.Ptr("192.168.2.1"), // RdpAuthority: to.Ptr("vm-42.contoso.com:3389"), // RdpInBrowserURL: to.Ptr("vm-42.contoso.com"), // SSHAuthority: to.Ptr("vm-42.contoso.com:22"), // SSHInBrowserURL: to.Ptr("vm-42.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.VirtualMachineStateRunning), // VMType: to.Ptr(armlabservices.VirtualMachineTypeTemplate), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // } }
Output:
func (*VirtualMachinesClient) NewListByLabPager ¶ added in v0.4.0
func (client *VirtualMachinesClient) NewListByLabPager(resourceGroupName string, labName string, options *VirtualMachinesClientListByLabOptions) *runtime.Pager[VirtualMachinesClientListByLabResponse]
NewListByLabPager - Returns a list of all virtual machines for a lab.
Generated from API version 2022-08-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- labName - The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.
- options - VirtualMachinesClientListByLabOptions contains the optional parameters for the VirtualMachinesClient.NewListByLabPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4c2cdccf6ca3281dd50ed8788ce1de2e0d480973/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/listVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/labservices/armlabservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlabservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachinesClient().NewListByLabPager("testrg123", "testlab", &armlabservices.VirtualMachinesClientListByLabOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PagedVirtualMachines = armlabservices.PagedVirtualMachines{ // Value: []*armlabservices.VirtualMachine{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.LabServices/VirtualMachine"), // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/virtualMachines/template"), // Properties: &armlabservices.VirtualMachineProperties{ // ClaimedByUserID: to.Ptr("testuser567"), // ConnectionProfile: &armlabservices.VirtualMachineConnectionProfile{ // AdminUsername: to.Ptr("user123"), // PrivateIPAddress: to.Ptr("192.168.2.1"), // RdpAuthority: to.Ptr("vm-42.contoso.com:3389"), // RdpInBrowserURL: to.Ptr("vm-42.contoso.com"), // SSHAuthority: to.Ptr("vm-42.contoso.com:22"), // SSHInBrowserURL: to.Ptr("vm-42.contoso.com"), // }, // ProvisioningState: to.Ptr(armlabservices.ProvisioningStateSucceeded), // State: to.Ptr(armlabservices.VirtualMachineStateRunning), // VMType: to.Ptr(armlabservices.VirtualMachineTypeTemplate), // }, // SystemData: &armlabservices.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T10:00:00.000Z"); return t}()), // CreatedBy: to.Ptr("identity123"), // CreatedByType: to.Ptr(armlabservices.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-01T09:12:28.000Z"); return t}()), // LastModifiedBy: to.Ptr("identity123"), // LastModifiedByType: to.Ptr(armlabservices.CreatedByTypeUser), // }, // }}, // } } }
Output:
type VirtualMachinesClientBeginRedeployOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginRedeployOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy method.
type VirtualMachinesClientBeginReimageOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginReimageOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage method.
type VirtualMachinesClientBeginResetPasswordOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginResetPasswordOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginResetPasswordOptions contains the optional parameters for the VirtualMachinesClient.BeginResetPassword method.
type VirtualMachinesClientBeginStartOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
type VirtualMachinesClientBeginStopOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
type VirtualMachinesClientGetOptions ¶ added in v0.2.0
type VirtualMachinesClientGetOptions struct { }
VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
type VirtualMachinesClientGetResponse ¶ added in v0.2.0
type VirtualMachinesClientGetResponse struct { // A lab virtual machine resource. VirtualMachine }
VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.
type VirtualMachinesClientListByLabOptions ¶ added in v0.2.0
type VirtualMachinesClientListByLabOptions struct { // The filter to apply to the operation. Filter *string }
VirtualMachinesClientListByLabOptions contains the optional parameters for the VirtualMachinesClient.NewListByLabPager method.
type VirtualMachinesClientListByLabResponse ¶ added in v0.2.0
type VirtualMachinesClientListByLabResponse struct { // Paged list of lab services virtual machines. PagedVirtualMachines }
VirtualMachinesClientListByLabResponse contains the response from method VirtualMachinesClient.NewListByLabPager.
type VirtualMachinesClientRedeployResponse ¶ added in v0.2.0
type VirtualMachinesClientRedeployResponse struct { }
VirtualMachinesClientRedeployResponse contains the response from method VirtualMachinesClient.BeginRedeploy.
type VirtualMachinesClientReimageResponse ¶ added in v0.2.0
type VirtualMachinesClientReimageResponse struct { }
VirtualMachinesClientReimageResponse contains the response from method VirtualMachinesClient.BeginReimage.
type VirtualMachinesClientResetPasswordResponse ¶ added in v0.2.0
type VirtualMachinesClientResetPasswordResponse struct { }
VirtualMachinesClientResetPasswordResponse contains the response from method VirtualMachinesClient.BeginResetPassword.
type VirtualMachinesClientStartResponse ¶ added in v0.2.0
type VirtualMachinesClientStartResponse struct { }
VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.BeginStart.
type VirtualMachinesClientStopResponse ¶ added in v0.2.0
type VirtualMachinesClientStopResponse struct { }
VirtualMachinesClientStopResponse contains the response from method VirtualMachinesClient.BeginStop.
type WeekDay ¶
type WeekDay string
WeekDay - Days of the week.
const ( // WeekDayFriday - Schedule will run on Friday WeekDayFriday WeekDay = "Friday" // WeekDayMonday - Schedule will run on Monday WeekDayMonday WeekDay = "Monday" // WeekDaySaturday - Schedule will run on Saturday WeekDaySaturday WeekDay = "Saturday" // WeekDaySunday - Schedule will run on Sunday WeekDaySunday WeekDay = "Sunday" // WeekDayThursday - Schedule will run on Thursday WeekDayThursday WeekDay = "Thursday" // WeekDayTuesday - Schedule will run on Tuesday WeekDayTuesday WeekDay = "Tuesday" // WeekDayWednesday - Schedule will run on Wednesday WeekDayWednesday WeekDay = "Wednesday" )
func PossibleWeekDayValues ¶
func PossibleWeekDayValues() []WeekDay
PossibleWeekDayValues returns the possible values for the WeekDay const type.
Source Files ¶
- build.go
- client_factory.go
- constants.go
- images_client.go
- labplans_client.go
- labs_client.go
- models.go
- models_serde.go
- operationresults_client.go
- operations_client.go
- options.go
- response_types.go
- schedules_client.go
- skus_client.go
- time_rfc3339.go
- usages_client.go
- users_client.go
- virtualmachines_client.go