package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/workspace
Documentation
The workspace
SDK allows for interaction with the Azure Resource Manager Service apimanagement
(API Version 2023-05-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/apimanagement/2023-05-01-preview/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", "serviceValue", "workspaceIdValue")
payload := workspace.WorkspaceContract{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload, workspace.DefaultCreateOrUpdateOperationOptions())
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", "serviceValue", "workspaceIdValue")
read, err := client.Delete(ctx, id, workspace.DefaultDeleteOperationOptions())
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", "serviceValue", "workspaceIdValue")
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.GetEntityTag
ctx := context.TODO()
id := workspace.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue")
read, err := client.GetEntityTag(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspaceClient.ListByService
ctx := context.TODO()
id := workspace.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")
// alternatively `client.ListByService(ctx, id, workspace.DefaultListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.ListByServiceComplete(ctx, id, workspace.DefaultListByServiceOperationOptions())
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", "serviceValue", "workspaceIdValue")
payload := workspace.WorkspaceContract{
// ...
}
read, err := client.Update(ctx, id, payload, workspace.DefaultUpdateOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewServiceID returns a new ServiceId struct.
No description provided by the author
NewWorkspaceID returns a new WorkspaceId struct.
ParseServiceID parses 'input' into a ServiceId.
ParseServiceIDInsensitively parses 'input' case-insensitively into a ServiceId note: this method should only be used for API response data and not user input.
ParseWorkspaceID parses 'input' into a WorkspaceId.
ParseWorkspaceIDInsensitively parses 'input' case-insensitively into a WorkspaceId note: this method should only be used for API response data and not user input.
ValidateServiceID checks that 'input' can be parsed as a Service ID.
ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ServiceId is a struct representing the Resource ID for a Service.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WorkspaceId is a struct representing the Resource ID for a Workspace.