README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2021-06-01-preview/workspaces
Documentation
The workspaces
SDK allows for interaction with the Azure Resource Manager Service healthcareapis
(API Version 2021-06-01-preview
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2021-06-01-preview/workspaces"
Client Initialization
client := workspaces.NewWorkspacesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: WorkspacesClient.CreateOrUpdate
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspaces.Workspace{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: WorkspacesClient.Delete
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: WorkspacesClient.Get
ctx := context.TODO()
id := workspaces.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: WorkspacesClient.ListByResourceGroup
ctx := context.TODO()
id := workspaces.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: WorkspacesClient.ListBySubscription
ctx := context.TODO()
id := workspaces.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: WorkspacesClient.Update
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspaces.ResourceTags{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Documentation ¶
Index ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type ProvisioningState
- type ResourceTags
- type UpdateOperationResponse
- type Workspace
- type WorkspaceId
- type WorkspaceOperationPredicate
- type WorkspaceProperties
- type WorkspacesClient
- func (c WorkspacesClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, input Workspace) (result CreateOrUpdateOperationResponse, err error)
- func (c WorkspacesClient) CreateOrUpdateThenPoll(ctx context.Context, id WorkspaceId, input Workspace) error
- func (c WorkspacesClient) Delete(ctx context.Context, id WorkspaceId) (result DeleteOperationResponse, err error)
- func (c WorkspacesClient) DeleteThenPoll(ctx context.Context, id WorkspaceId) error
- func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOperationResponse, err error)
- func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
- func (c WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c WorkspacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (resp ListByResourceGroupCompleteResult, err error)
- func (c WorkspacesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
- func (c WorkspacesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c WorkspacesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (resp ListBySubscriptionCompleteResult, err error)
- func (c WorkspacesClient) Update(ctx context.Context, id WorkspaceId, input ResourceTags) (result UpdateOperationResponse, err error)
- func (c WorkspacesClient) UpdateThenPoll(ctx context.Context, id WorkspaceId, input ResourceTags) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateWorkspaceID ¶
ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID
Types ¶
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type DeleteOperationResponse ¶
type DeleteOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type GetOperationResponse ¶
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []Workspace
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response Model *[]Workspace // contains filtered or unexported fields }
func (ListByResourceGroupOperationResponse) HasMore ¶
func (r ListByResourceGroupOperationResponse) HasMore() bool
func (ListByResourceGroupOperationResponse) LoadMore ¶
func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error)
type ListBySubscriptionCompleteResult ¶
type ListBySubscriptionCompleteResult struct {
Items []Workspace
}
type ListBySubscriptionOperationResponse ¶
type ListBySubscriptionOperationResponse struct { HttpResponse *http.Response Model *[]Workspace // contains filtered or unexported fields }
func (ListBySubscriptionOperationResponse) HasMore ¶
func (r ListBySubscriptionOperationResponse) HasMore() bool
func (ListBySubscriptionOperationResponse) LoadMore ¶
func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error)
type ProvisioningState ¶
type ProvisioningState string
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateDeprovisioned ProvisioningState = "Deprovisioned" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateMoving ProvisioningState = "Moving" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateSuspended ProvisioningState = "Suspended" ProvisioningStateSystemMaintenance ProvisioningState = "SystemMaintenance" ProvisioningStateUpdating ProvisioningState = "Updating" ProvisioningStateVerifying ProvisioningState = "Verifying" ProvisioningStateWarned ProvisioningState = "Warned" )
type ResourceTags ¶
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type Workspace ¶
type Workspace struct { Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Properties *WorkspaceProperties `json:"properties,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
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) 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 Location *string Name *string Type *string }
func (WorkspaceOperationPredicate) Matches ¶
func (p WorkspaceOperationPredicate) Matches(input Workspace) bool
type WorkspaceProperties ¶
type WorkspaceProperties struct {
ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}
type WorkspacesClient ¶
func NewWorkspacesClientWithBaseURI ¶
func NewWorkspacesClientWithBaseURI(endpoint string) WorkspacesClient
func (WorkspacesClient) CreateOrUpdate ¶
func (c WorkspacesClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, input Workspace) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (WorkspacesClient) CreateOrUpdateThenPoll ¶
func (c WorkspacesClient) CreateOrUpdateThenPoll(ctx context.Context, id WorkspaceId, input Workspace) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (WorkspacesClient) Delete ¶
func (c WorkspacesClient) Delete(ctx context.Context, id WorkspaceId) (result DeleteOperationResponse, err error)
Delete ...
func (WorkspacesClient) DeleteThenPoll ¶
func (c WorkspacesClient) DeleteThenPoll(ctx context.Context, id WorkspaceId) error
DeleteThenPoll performs Delete then polls until it's completed
func (WorkspacesClient) Get ¶
func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOperationResponse, err error)
Get ...
func (WorkspacesClient) ListByResourceGroup ¶
func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (WorkspacesClient) ListByResourceGroupComplete ¶
func (c WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all of the results into a single object
func (WorkspacesClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c WorkspacesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WorkspaceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (WorkspacesClient) ListBySubscription ¶
func (c WorkspacesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (WorkspacesClient) ListBySubscriptionComplete ¶
func (c WorkspacesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all of the results into a single object
func (WorkspacesClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c WorkspacesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WorkspaceOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (WorkspacesClient) Update ¶
func (c WorkspacesClient) Update(ctx context.Context, id WorkspaceId, input ResourceTags) (result UpdateOperationResponse, err error)
Update ...
func (WorkspacesClient) UpdateThenPoll ¶
func (c WorkspacesClient) UpdateThenPoll(ctx context.Context, id WorkspaceId, input ResourceTags) error
UpdateThenPoll performs Update then polls until it's completed
Source Files ¶
- client.go
- constants.go
- id_workspace.go
- method_createorupdate_autorest.go
- method_delete_autorest.go
- method_get_autorest.go
- method_listbyresourcegroup_autorest.go
- method_listbysubscription_autorest.go
- method_update_autorest.go
- model_resourcetags.go
- model_workspace.go
- model_workspaceproperties.go
- predicates.go
- version.go