Categorygithub.com/hashicorp/go-azure-sdk/resource-managerservicebus2022-10-01-previewtopicsauthorizationrule
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/servicebus/2022-10-01-preview/topicsauthorizationrule
Documentation
The topicsauthorizationrule
SDK allows for interaction with the Azure Resource Manager Service servicebus
(API Version 2022-10-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/servicebus/2022-10-01-preview/topicsauthorizationrule"
Client Initialization
client := topicsauthorizationrule.NewTopicsAuthorizationRuleClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: TopicsAuthorizationRuleClient.TopicsCreateOrUpdateAuthorizationRule
ctx := context.TODO()
id := topicsauthorizationrule.NewTopicAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "authorizationRuleValue")
payload := topicsauthorizationrule.SBAuthorizationRule{
// ...
}
read, err := client.TopicsCreateOrUpdateAuthorizationRule(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TopicsAuthorizationRuleClient.TopicsDeleteAuthorizationRule
ctx := context.TODO()
id := topicsauthorizationrule.NewTopicAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "authorizationRuleValue")
read, err := client.TopicsDeleteAuthorizationRule(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TopicsAuthorizationRuleClient.TopicsGetAuthorizationRule
ctx := context.TODO()
id := topicsauthorizationrule.NewTopicAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "authorizationRuleValue")
read, err := client.TopicsGetAuthorizationRule(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TopicsAuthorizationRuleClient.TopicsListAuthorizationRules
ctx := context.TODO()
id := topicsauthorizationrule.NewTopicID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue")
// alternatively `client.TopicsListAuthorizationRules(ctx, id)` can be used to do batched pagination
items, err := client.TopicsListAuthorizationRulesComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: TopicsAuthorizationRuleClient.TopicsListKeys
ctx := context.TODO()
id := topicsauthorizationrule.NewTopicAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "authorizationRuleValue")
read, err := client.TopicsListKeys(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TopicsAuthorizationRuleClient.TopicsRegenerateKeys
ctx := context.TODO()
id := topicsauthorizationrule.NewTopicAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "authorizationRuleValue")
payload := topicsauthorizationrule.RegenerateAccessKeyParameters{
// ...
}
read, err := client.TopicsRegenerateKeys(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}