README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/workspace
Documentation
The workspace
SDK allows for interaction with the Azure Resource Manager Service desktopvirtualization
(API Version 2022-09-09
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/workspace"
Client Initialization
client := workspace.NewWorkspaceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: WorkspaceClient.CreateOrUpdate
ctx := context.TODO()
id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspace.Workspace{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspaceClient.Delete
ctx := context.TODO()
id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.Delete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspaceClient.Get
ctx := context.TODO()
id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspaceClient.ListByResourceGroup
ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.ListByResourceGroup(ctx, id, workspace.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id, workspace.DefaultListByResourceGroupOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: WorkspaceClient.ListBySubscription
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: WorkspaceClient.Update
ctx := context.TODO()
id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspace.WorkspacePatch{
// ...
}
read, err := client.Update(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func PossibleValuesForSkuTier() []string
- func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationOptions
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type Plan
- type Sku
- type SkuTier
- type UpdateOperationResponse
- type Workspace
- type WorkspaceClient
- func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, input Workspace) (result CreateOrUpdateOperationResponse, err error)
- func (c WorkspaceClient) Delete(ctx context.Context, id WorkspaceId) (result DeleteOperationResponse, err error)
- func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOperationResponse, err error)
- func (c WorkspaceClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupOperationResponse, err error)
- func (c WorkspaceClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, ...) (ListByResourceGroupCompleteResult, error)
- func (c WorkspaceClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c WorkspaceClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
- func (c WorkspaceClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c WorkspaceClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListBySubscriptionCompleteResult, err error)
- func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input WorkspacePatch) (result UpdateOperationResponse, err error)
- type WorkspaceId
- type WorkspaceOperationPredicate
- type WorkspacePatch
- type WorkspacePatchProperties
- type WorkspaceProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForSkuTier ¶
func PossibleValuesForSkuTier() []string
func ValidateWorkspaceID ¶
ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID
Types ¶
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type ListByResourceGroupOperationOptions ¶
type ListByResourceGroupOperationOptions struct { InitialSkip *int64 IsDescending *bool PageSize *int64 }
func DefaultListByResourceGroupOperationOptions ¶
func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions
func (ListByResourceGroupOperationOptions) ToHeaders ¶
func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers
func (ListByResourceGroupOperationOptions) ToOData ¶
func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query
func (ListByResourceGroupOperationOptions) ToQuery ¶
func (o ListByResourceGroupOperationOptions) ToQuery() *client.QueryParams
type UpdateOperationResponse ¶
type Workspace ¶
type Workspace struct { Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` Identity *identity.SystemAssigned `json:"identity,omitempty"` Kind *string `json:"kind,omitempty"` Location *string `json:"location,omitempty"` ManagedBy *string `json:"managedBy,omitempty"` Name *string `json:"name,omitempty"` Plan *Plan `json:"plan,omitempty"` Properties *WorkspaceProperties `json:"properties,omitempty"` Sku *Sku `json:"sku,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type WorkspaceClient ¶
type WorkspaceClient struct {
Client *resourcemanager.Client
}
func NewWorkspaceClientWithBaseURI ¶
func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error)
func (WorkspaceClient) CreateOrUpdate ¶
func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, input Workspace) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (WorkspaceClient) Delete ¶
func (c WorkspaceClient) Delete(ctx context.Context, id WorkspaceId) (result DeleteOperationResponse, err error)
Delete ...
func (WorkspaceClient) Get ¶
func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOperationResponse, err error)
Get ...
func (WorkspaceClient) ListByResourceGroup ¶
func (c WorkspaceClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (WorkspaceClient) ListByResourceGroupComplete ¶
func (c WorkspaceClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all the results into a single object
func (WorkspaceClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c WorkspaceClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate WorkspaceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (WorkspaceClient) ListBySubscription ¶
func (c WorkspaceClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (WorkspaceClient) ListBySubscriptionComplete ¶
func (c WorkspaceClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all the results into a single object
func (WorkspaceClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c WorkspaceClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WorkspaceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (WorkspaceClient) Update ¶
func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input WorkspacePatch) (result UpdateOperationResponse, err error)
Update ...
type WorkspaceId ¶
WorkspaceId is a struct representing the Resource ID for a Workspace
func NewWorkspaceID ¶
func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId
NewWorkspaceID returns a new WorkspaceId struct
func ParseWorkspaceID ¶
func ParseWorkspaceID(input string) (*WorkspaceId, error)
ParseWorkspaceID parses 'input' into a WorkspaceId
func ParseWorkspaceIDInsensitively ¶
func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)
ParseWorkspaceIDInsensitively parses 'input' case-insensitively into a WorkspaceId note: this method should only be used for API response data and not user input
func (*WorkspaceId) FromParseResult ¶
func (id *WorkspaceId) FromParseResult(input resourceids.ParseResult) error
func (WorkspaceId) Segments ¶
func (id WorkspaceId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Workspace ID
func (WorkspaceId) String ¶
func (id WorkspaceId) String() string
String returns a human-readable description of this Workspace ID
type WorkspaceOperationPredicate ¶
type WorkspaceOperationPredicate struct { Etag *string Id *string Kind *string Location *string ManagedBy *string Name *string Type *string }
func (WorkspaceOperationPredicate) Matches ¶
func (p WorkspaceOperationPredicate) Matches(input Workspace) bool
type WorkspacePatch ¶
type WorkspacePatch struct { Properties *WorkspacePatchProperties `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` }
type WorkspaceProperties ¶
type WorkspaceProperties struct { ApplicationGroupReferences *[]string `json:"applicationGroupReferences,omitempty"` CloudPcResource *bool `json:"cloudPcResource,omitempty"` Description *string `json:"description,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ObjectId *string `json:"objectId,omitempty"` }
Source Files ¶
- client.go
- constants.go
- id_workspace.go
- method_createorupdate.go
- method_delete.go
- method_get.go
- method_listbyresourcegroup.go
- method_listbysubscription.go
- method_update.go
- model_plan.go
- model_sku.go
- model_workspace.go
- model_workspacepatch.go
- model_workspacepatchproperties.go
- model_workspaceproperties.go
- predicates.go
- version.go