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/sql/2023-02-01-preview/servertrustgroups
Documentation
The servertrustgroups
SDK allows for interaction with the Azure Resource Manager Service sql
(API Version 2023-02-01-preview
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servertrustgroups"
Client Initialization
client := servertrustgroups.NewServerTrustGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ServerTrustGroupsClient.CreateOrUpdate
ctx := context.TODO()
id := servertrustgroups.NewServerTrustGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "serverTrustGroupValue")
payload := servertrustgroups.ServerTrustGroup{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ServerTrustGroupsClient.Delete
ctx := context.TODO()
id := servertrustgroups.NewServerTrustGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "serverTrustGroupValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ServerTrustGroupsClient.Get
ctx := context.TODO()
id := servertrustgroups.NewServerTrustGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "serverTrustGroupValue")
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: ServerTrustGroupsClient.ListByInstance
ctx := context.TODO()
id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue")
// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination
items, err := client.ListByInstanceComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ServerTrustGroupsClient.ListByLocation
ctx := context.TODO()
id := servertrustgroups.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue")
// alternatively `client.ListByLocation(ctx, id)` can be used to do batched pagination
items, err := client.ListByLocationComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
# Functions
NewProviderLocationID returns a new ProviderLocationId struct.
NewServerTrustGroupID returns a new ServerTrustGroupId struct.
No description provided by the author
ParseProviderLocationID parses 'input' into a ProviderLocationId.
ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId note: this method should only be used for API response data and not user input.
ParseServerTrustGroupID parses 'input' into a ServerTrustGroupId.
ParseServerTrustGroupIDInsensitively parses 'input' case-insensitively into a ServerTrustGroupId note: this method should only be used for API response data and not user input.
No description provided by the author
ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID.
ValidateServerTrustGroupID checks that 'input' can be parsed as a Server Trust Group ID.
# Constants
No description provided by the author
No description provided by the author
# 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
ProviderLocationId is a struct representing the Resource ID for a Provider Location.
No description provided by the author
No description provided by the author
ServerTrustGroupId is a struct representing the Resource ID for a Server Trust Group.
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author