Categorygithub.com/hashicorp/go-azure-sdk/resource-managermaintenance2023-04-01configurationassignments
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/maintenance/2023-04-01/configurationassignments
Documentation
The configurationassignments
SDK allows for interaction with the Azure Resource Manager Service maintenance
(API Version 2023-04-01
).
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/maintenance/2023-04-01/configurationassignments"
Client Initialization
client := configurationassignments.NewConfigurationAssignmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ConfigurationAssignmentsClient.CreateOrUpdate
ctx := context.TODO()
id := configurationassignments.NewScopedConfigurationAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "configurationAssignmentValue")
payload := configurationassignments.ConfigurationAssignment{
// ...
}
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: ConfigurationAssignmentsClient.CreateOrUpdateParent
ctx := context.TODO()
id := configurationassignments.NewScopedConfigurationAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "configurationAssignmentValue")
payload := configurationassignments.ConfigurationAssignment{
// ...
}
read, err := client.CreateOrUpdateParent(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.Delete
ctx := context.TODO()
id := configurationassignments.NewScopedConfigurationAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "configurationAssignmentValue")
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: ConfigurationAssignmentsClient.DeleteParent
ctx := context.TODO()
id := configurationassignments.NewScopedConfigurationAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "configurationAssignmentValue")
read, err := client.DeleteParent(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForResourceGroupCreateOrUpdate
ctx := context.TODO()
id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue")
payload := configurationassignments.ConfigurationAssignment{
// ...
}
read, err := client.ForResourceGroupCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForResourceGroupDelete
ctx := context.TODO()
id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue")
read, err := client.ForResourceGroupDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForResourceGroupGet
ctx := context.TODO()
id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue")
read, err := client.ForResourceGroupGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForResourceGroupUpdate
ctx := context.TODO()
id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue")
payload := configurationassignments.ConfigurationAssignment{
// ...
}
read, err := client.ForResourceGroupUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForSubscriptionsCreateOrUpdate
ctx := context.TODO()
id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue")
payload := configurationassignments.ConfigurationAssignment{
// ...
}
read, err := client.ForSubscriptionsCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForSubscriptionsDelete
ctx := context.TODO()
id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue")
read, err := client.ForSubscriptionsDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForSubscriptionsGet
ctx := context.TODO()
id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue")
read, err := client.ForSubscriptionsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ForSubscriptionsUpdate
ctx := context.TODO()
id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue")
payload := configurationassignments.ConfigurationAssignment{
// ...
}
read, err := client.ForSubscriptionsUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.Get
ctx := context.TODO()
id := configurationassignments.NewScopedConfigurationAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "configurationAssignmentValue")
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: ConfigurationAssignmentsClient.GetParent
ctx := context.TODO()
id := configurationassignments.NewScopedConfigurationAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "configurationAssignmentValue")
read, err := client.GetParent(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.List
ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")
read, err := client.List(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.ListParent
ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")
read, err := client.ListParent(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConfigurationAssignmentsClient.WithinSubscriptionList
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.WithinSubscriptionList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}