armservicebus

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 15 Imported by: 13

README

Azure Service Bus Module for Go

PkgGoDev

The armservicebus module provides operations for working with Azure Service Bus.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Service Bus module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Service Bus. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Service Bus module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armservicebus.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armservicebus.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewNamespacesClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Service Bus label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKeys

type AccessKeys struct {
	// READ-ONLY; Primary connection string of the alias if GEO DR is enabled
	AliasPrimaryConnectionString *string

	// READ-ONLY; Secondary connection string of the alias if GEO DR is enabled
	AliasSecondaryConnectionString *string

	// READ-ONLY; A string that describes the authorization rule.
	KeyName *string

	// READ-ONLY; Primary connection string of the created namespace authorization rule.
	PrimaryConnectionString *string

	// READ-ONLY; A base64-encoded 256-bit primary key for signing and validating the SAS token.
	PrimaryKey *string

	// READ-ONLY; Secondary connection string of the created namespace authorization rule.
	SecondaryConnectionString *string

	// READ-ONLY; A base64-encoded 256-bit primary key for signing and validating the SAS token.
	SecondaryKey *string
}

AccessKeys - Namespace/ServiceBus Connection String

func (AccessKeys) MarshalJSON added in v1.1.0

func (a AccessKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccessKeys.

func (*AccessKeys) UnmarshalJSON added in v1.1.0

func (a *AccessKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeys.

type AccessRights

type AccessRights string
const (
	AccessRightsListen AccessRights = "Listen"
	AccessRightsManage AccessRights = "Manage"
	AccessRightsSend   AccessRights = "Send"
)

func PossibleAccessRightsValues

func PossibleAccessRightsValues() []AccessRights

PossibleAccessRightsValues returns the possible values for the AccessRights const type.

type Action

type Action struct {
	// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
	CompatibilityLevel *int32

	// Value that indicates whether the rule action requires preprocessing.
	RequiresPreprocessing *bool

	// SQL expression. e.g. MyProperty='ABC'
	SQLExpression *string
}

Action - Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression.

func (Action) MarshalJSON added in v1.1.0

func (a Action) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Action.

func (*Action) UnmarshalJSON added in v1.1.0

func (a *Action) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Action.

type ArmDisasterRecovery

type ArmDisasterRecovery struct {
	// Properties required to the Create Or Update Alias(Disaster Recovery configurations)
	Properties *ArmDisasterRecoveryProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

ArmDisasterRecovery - Single item in List or Get Alias(Disaster Recovery configuration) operation

func (ArmDisasterRecovery) MarshalJSON

func (a ArmDisasterRecovery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecovery.

func (*ArmDisasterRecovery) UnmarshalJSON added in v1.1.0

func (a *ArmDisasterRecovery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmDisasterRecovery.

type ArmDisasterRecoveryListResult

type ArmDisasterRecoveryListResult struct {
	// List of Alias(Disaster Recovery configurations)
	Value []*ArmDisasterRecovery

	// READ-ONLY; Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration)
	NextLink *string
}

ArmDisasterRecoveryListResult - The result of the List Alias(Disaster Recovery configuration) operation.

func (ArmDisasterRecoveryListResult) MarshalJSON

func (a ArmDisasterRecoveryListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecoveryListResult.

func (*ArmDisasterRecoveryListResult) UnmarshalJSON added in v1.1.0

func (a *ArmDisasterRecoveryListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmDisasterRecoveryListResult.

type ArmDisasterRecoveryProperties

type ArmDisasterRecoveryProperties struct {
	// Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
	AlternateName *string

	// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
	PartnerNamespace *string

	// READ-ONLY; Number of entities pending to be replicated.
	PendingReplicationOperationsCount *int64

	// READ-ONLY; Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded'
	// or 'Failed'
	ProvisioningState *ProvisioningStateDR

	// READ-ONLY; role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'
	Role *RoleDisasterRecovery
}

ArmDisasterRecoveryProperties - Properties required to the Create Or Update Alias(Disaster Recovery configurations)

func (ArmDisasterRecoveryProperties) MarshalJSON added in v1.1.0

func (a ArmDisasterRecoveryProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecoveryProperties.

func (*ArmDisasterRecoveryProperties) UnmarshalJSON added in v1.1.0

func (a *ArmDisasterRecoveryProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmDisasterRecoveryProperties.

type CheckNameAvailability

type CheckNameAvailability struct {
	// REQUIRED; The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and
	// hyphens. The namespace must start with a letter, and it must end with a letter or
	// number.
	Name *string
}

CheckNameAvailability - Description of a Check Name availability request properties.

func (CheckNameAvailability) MarshalJSON added in v1.1.0

func (c CheckNameAvailability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailability.

func (*CheckNameAvailability) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailability.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// Value indicating namespace is availability, true if the namespace is available; otherwise, false.
	NameAvailable *bool

	// The reason for unavailability of a namespace.
	Reason *UnavailableReason

	// READ-ONLY; The detailed info regarding the reason associated with the namespace.
	Message *string
}

CheckNameAvailabilityResult - Description of a Check Name availability request properties.

func (CheckNameAvailabilityResult) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClientFactory added in v1.1.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewDisasterRecoveryConfigsClient added in v1.1.0

func (c *ClientFactory) NewDisasterRecoveryConfigsClient() *DisasterRecoveryConfigsClient

NewDisasterRecoveryConfigsClient creates a new instance of DisasterRecoveryConfigsClient.

func (*ClientFactory) NewMigrationConfigsClient added in v1.1.0

func (c *ClientFactory) NewMigrationConfigsClient() *MigrationConfigsClient

NewMigrationConfigsClient creates a new instance of MigrationConfigsClient.

func (*ClientFactory) NewNamespacesClient added in v1.1.0

func (c *ClientFactory) NewNamespacesClient() *NamespacesClient

NewNamespacesClient creates a new instance of NamespacesClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewQueuesClient added in v1.1.0

func (c *ClientFactory) NewQueuesClient() *QueuesClient

NewQueuesClient creates a new instance of QueuesClient.

func (*ClientFactory) NewRulesClient added in v1.1.0

func (c *ClientFactory) NewRulesClient() *RulesClient

NewRulesClient creates a new instance of RulesClient.

func (*ClientFactory) NewSubscriptionsClient added in v1.1.0

func (c *ClientFactory) NewSubscriptionsClient() *SubscriptionsClient

NewSubscriptionsClient creates a new instance of SubscriptionsClient.

func (*ClientFactory) NewTopicsClient added in v1.1.0

func (c *ClientFactory) NewTopicsClient() *TopicsClient

NewTopicsClient creates a new instance of TopicsClient.

type ConnectionState

type ConnectionState struct {
	// Description of the connection state.
	Description *string

	// Status of the connection.
	Status *PrivateLinkConnectionStatus
}

ConnectionState information.

func (ConnectionState) MarshalJSON added in v1.1.0

func (c ConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionState.

func (*ConnectionState) UnmarshalJSON added in v1.1.0

func (c *ConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionState.

type CorrelationFilter

type CorrelationFilter struct {
	// Content type of the message.
	ContentType *string

	// Identifier of the correlation.
	CorrelationID *string

	// Application specific label.
	Label *string

	// Identifier of the message.
	MessageID *string

	// dictionary object for custom filters
	Properties map[string]*string

	// Address of the queue to reply to.
	ReplyTo *string

	// Session identifier to reply to.
	ReplyToSessionID *string

	// Value that indicates whether the rule action requires preprocessing.
	RequiresPreprocessing *bool

	// Session identifier.
	SessionID *string

	// Address to send to.
	To *string
}

CorrelationFilter - Represents the correlation filter expression.

func (CorrelationFilter) MarshalJSON

func (c CorrelationFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CorrelationFilter.

func (*CorrelationFilter) UnmarshalJSON added in v1.1.0

func (c *CorrelationFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CorrelationFilter.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DefaultAction

type DefaultAction string

DefaultAction - Default Action for Network Rule Set

const (
	DefaultActionAllow DefaultAction = "Allow"
	DefaultActionDeny  DefaultAction = "Deny"
)

func PossibleDefaultActionValues

func PossibleDefaultActionValues() []DefaultAction

PossibleDefaultActionValues returns the possible values for the DefaultAction const type.

type DisasterRecoveryConfigsClient

type DisasterRecoveryConfigsClient struct {
	// contains filtered or unexported fields
}

DisasterRecoveryConfigsClient contains the methods for the DisasterRecoveryConfigs group. Don't use this type directly, use NewDisasterRecoveryConfigsClient() instead.

func NewDisasterRecoveryConfigsClient

func NewDisasterRecoveryConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DisasterRecoveryConfigsClient, error)

NewDisasterRecoveryConfigsClient creates a new instance of DisasterRecoveryConfigsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DisasterRecoveryConfigsClient) BreakPairing

BreakPairing - This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientBreakPairingOptions contains the optional parameters for the DisasterRecoveryConfigsClient.BreakPairing method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBEHAliasBreakPairing.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDisasterRecoveryConfigsClient().BreakPairing(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DisasterRecoveryConfigsClient) CheckNameAvailability

CheckNameAvailability - Check the give namespace name availability. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • parameters - Parameters to check availability of the given namespace name
  • options - DisasterRecoveryConfigsClientCheckNameAvailabilityOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().CheckNameAvailability(ctx, "exampleResourceGroup", "sdk-Namespace-9080", armservicebus.CheckNameAvailability{
		Name: to.Ptr("sdk-DisasterRecovery-9474"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityResult = armservicebus.CheckNameAvailabilityResult{
	// 	Message: to.Ptr(""),
	// 	NameAvailable: to.Ptr(true),
	// 	Reason: to.Ptr(armservicebus.UnavailableReasonNone),
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) CreateOrUpdate

CreateOrUpdate - Creates or updates a new Alias(Disaster Recovery configuration) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • parameters - Parameters required to create an Alias(Disaster Recovery configuration)
  • options - DisasterRecoveryConfigsClientCreateOrUpdateOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().CreateOrUpdate(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-Namespace-8860", armservicebus.ArmDisasterRecovery{
		Properties: &armservicebus.ArmDisasterRecoveryProperties{
			AlternateName:    to.Ptr("alternameforAlias-Namespace-8860"),
			PartnerNamespace: to.Ptr("sdk-Namespace-37"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ArmDisasterRecovery = armservicebus.ArmDisasterRecovery{
	// 	Name: to.Ptr("sdk-Namespace-8860"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ardsouzatestRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8860/disasterRecoveryConfig/sdk-Namespace-8860"),
	// 	Properties: &armservicebus.ArmDisasterRecoveryProperties{
	// 		AlternateName: to.Ptr("alternameforAlias-Namespace-8860"),
	// 		PartnerNamespace: to.Ptr("sdk-Namespace-37"),
	// 		ProvisioningState: to.Ptr(armservicebus.ProvisioningStateDRSucceeded),
	// 		Role: to.Ptr(armservicebus.RoleDisasterRecoveryPrimary),
	// 	},
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) Delete

Delete - Deletes an Alias(Disaster Recovery configuration) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientDeleteOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDisasterRecoveryConfigsClient().Delete(ctx, "SouthCentralUS", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DisasterRecoveryConfigsClient) FailOver

FailOver - Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientFailOverOptions contains the optional parameters for the DisasterRecoveryConfigsClient.FailOver method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasFailOver.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDisasterRecoveryConfigsClient().FailOver(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", &armservicebus.DisasterRecoveryConfigsClientFailOverOptions{Parameters: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DisasterRecoveryConfigsClient) Get

Get - Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientGetOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().Get(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ArmDisasterRecovery = armservicebus.ArmDisasterRecovery{
	// 	Name: to.Ptr("sdk-DisasterRecovery-3814"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ardsouzatestRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-37/disasterRecoveryConfig/sdk-DisasterRecovery-3814"),
	// 	Properties: &armservicebus.ArmDisasterRecoveryProperties{
	// 		PartnerNamespace: to.Ptr("sdk-Namespace-8860"),
	// 		PendingReplicationOperationsCount: to.Ptr[int64](0),
	// 		ProvisioningState: to.Ptr(armservicebus.ProvisioningStateDRSucceeded),
	// 		Role: to.Ptr(armservicebus.RoleDisasterRecoverySecondary),
	// 	},
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) GetAuthorizationRule

func (client *DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string, options *DisasterRecoveryConfigsClientGetAuthorizationRuleOptions) (DisasterRecoveryConfigsClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Gets an authorization rule for a namespace by rule name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • authorizationRuleName - The authorization rule name.
  • options - DisasterRecoveryConfigsClientGetAuthorizationRuleOptions contains the optional parameters for the DisasterRecoveryConfigsClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().GetAuthorizationRule(ctx, "exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4879", "sdk-Authrules-4879", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-Authrules-4879"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*DisasterRecoveryConfigsClient) ListKeys

func (client *DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string, options *DisasterRecoveryConfigsClientListKeysOptions) (DisasterRecoveryConfigsClientListKeysResponse, error)

ListKeys - Gets the primary and secondary connection strings for the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • authorizationRuleName - The authorization rule name.
  • options - DisasterRecoveryConfigsClientListKeysOptions contains the optional parameters for the DisasterRecoveryConfigsClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().ListKeys(ctx, "exampleResourceGroup", "sdk-Namespace-2702", "sdk-DisasterRecovery-4047", "sdk-Authrules-1746", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	AliasPrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"),
	// 	AliasSecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"),
	// 	KeyName: to.Ptr("sdk-Authrules-1746"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) NewListAuthorizationRulesPager added in v0.5.0

NewListAuthorizationRulesPager - Gets the authorization rules for a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientListAuthorizationRulesOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListAuthorizationRulesPager("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4047", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{
		// 	Value: []*armservicebus.SBAuthorizationRule{
		// 		{
		// 			Name: to.Ptr("RootManageSharedAccessKey"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/RootManageSharedAccessKey"),
		// 			Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 				Rights: []*armservicebus.AccessRights{
		// 					to.Ptr(armservicebus.AccessRightsListen),
		// 					to.Ptr(armservicebus.AccessRightsManage),
		// 					to.Ptr(armservicebus.AccessRightsSend)},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("sdk-Authrules-1067"),
		// 				Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"),
		// 				ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1067"),
		// 				Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 					Rights: []*armservicebus.AccessRights{
		// 						to.Ptr(armservicebus.AccessRightsListen),
		// 						to.Ptr(armservicebus.AccessRightsSend)},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("sdk-Authrules-1684"),
		// 					Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"),
		// 					ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1684"),
		// 					Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 						Rights: []*armservicebus.AccessRights{
		// 							to.Ptr(armservicebus.AccessRightsListen),
		// 							to.Ptr(armservicebus.AccessRightsSend)},
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("sdk-Authrules-4879"),
		// 						Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"),
		// 						ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"),
		// 						Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 							Rights: []*armservicebus.AccessRights{
		// 								to.Ptr(armservicebus.AccessRightsListen),
		// 								to.Ptr(armservicebus.AccessRightsSend)},
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*DisasterRecoveryConfigsClient) NewListPager added in v0.5.0

NewListPager - Gets all Alias(Disaster Recovery configurations)

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - DisasterRecoveryConfigsClientListOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/disasterRecoveryConfigs/SBAliasList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListPager("ardsouzatestRG", "sdk-Namespace-8860", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ArmDisasterRecoveryListResult = armservicebus.ArmDisasterRecoveryListResult{
		// 	Value: []*armservicebus.ArmDisasterRecovery{
		// 		{
		// 			Name: to.Ptr("sdk-DisasterRecovery-3814"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ardsouzatestRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8860/disasterRecoveryConfig/sdk-DisasterRecovery-3814"),
		// 			Properties: &armservicebus.ArmDisasterRecoveryProperties{
		// 				PartnerNamespace: to.Ptr("sdk-Namespace-37"),
		// 				ProvisioningState: to.Ptr(armservicebus.ProvisioningStateDRSucceeded),
		// 				Role: to.Ptr(armservicebus.RoleDisasterRecoveryPrimary),
		// 			},
		// 	}},
		// }
	}
}
Output:

type DisasterRecoveryConfigsClientBreakPairingOptions added in v0.3.0

type DisasterRecoveryConfigsClientBreakPairingOptions struct {
}

DisasterRecoveryConfigsClientBreakPairingOptions contains the optional parameters for the DisasterRecoveryConfigsClient.BreakPairing method.

type DisasterRecoveryConfigsClientBreakPairingResponse added in v0.3.0

type DisasterRecoveryConfigsClientBreakPairingResponse struct {
}

DisasterRecoveryConfigsClientBreakPairingResponse contains the response from method DisasterRecoveryConfigsClient.BreakPairing.

type DisasterRecoveryConfigsClientCheckNameAvailabilityOptions added in v0.3.0

type DisasterRecoveryConfigsClientCheckNameAvailabilityOptions struct {
}

DisasterRecoveryConfigsClientCheckNameAvailabilityOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CheckNameAvailability method.

type DisasterRecoveryConfigsClientCheckNameAvailabilityResponse added in v0.3.0

type DisasterRecoveryConfigsClientCheckNameAvailabilityResponse struct {
	// Description of a Check Name availability request properties.
	CheckNameAvailabilityResult
}

DisasterRecoveryConfigsClientCheckNameAvailabilityResponse contains the response from method DisasterRecoveryConfigsClient.CheckNameAvailability.

type DisasterRecoveryConfigsClientCreateOrUpdateOptions added in v0.3.0

type DisasterRecoveryConfigsClientCreateOrUpdateOptions struct {
}

DisasterRecoveryConfigsClientCreateOrUpdateOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CreateOrUpdate method.

type DisasterRecoveryConfigsClientCreateOrUpdateResponse added in v0.3.0

type DisasterRecoveryConfigsClientCreateOrUpdateResponse struct {
	// Single item in List or Get Alias(Disaster Recovery configuration) operation
	ArmDisasterRecovery
}

DisasterRecoveryConfigsClientCreateOrUpdateResponse contains the response from method DisasterRecoveryConfigsClient.CreateOrUpdate.

type DisasterRecoveryConfigsClientDeleteOptions added in v0.3.0

type DisasterRecoveryConfigsClientDeleteOptions struct {
}

DisasterRecoveryConfigsClientDeleteOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Delete method.

type DisasterRecoveryConfigsClientDeleteResponse added in v0.3.0

type DisasterRecoveryConfigsClientDeleteResponse struct {
}

DisasterRecoveryConfigsClientDeleteResponse contains the response from method DisasterRecoveryConfigsClient.Delete.

type DisasterRecoveryConfigsClientFailOverOptions added in v0.3.0

type DisasterRecoveryConfigsClientFailOverOptions struct {
	// Parameters required to create an Alias(Disaster Recovery configuration)
	Parameters *FailoverProperties
}

DisasterRecoveryConfigsClientFailOverOptions contains the optional parameters for the DisasterRecoveryConfigsClient.FailOver method.

type DisasterRecoveryConfigsClientFailOverResponse added in v0.3.0

type DisasterRecoveryConfigsClientFailOverResponse struct {
}

DisasterRecoveryConfigsClientFailOverResponse contains the response from method DisasterRecoveryConfigsClient.FailOver.

type DisasterRecoveryConfigsClientGetAuthorizationRuleOptions added in v0.3.0

type DisasterRecoveryConfigsClientGetAuthorizationRuleOptions struct {
}

DisasterRecoveryConfigsClientGetAuthorizationRuleOptions contains the optional parameters for the DisasterRecoveryConfigsClient.GetAuthorizationRule method.

type DisasterRecoveryConfigsClientGetAuthorizationRuleResponse added in v0.3.0

type DisasterRecoveryConfigsClientGetAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

DisasterRecoveryConfigsClientGetAuthorizationRuleResponse contains the response from method DisasterRecoveryConfigsClient.GetAuthorizationRule.

type DisasterRecoveryConfigsClientGetOptions added in v0.3.0

type DisasterRecoveryConfigsClientGetOptions struct {
}

DisasterRecoveryConfigsClientGetOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Get method.

type DisasterRecoveryConfigsClientGetResponse added in v0.3.0

type DisasterRecoveryConfigsClientGetResponse struct {
	// Single item in List or Get Alias(Disaster Recovery configuration) operation
	ArmDisasterRecovery
}

DisasterRecoveryConfigsClientGetResponse contains the response from method DisasterRecoveryConfigsClient.Get.

type DisasterRecoveryConfigsClientListAuthorizationRulesOptions added in v0.3.0

type DisasterRecoveryConfigsClientListAuthorizationRulesOptions struct {
}

DisasterRecoveryConfigsClientListAuthorizationRulesOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListAuthorizationRulesPager method.

type DisasterRecoveryConfigsClientListAuthorizationRulesResponse added in v0.3.0

type DisasterRecoveryConfigsClientListAuthorizationRulesResponse struct {
	// The response to the List Namespace operation.
	SBAuthorizationRuleListResult
}

DisasterRecoveryConfigsClientListAuthorizationRulesResponse contains the response from method DisasterRecoveryConfigsClient.NewListAuthorizationRulesPager.

type DisasterRecoveryConfigsClientListKeysOptions added in v0.3.0

type DisasterRecoveryConfigsClientListKeysOptions struct {
}

DisasterRecoveryConfigsClientListKeysOptions contains the optional parameters for the DisasterRecoveryConfigsClient.ListKeys method.

type DisasterRecoveryConfigsClientListKeysResponse added in v0.3.0

type DisasterRecoveryConfigsClientListKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

DisasterRecoveryConfigsClientListKeysResponse contains the response from method DisasterRecoveryConfigsClient.ListKeys.

type DisasterRecoveryConfigsClientListOptions added in v0.3.0

type DisasterRecoveryConfigsClientListOptions struct {
}

DisasterRecoveryConfigsClientListOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListPager method.

type DisasterRecoveryConfigsClientListResponse added in v0.3.0

type DisasterRecoveryConfigsClientListResponse struct {
	// The result of the List Alias(Disaster Recovery configuration) operation.
	ArmDisasterRecoveryListResult
}

DisasterRecoveryConfigsClientListResponse contains the response from method DisasterRecoveryConfigsClient.NewListPager.

type Encryption

type Encryption struct {
	// Enumerates the possible value of keySource for Encryption
	KeySource *string

	// Properties of KeyVault
	KeyVaultProperties []*KeyVaultProperties

	// Enable Infrastructure Encryption (Double Encryption)
	RequireInfrastructureEncryption *bool
}

Encryption - Properties to configure Encryption

func (Encryption) MarshalJSON

func (e Encryption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Encryption.

func (*Encryption) UnmarshalJSON added in v1.1.0

func (e *Encryption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.

type EndPointProvisioningState

type EndPointProvisioningState string

EndPointProvisioningState - Provisioning state of the Private Endpoint Connection.

const (
	EndPointProvisioningStateCanceled  EndPointProvisioningState = "Canceled"
	EndPointProvisioningStateCreating  EndPointProvisioningState = "Creating"
	EndPointProvisioningStateDeleting  EndPointProvisioningState = "Deleting"
	EndPointProvisioningStateFailed    EndPointProvisioningState = "Failed"
	EndPointProvisioningStateSucceeded EndPointProvisioningState = "Succeeded"
	EndPointProvisioningStateUpdating  EndPointProvisioningState = "Updating"
)

func PossibleEndPointProvisioningStateValues

func PossibleEndPointProvisioningStateValues() []EndPointProvisioningState

PossibleEndPointProvisioningStateValues returns the possible values for the EndPointProvisioningState const type.

type EntityStatus

type EntityStatus string

EntityStatus - Entity status.

const (
	EntityStatusActive          EntityStatus = "Active"
	EntityStatusCreating        EntityStatus = "Creating"
	EntityStatusDeleting        EntityStatus = "Deleting"
	EntityStatusDisabled        EntityStatus = "Disabled"
	EntityStatusReceiveDisabled EntityStatus = "ReceiveDisabled"
	EntityStatusRenaming        EntityStatus = "Renaming"
	EntityStatusRestoring       EntityStatus = "Restoring"
	EntityStatusSendDisabled    EntityStatus = "SendDisabled"
	EntityStatusUnknown         EntityStatus = "Unknown"
)

func PossibleEntityStatusValues

func PossibleEntityStatusValues() []EntityStatus

PossibleEntityStatusValues returns the possible values for the EntityStatus const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorResponseError
}

ErrorResponse - The resource management error response.

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ErrorResponseError

type ErrorResponseError struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorResponse

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorResponseError - The error object.

func (ErrorResponseError) MarshalJSON

func (e ErrorResponseError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponseError.

func (*ErrorResponseError) UnmarshalJSON added in v1.1.0

func (e *ErrorResponseError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseError.

type FailoverProperties

type FailoverProperties struct {
	// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.
	Properties *FailoverPropertiesProperties
}

FailoverProperties - Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.

func (FailoverProperties) MarshalJSON added in v1.1.0

func (f FailoverProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FailoverProperties.

func (*FailoverProperties) UnmarshalJSON added in v1.1.0

func (f *FailoverProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FailoverProperties.

type FailoverPropertiesProperties

type FailoverPropertiesProperties struct {
	// Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.
	IsSafeFailover *bool
}

FailoverPropertiesProperties - Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary.

func (FailoverPropertiesProperties) MarshalJSON added in v1.1.0

func (f FailoverPropertiesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FailoverPropertiesProperties.

func (*FailoverPropertiesProperties) UnmarshalJSON added in v1.1.0

func (f *FailoverPropertiesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPropertiesProperties.

type FilterType

type FilterType string

FilterType - Rule filter types

const (
	FilterTypeCorrelationFilter FilterType = "CorrelationFilter"
	FilterTypeSQLFilter         FilterType = "SqlFilter"
)

func PossibleFilterTypeValues

func PossibleFilterTypeValues() []FilterType

PossibleFilterTypeValues returns the possible values for the FilterType const type.

type Identity

type Identity struct {
	// Type of managed service identity.
	Type *ManagedServiceIdentityType

	// Properties for User Assigned Identities
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; ObjectId from the KeyVault
	PrincipalID *string

	// READ-ONLY; TenantId from the KeyVault
	TenantID *string
}

Identity - Properties to configure User Assigned Identities for Bring your Own Keys

func (Identity) MarshalJSON

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v1.1.0

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type KeyType

type KeyType string

KeyType - The access key to regenerate.

const (
	KeyTypePrimaryKey   KeyType = "PrimaryKey"
	KeyTypeSecondaryKey KeyType = "SecondaryKey"
)

func PossibleKeyTypeValues

func PossibleKeyTypeValues() []KeyType

PossibleKeyTypeValues returns the possible values for the KeyType const type.

type KeyVaultProperties

type KeyVaultProperties struct {
	Identity *UserAssignedIdentityProperties

	// Name of the Key from KeyVault
	KeyName *string

	// Uri of KeyVault
	KeyVaultURI *string

	// Version of KeyVault
	KeyVersion *string
}

KeyVaultProperties - Properties to configure keyVault Properties

func (KeyVaultProperties) MarshalJSON added in v1.1.0

func (k KeyVaultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON added in v1.1.0

func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity.

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type MessageCountDetails

type MessageCountDetails struct {
	// READ-ONLY; Number of active messages in the queue, topic, or subscription.
	ActiveMessageCount *int64

	// READ-ONLY; Number of messages that are dead lettered.
	DeadLetterMessageCount *int64

	// READ-ONLY; Number of scheduled messages.
	ScheduledMessageCount *int64

	// READ-ONLY; Number of messages transferred into dead letters.
	TransferDeadLetterMessageCount *int64

	// READ-ONLY; Number of messages transferred to another queue, topic, or subscription.
	TransferMessageCount *int64
}

MessageCountDetails - Message Count Details.

func (MessageCountDetails) MarshalJSON added in v1.1.0

func (m MessageCountDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MessageCountDetails.

func (*MessageCountDetails) UnmarshalJSON added in v1.1.0

func (m *MessageCountDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MessageCountDetails.

type MigrationConfigListResult

type MigrationConfigListResult struct {
	// List of Migration Configs
	Value []*MigrationConfigProperties

	// READ-ONLY; Link to the next set of results. Not empty if Value contains incomplete list of migrationConfigurations
	NextLink *string
}

MigrationConfigListResult - The result of the List migrationConfigurations operation.

func (MigrationConfigListResult) MarshalJSON

func (m MigrationConfigListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MigrationConfigListResult.

func (*MigrationConfigListResult) UnmarshalJSON added in v1.1.0

func (m *MigrationConfigListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MigrationConfigListResult.

type MigrationConfigProperties

type MigrationConfigProperties struct {
	// Properties required to the Create Migration Configuration
	Properties *MigrationConfigPropertiesProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

MigrationConfigProperties - Single item in List or Get Migration Config operation

func (MigrationConfigProperties) MarshalJSON

func (m MigrationConfigProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MigrationConfigProperties.

func (*MigrationConfigProperties) UnmarshalJSON added in v1.1.0

func (m *MigrationConfigProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MigrationConfigProperties.

type MigrationConfigPropertiesProperties

type MigrationConfigPropertiesProperties struct {
	// REQUIRED; Name to access Standard Namespace after migration
	PostMigrationName *string

	// REQUIRED; Existing premium Namespace ARM Id name which has no entities, will be used for migration
	TargetNamespace *string

	// READ-ONLY; State in which Standard to Premium Migration is, possible values : Unknown, Reverting, Completing, Initiating,
	// Syncing, Active
	MigrationState *string

	// READ-ONLY; Number of entities pending to be replicated.
	PendingReplicationOperationsCount *int64

	// READ-ONLY; Provisioning state of Migration Configuration
	ProvisioningState *string
}

MigrationConfigPropertiesProperties - Properties required to the Create Migration Configuration

func (MigrationConfigPropertiesProperties) MarshalJSON added in v1.1.0

func (m MigrationConfigPropertiesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MigrationConfigPropertiesProperties.

func (*MigrationConfigPropertiesProperties) UnmarshalJSON added in v1.1.0

func (m *MigrationConfigPropertiesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MigrationConfigPropertiesProperties.

type MigrationConfigsClient

type MigrationConfigsClient struct {
	// contains filtered or unexported fields
}

MigrationConfigsClient contains the methods for the MigrationConfigs group. Don't use this type directly, use NewMigrationConfigsClient() instead.

func NewMigrationConfigsClient

func NewMigrationConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MigrationConfigsClient, error)

NewMigrationConfigsClient creates a new instance of MigrationConfigsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MigrationConfigsClient) BeginCreateAndStartMigration

BeginCreateAndStartMigration - Creates Migration configuration and starts migration of entities from Standard to Premium namespace If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • configName - The configuration name. Should always be "$default".
  • parameters - Parameters required to create Migration Configuration
  • options - MigrationConfigsClientBeginCreateAndStartMigrationOptions contains the optional parameters for the MigrationConfigsClient.BeginCreateAndStartMigration method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMigrationConfigsClient().BeginCreateAndStartMigration(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, armservicebus.MigrationConfigProperties{
		Properties: &armservicebus.MigrationConfigPropertiesProperties{
			PostMigrationName: to.Ptr("sdk-PostMigration-5919"),
			TargetNamespace:   to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MigrationConfigProperties = armservicebus.MigrationConfigProperties{
	// 	Name: to.Ptr("sdk-Namespace-41"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs"),
	// 	ID: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-41/migrationConfigs/$default"),
	// 	Properties: &armservicebus.MigrationConfigPropertiesProperties{
	// 		MigrationState: to.Ptr("Initiating"),
	// 		PostMigrationName: to.Ptr("sdk-PostMigration-5919"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"),
	// 	},
	// }
}
Output:

func (*MigrationConfigsClient) CompleteMigration

CompleteMigration - This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration is in-progress. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • configName - The configuration name. Should always be "$default".
  • options - MigrationConfigsClientCompleteMigrationOptions contains the optional parameters for the MigrationConfigsClient.CompleteMigration method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewMigrationConfigsClient().CompleteMigration(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*MigrationConfigsClient) Delete

Delete - Deletes a MigrationConfiguration If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • configName - The configuration name. Should always be "$default".
  • options - MigrationConfigsClientDeleteOptions contains the optional parameters for the MigrationConfigsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Migrationconfigurations/SBMigrationconfigurationDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewMigrationConfigsClient().Delete(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*MigrationConfigsClient) Get

Get - Retrieves Migration Config If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • configName - The configuration name. Should always be "$default".
  • options - MigrationConfigsClientGetOptions contains the optional parameters for the MigrationConfigsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Migrationconfigurations/SBMigrationconfigurationGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMigrationConfigsClient().Get(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MigrationConfigProperties = armservicebus.MigrationConfigProperties{
	// 	Name: to.Ptr("sdk-Namespace-41"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs"),
	// 	ID: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-41/migrationConfigs/$default"),
	// 	Properties: &armservicebus.MigrationConfigPropertiesProperties{
	// 		MigrationState: to.Ptr("Active"),
	// 		PendingReplicationOperationsCount: to.Ptr[int64](0),
	// 		PostMigrationName: to.Ptr("sdk-PostMigration-5919"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"),
	// 	},
	// }
}
Output:

func (*MigrationConfigsClient) NewListPager added in v0.5.0

func (client *MigrationConfigsClient) NewListPager(resourceGroupName string, namespaceName string, options *MigrationConfigsClientListOptions) *runtime.Pager[MigrationConfigsClientListResponse]

NewListPager - Gets all migrationConfigurations

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - MigrationConfigsClientListOptions contains the optional parameters for the MigrationConfigsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Migrationconfigurations/SBMigrationconfigurationList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMigrationConfigsClient().NewListPager("ResourceGroup", "sdk-Namespace-9259", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MigrationConfigListResult = armservicebus.MigrationConfigListResult{
		// 	Value: []*armservicebus.MigrationConfigProperties{
		// 		{
		// 			Name: to.Ptr("sdk-Namespace-9259"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/migrationconfigurations"),
		// 			ID: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9259/migrationConfigs/sdk-Namespace-9259"),
		// 			Properties: &armservicebus.MigrationConfigPropertiesProperties{
		// 				MigrationState: to.Ptr("Active"),
		// 				PostMigrationName: to.Ptr("sdk-PostMigration-9423"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7454"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MigrationConfigsClient) Revert

Revert - This operation reverts Migration If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • configName - The configuration name. Should always be "$default".
  • options - MigrationConfigsClientRevertOptions contains the optional parameters for the MigrationConfigsClient.Revert method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Migrationconfigurations/SBMigrationconfigurationRevert.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewMigrationConfigsClient().Revert(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type MigrationConfigsClientBeginCreateAndStartMigrationOptions added in v0.3.0

type MigrationConfigsClientBeginCreateAndStartMigrationOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MigrationConfigsClientBeginCreateAndStartMigrationOptions contains the optional parameters for the MigrationConfigsClient.BeginCreateAndStartMigration method.

type MigrationConfigsClientCompleteMigrationOptions added in v0.3.0

type MigrationConfigsClientCompleteMigrationOptions struct {
}

MigrationConfigsClientCompleteMigrationOptions contains the optional parameters for the MigrationConfigsClient.CompleteMigration method.

type MigrationConfigsClientCompleteMigrationResponse added in v0.3.0

type MigrationConfigsClientCompleteMigrationResponse struct {
}

MigrationConfigsClientCompleteMigrationResponse contains the response from method MigrationConfigsClient.CompleteMigration.

type MigrationConfigsClientCreateAndStartMigrationResponse added in v0.3.0

type MigrationConfigsClientCreateAndStartMigrationResponse struct {
	// Single item in List or Get Migration Config operation
	MigrationConfigProperties
}

MigrationConfigsClientCreateAndStartMigrationResponse contains the response from method MigrationConfigsClient.BeginCreateAndStartMigration.

type MigrationConfigsClientDeleteOptions added in v0.3.0

type MigrationConfigsClientDeleteOptions struct {
}

MigrationConfigsClientDeleteOptions contains the optional parameters for the MigrationConfigsClient.Delete method.

type MigrationConfigsClientDeleteResponse added in v0.3.0

type MigrationConfigsClientDeleteResponse struct {
}

MigrationConfigsClientDeleteResponse contains the response from method MigrationConfigsClient.Delete.

type MigrationConfigsClientGetOptions added in v0.3.0

type MigrationConfigsClientGetOptions struct {
}

MigrationConfigsClientGetOptions contains the optional parameters for the MigrationConfigsClient.Get method.

type MigrationConfigsClientGetResponse added in v0.3.0

type MigrationConfigsClientGetResponse struct {
	// Single item in List or Get Migration Config operation
	MigrationConfigProperties
}

MigrationConfigsClientGetResponse contains the response from method MigrationConfigsClient.Get.

type MigrationConfigsClientListOptions added in v0.3.0

type MigrationConfigsClientListOptions struct {
}

MigrationConfigsClientListOptions contains the optional parameters for the MigrationConfigsClient.NewListPager method.

type MigrationConfigsClientListResponse added in v0.3.0

type MigrationConfigsClientListResponse struct {
	// The result of the List migrationConfigurations operation.
	MigrationConfigListResult
}

MigrationConfigsClientListResponse contains the response from method MigrationConfigsClient.NewListPager.

type MigrationConfigsClientRevertOptions added in v0.3.0

type MigrationConfigsClientRevertOptions struct {
}

MigrationConfigsClientRevertOptions contains the optional parameters for the MigrationConfigsClient.Revert method.

type MigrationConfigsClientRevertResponse added in v0.3.0

type MigrationConfigsClientRevertResponse struct {
}

MigrationConfigsClientRevertResponse contains the response from method MigrationConfigsClient.Revert.

type MigrationConfigurationName

type MigrationConfigurationName string
const (
	MigrationConfigurationNameDefault MigrationConfigurationName = "$default"
)

func PossibleMigrationConfigurationNameValues

func PossibleMigrationConfigurationNameValues() []MigrationConfigurationName

PossibleMigrationConfigurationNameValues returns the possible values for the MigrationConfigurationName const type.

type NWRuleSetIPRules

type NWRuleSetIPRules struct {
	// The IP Filter Action
	Action *NetworkRuleIPAction

	// IP Mask
	IPMask *string
}

NWRuleSetIPRules - Description of NetWorkRuleSet - IpRules resource.

func (NWRuleSetIPRules) MarshalJSON added in v1.1.0

func (n NWRuleSetIPRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NWRuleSetIPRules.

func (*NWRuleSetIPRules) UnmarshalJSON added in v1.1.0

func (n *NWRuleSetIPRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NWRuleSetIPRules.

type NWRuleSetVirtualNetworkRules

type NWRuleSetVirtualNetworkRules struct {
	// Value that indicates whether to ignore missing VNet Service Endpoint
	IgnoreMissingVnetServiceEndpoint *bool

	// Subnet properties
	Subnet *Subnet
}

NWRuleSetVirtualNetworkRules - Description of VirtualNetworkRules - NetworkRules resource.

func (NWRuleSetVirtualNetworkRules) MarshalJSON added in v1.1.0

func (n NWRuleSetVirtualNetworkRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NWRuleSetVirtualNetworkRules.

func (*NWRuleSetVirtualNetworkRules) UnmarshalJSON added in v1.1.0

func (n *NWRuleSetVirtualNetworkRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NWRuleSetVirtualNetworkRules.

type NamespacesClient

type NamespacesClient struct {
	// contains filtered or unexported fields
}

NamespacesClient contains the methods for the Namespaces group. Don't use this type directly, use NewNamespacesClient() instead.

func NewNamespacesClient

func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamespacesClient, error)

NewNamespacesClient creates a new instance of NamespacesClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NamespacesClient) BeginCreateOrUpdate

func (client *NamespacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters SBNamespace, options *NamespacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NamespacesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name.
  • parameters - Parameters supplied to create a namespace resource.
  • options - NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginCreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace2924", armservicebus.SBNamespace{
		Location: to.Ptr("South Central US"),
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
		SKU: &armservicebus.SBSKU{
			Name: to.Ptr(armservicebus.SKUNameStandard),
			Tier: to.Ptr(armservicebus.SKUTierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBNamespace = armservicebus.SBNamespace{
	// 	Name: to.Ptr("sdk-Namespace-2924"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armservicebus.SBNamespaceProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()),
	// 		MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()),
	// 	},
	// 	SKU: &armservicebus.SBSKU{
	// 		Name: to.Ptr(armservicebus.SKUNameStandard),
	// 		Tier: to.Ptr(armservicebus.SKUTierStandard),
	// 	},
	// }
}
Output:

func (*NamespacesClient) BeginDelete

func (client *NamespacesClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientBeginDeleteOptions) (*runtime.Poller[NamespacesClientDeleteResponse], error)

BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginDelete(ctx, "ArunMonocle", "sdk-Namespace-3285", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*NamespacesClient) CheckNameAvailability

CheckNameAvailability - Check the give namespace name availability. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • parameters - Parameters to check availability of the given namespace name
  • options - NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CheckNameAvailability(ctx, armservicebus.CheckNameAvailability{
		Name: to.Ptr("sdk-Namespace-2924"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityResult = armservicebus.CheckNameAvailabilityResult{
	// 	Message: to.Ptr(""),
	// 	NameAvailable: to.Ptr(true),
	// 	Reason: to.Ptr(armservicebus.UnavailableReasonNone),
	// }
}
Output:

func (*NamespacesClient) CreateOrUpdateAuthorizationRule

func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SBAuthorizationRule, options *NamespacesClientCreateOrUpdateAuthorizationRuleOptions) (NamespacesClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates or updates an authorization rule for a namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • parameters - The shared access authorization rule.
  • options - NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceAuthorizationRuleCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6914", "sdk-AuthRules-1788", armservicebus.SBAuthorizationRule{
		Properties: &armservicebus.SBAuthorizationRuleProperties{
			Rights: []*armservicebus.AccessRights{
				to.Ptr(armservicebus.AccessRightsListen),
				to.Ptr(armservicebus.AccessRightsSend)},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-AuthRules-1788"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules/sdk-AuthRules-1788"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*NamespacesClient) CreateOrUpdateNetworkRuleSet

func (client *NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, parameters NetworkRuleSet, options *NamespacesClientCreateOrUpdateNetworkRuleSetOptions) (NamespacesClientCreateOrUpdateNetworkRuleSetResponse, error)

CreateOrUpdateNetworkRuleSet - Create or update NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • parameters - The Namespace IpFilterRule.
  • options - NamespacesClientCreateOrUpdateNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", armservicebus.NetworkRuleSet{
		Properties: &armservicebus.NetworkRuleSetProperties{
			DefaultAction: to.Ptr(armservicebus.DefaultActionDeny),
			IPRules: []*armservicebus.NWRuleSetIPRules{
				{
					Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.1"),
				},
				{
					Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.2"),
				},
				{
					Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.3"),
				},
				{
					Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.4"),
				},
				{
					Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.5"),
				}},
			VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{
				{
					IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
					Subnet: &armservicebus.Subnet{
						ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
					},
				},
				{
					IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
					Subnet: &armservicebus.Subnet{
						ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
					},
				},
				{
					IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
					Subnet: &armservicebus.Subnet{
						ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkRuleSet = armservicebus.NetworkRuleSet{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/NetworkRuleSet"),
	// 	ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/Default-ServiceBus-AustraliaEast/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default"),
	// 	Properties: &armservicebus.NetworkRuleSetProperties{
	// 		DefaultAction: to.Ptr(armservicebus.DefaultActionDeny),
	// 		IPRules: []*armservicebus.NWRuleSetIPRules{
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.1"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.2"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.3"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.4"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.5"),
	// 		}},
	// 		PublicNetworkAccess: to.Ptr(armservicebus.PublicNetworkAccessFlagEnabled),
	// 		VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
	// 				Subnet: &armservicebus.Subnet{
	// 					ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armservicebus.Subnet{
	// 					ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armservicebus.Subnet{
	// 					ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*NamespacesClient) DeleteAuthorizationRule

func (client *NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientDeleteAuthorizationRuleOptions) (NamespacesClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes a namespace authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewNamespacesClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-namespace-6914", "sdk-AuthRules-1788", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*NamespacesClient) Get

func (client *NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetOptions) (NamespacesClientGetResponse, error)

Get - Gets a description for the specified namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-2924", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBNamespace = armservicebus.SBNamespace{
	// 	Name: to.Ptr("sdk-Namespace-2924"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armservicebus.SBNamespaceProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"),
	// 		PrivateEndpointConnections: []*armservicebus.PrivateEndpointConnection{
	// 			{
	// 				Name: to.Ptr("privateEndpointConnectionName"),
	// 				Type: to.Ptr("Microsoft.EventHub/Namespaces/PrivateEndpointConnections"),
	// 				ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample/privateEndpointConnections/privateEndpointConnectionName"),
	// 				Properties: &armservicebus.PrivateEndpointConnectionProperties{
	// 					PrivateEndpoint: &armservicebus.PrivateEndpoint{
	// 						ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.Network/privateEndpoints/NamespaceSample"),
	// 					},
	// 					PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{
	// 						Description: to.Ptr("Auto-Approved"),
	// 						Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved),
	// 					},
	// 					ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.350Z"); return t}()),
	// 	},
	// 	SKU: &armservicebus.SBSKU{
	// 		Name: to.Ptr(armservicebus.SKUNameStandard),
	// 		Tier: to.Ptr(armservicebus.SKUTierStandard),
	// 	},
	// }
}
Output:

func (*NamespacesClient) GetAuthorizationRule

func (client *NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientGetAuthorizationRuleOptions) (NamespacesClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Gets an authorization rule for a namespace by rule name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6914", "sdk-AuthRules-1788", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-AuthRules-1788"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules/sdk-AuthRules-1788/"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*NamespacesClient) GetNetworkRuleSet

func (client *NamespacesClient) GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetNetworkRuleSetOptions) (NamespacesClientGetNetworkRuleSetResponse, error)

GetNetworkRuleSet - Gets NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkRuleSet = armservicebus.NetworkRuleSet{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/NetworkRuleSet"),
	// 	ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/Default-ServiceBus-AustraliaEast/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default"),
	// 	Properties: &armservicebus.NetworkRuleSetProperties{
	// 		DefaultAction: to.Ptr(armservicebus.DefaultActionAllow),
	// 		IPRules: []*armservicebus.NWRuleSetIPRules{
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.1"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.2"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.3"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.4"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.5"),
	// 		}},
	// 		PublicNetworkAccess: to.Ptr(armservicebus.PublicNetworkAccessFlagEnabled),
	// 		VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
	// 				Subnet: &armservicebus.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armservicebus.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armservicebus.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*NamespacesClient) ListKeys

func (client *NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientListKeysOptions) (NamespacesClientListKeysResponse, error)

ListKeys - Gets the primary and secondary connection strings for the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-6914", "sdk-AuthRules-1788", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	KeyName: to.Ptr("sdk-AuthRules-1788"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*NamespacesClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *NamespacesClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, options *NamespacesClientListAuthorizationRulesOptions) *runtime.Pager[NamespacesClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Gets the authorization rules for a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-6914", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{
		// 	Value: []*armservicebus.SBAuthorizationRule{
		// 		{
		// 			Name: to.Ptr("RootManageSharedAccessKey"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"),
		// 			ID: to.Ptr("https://sbgm.windows-int.net/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules?api-version=2017-04-01/RootManageSharedAccessKey"),
		// 			Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 				Rights: []*armservicebus.AccessRights{
		// 					to.Ptr(armservicebus.AccessRightsListen),
		// 					to.Ptr(armservicebus.AccessRightsManage),
		// 					to.Ptr(armservicebus.AccessRightsSend)},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("sdk-AuthRules-1788"),
		// 				Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"),
		// 				ID: to.Ptr("https://sbgm.windows-int.net/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules?api-version=2017-04-01/sdk-AuthRules-1788"),
		// 				Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 					Rights: []*armservicebus.AccessRights{
		// 						to.Ptr(armservicebus.AccessRightsListen),
		// 						to.Ptr(armservicebus.AccessRightsSend)},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

func (*NamespacesClient) NewListByResourceGroupPager added in v0.5.0

func (client *NamespacesClient) NewListByResourceGroupPager(resourceGroupName string, options *NamespacesClientListByResourceGroupOptions) *runtime.Pager[NamespacesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Gets the available namespaces within a resource group.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • options - NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListByResourceGroupPager("ArunMonocle", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBNamespaceListResult = armservicebus.SBNamespaceListResult{
		// 	Value: []*armservicebus.SBNamespace{
		// 		{
		// 			Name: to.Ptr("sdk-Namespace-2924"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.350Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) NewListNetworkRuleSetsPager added in v0.5.0

func (client *NamespacesClient) NewListNetworkRuleSetsPager(resourceGroupName string, namespaceName string, options *NamespacesClientListNetworkRuleSetsOptions) *runtime.Pager[NamespacesClientListNetworkRuleSetsResponse]

NewListNetworkRuleSetsPager - Gets list of NetworkRuleSet for a Namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientListNetworkRuleSetsOptions contains the optional parameters for the NamespacesClient.NewListNetworkRuleSetsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListNetworkRuleSetsPager("ResourceGroup", "sdk-Namespace-6019", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkRuleSetListResult = armservicebus.NetworkRuleSetListResult{
		// 	Value: []*armservicebus.NetworkRuleSet{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/NetworkRuleSet"),
		// 			ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkrulesets/default"),
		// 			Properties: &armservicebus.NetworkRuleSetProperties{
		// 				DefaultAction: to.Ptr(armservicebus.DefaultActionDeny),
		// 				IPRules: []*armservicebus.NWRuleSetIPRules{
		// 					{
		// 						Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
		// 						IPMask: to.Ptr("1.1.1.1"),
		// 					},
		// 					{
		// 						Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
		// 						IPMask: to.Ptr("1.1.1.2"),
		// 					},
		// 					{
		// 						Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
		// 						IPMask: to.Ptr("1.1.1.3"),
		// 					},
		// 					{
		// 						Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
		// 						IPMask: to.Ptr("1.1.1.4"),
		// 					},
		// 					{
		// 						Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
		// 						IPMask: to.Ptr("1.1.1.5"),
		// 				}},
		// 				VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{
		// 					{
		// 						IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
		// 						Subnet: &armservicebus.Subnet{
		// 							ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
		// 						},
		// 					},
		// 					{
		// 						IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
		// 						Subnet: &armservicebus.Subnet{
		// 							ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
		// 						},
		// 					},
		// 					{
		// 						IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
		// 						Subnet: &armservicebus.Subnet{
		// 							ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
		// 						},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) NewListPager added in v0.5.0

NewListPager - Gets all the available namespaces within the subscription, irrespective of the resource groups.

Generated from API version 2021-11-01

  • options - NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBNamespaceListResult = armservicebus.SBNamespaceListResult{
		// 	Value: []*armservicebus.SBNamespace{
		// 		{
		// 			Name: to.Ptr("NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:40:17.270Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-91f08e47-2b04-4943-b0cd-a5fb02b88f20"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T07:15:30.780Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-41dc63f4-0b08-4029-b3ef-535a131bfa65"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-41dc63f4-0b08-4029-b3ef-535a131bfa65"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:50:38.980Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-41dc63f4-0b08-4029-b3ef-535a131bfa65"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-41dc63f4-0b08-4029-b3ef-535a131bfa65.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:42:58.003Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-df52cf51-e831-4bf2-bd92-e9885f68a996"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-df52cf51-e831-4bf2-bd92-e9885f68a996"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:17:54.997Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-df52cf51-e831-4bf2-bd92-e9885f68a996"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-df52cf51-e831-4bf2-bd92-e9885f68a996.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:44:39.737Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SBPremium"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/SBPremium"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:01:00.420Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sbpremium"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://SBPremium.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:01:00.420Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNamePremium),
		// 				Capacity: to.Ptr[int32](1),
		// 				Tier: to.Ptr(armservicebus.SKUTierPremium),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("rrama-ns2"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/sadfsadfsadf/providers/Microsoft.ServiceBus/namespaces/rrama-ns2"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T04:14:00.013Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-ns2"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://rrama-ns2.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-03T22:53:32.927Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-20e57600-29d0-4035-ac85-74f4c54dcda1"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-20e57600-29d0-4035-ac85-74f4c54dcda1"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:30:49.160Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-20e57600-29d0-4035-ac85-74f4c54dcda1"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-20e57600-29d0-4035-ac85-74f4c54dcda1.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:17:58.483Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-3e538a1a-58fb-4315-b2ce-76f5c944114c"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-3e538a1a-58fb-4315-b2ce-76f5c944114c"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T18:07:30.050Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-3e538a1a-58fb-4315-b2ce-76f5c944114c"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-3e538a1a-58fb-4315-b2ce-76f5c944114c.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:42:57.747Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("prem-ns123"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/prem-ns123"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-13T00:02:39.997Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:prem-ns123"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://prem-ns123.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-13T00:02:39.997Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNamePremium),
		// 				Capacity: to.Ptr[int32](1),
		// 				Tier: to.Ptr(armservicebus.SKUTierPremium),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:01:58.730Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T03:02:59.800Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:22:45.327Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:08:01.207Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-c05e9df3-7737-44ee-a321-15f6e0545b97"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-c05e9df3-7737-44ee-a321-15f6e0545b97"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:29:19.750Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-c05e9df3-7737-44ee-a321-15f6e0545b97"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-c05e9df3-7737-44ee-a321-15f6e0545b97.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:10:35.527Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-dcb4152c-231b-4c16-a683-07cc6b38fa46"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-dcb4152c-231b-4c16-a683-07cc6b38fa46"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:34:35.363Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-dcb4152c-231b-4c16-a683-07cc6b38fa46"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-dcb4152c-231b-4c16-a683-07cc6b38fa46.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:33:00.957Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-f501f5e6-1f24-439b-8982-9af665156d40"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-f501f5e6-1f24-439b-8982-9af665156d40"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:25:55.707Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-f501f5e6-1f24-439b-8982-9af665156d40"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-f501f5e6-1f24-439b-8982-9af665156d40.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T07:42:59.687Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:32:08.227Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:32:57.770Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:54:05.103Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:43:50.313Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-6520cc09-01ac-40a3-bc09-c5c431116e92"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-6520cc09-01ac-40a3-bc09-c5c431116e92"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:49:59.243Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-6520cc09-01ac-40a3-bc09-c5c431116e92"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-6520cc09-01ac-40a3-bc09-c5c431116e92.servicebus.windows-int.net:443"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:15:36.950Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-bfba6d5c-a425-42d9-85db-0f4da770e29a"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-bfba6d5c-a425-42d9-85db-0f4da770e29a"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:23:32.083Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-bfba6d5c-a425-42d9-85db-0f4da770e29a"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-bfba6d5c-a425-42d9-85db-0f4da770e29a.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:02:57.433Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SBPrem"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/SBPrem"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:16:30.870Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sbprem"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://SBPrem.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:16:30.870Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNamePremium),
		// 				Capacity: to.Ptr[int32](1),
		// 				Tier: to.Ptr(armservicebus.SKUTierPremium),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-43b136b4-8716-40b2-97c5-0d77cac0062c"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-43b136b4-8716-40b2-97c5-0d77cac0062c"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:14:50.577Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-43b136b4-8716-40b2-97c5-0d77cac0062c"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-43b136b4-8716-40b2-97c5-0d77cac0062c.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:23:01.067Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-7c0443de-5f88-450c-b574-83f60a097dd1"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-7c0443de-5f88-450c-b574-83f60a097dd1"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T04:07:15.397Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-7c0443de-5f88-450c-b574-83f60a097dd1"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-7c0443de-5f88-450c-b574-83f60a097dd1.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:03:03.097Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-62dd7753-a5f9-42fd-a354-ca38a4505d69"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-62dd7753-a5f9-42fd-a354-ca38a4505d69"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:33:50.450Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-62dd7753-a5f9-42fd-a354-ca38a4505d69"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-62dd7753-a5f9-42fd-a354-ca38a4505d69.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:35:33.053Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-ae18a18c-97ab-4089-965d-8acbf4794091"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-ae18a18c-97ab-4089-965d-8acbf4794091"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:43:36.517Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-ae18a18c-97ab-4089-965d-8acbf4794091"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-ae18a18c-97ab-4089-965d-8acbf4794091.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T12:40:30.587Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:46:03.773Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:43:54.560Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:59:12.100Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:33:52.230Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-d9337efd-9b27-454c-b2a5-dcfea56920d9"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-d9337efd-9b27-454c-b2a5-dcfea56920d9"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:45:09.270Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-d9337efd-9b27-454c-b2a5-dcfea56920d9"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-d9337efd-9b27-454c-b2a5-dcfea56920d9.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:20:31.863Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:34:36.447Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-ad5ae732-abea-4e62-9de0-c90de0ddec0a"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:15:31.607Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-d447fb03-c7da-40fe-b5eb-14f36888837b"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-d447fb03-c7da-40fe-b5eb-14f36888837b"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:53:46.697Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-d447fb03-c7da-40fe-b5eb-14f36888837b"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-d447fb03-c7da-40fe-b5eb-14f36888837b.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T11:09:41.260Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ReproSB"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/ReproSB"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-27T19:29:34.523Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:reprosb"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://ReproSB.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-27T19:29:58.640Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-4c90097f-19a8-42e7-bb3c-4ac088994719"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-4c90097f-19a8-42e7-bb3c-4ac088994719"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:35:32.610Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-4c90097f-19a8-42e7-bb3c-4ac088994719"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-4c90097f-19a8-42e7-bb3c-4ac088994719.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:13:52.270Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("rrama-1-23-17"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/rrama-1-23-17"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T22:54:40.907Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-1-23-17"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://rrama-1-23-17.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-04T00:53:28.777Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:43:25.710Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T11:05:31.890Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-be903820-3533-46e8-90e4-72c132411848"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-be903820-3533-46e8-90e4-72c132411848"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:24:01.923Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-be903820-3533-46e8-90e4-72c132411848"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-be903820-3533-46e8-90e4-72c132411848.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:09:42.513Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("rrama-namespace1"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/rrama-namespace1"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:47:22.963Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-namespace1"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://rrama-namespace1.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:47:27.297Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:38:02.517Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-a3c38e9b-32a3-4c51-85d7-263150a8dda9"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:03:55.960Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:42:40.010Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:33:02.363Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T04:28:10.710Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:43:51.587Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sdk-Namespace-2924"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.350Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("rrama-sb1"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/rrama-sb1"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-01T21:47:34.903Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-sb1"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://rrama-sb1.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-02T02:10:03.083Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("WhackWhack"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/WhackWhack"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T23:39:01.347Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:whackwhack"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://WhackWhack.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-04T00:56:32.687Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:51:27.730Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:19:43.383Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T01:14:25.613Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T12:33:01.727Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("bn3-rrama-foo1"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/bn3-rrama-foo1"),
		// 			Location: to.Ptr("East US 2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:54:26.927Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:bn3-rrama-foo1"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo1.servicebus.int7.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:54:26.927Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("bn3-rrama-foo3"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/bn3-rrama-foo3"),
		// 			Location: to.Ptr("East US 2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:24:09.907Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:bn3-rrama-foo3"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo3.servicebus.int7.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:24:33.233Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("bn3-rrama-foo2"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/bn3-rrama-foo2"),
		// 			Location: to.Ptr("East US 2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:57:40.820Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:bn3-rrama-foo2"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo2.servicebus.int7.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:57:40.820Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("db3-rrama-foo2"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/db3-rrama-foo2"),
		// 			Location: to.Ptr("North Europe"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armservicebus.SBNamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:10:43.463Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:db3-rrama-foo2"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://db3-rrama-foo2.servicebus.int7.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:11:09.133Z"); return t}()),
		// 			},
		// 			SKU: &armservicebus.SBSKU{
		// 				Name: to.Ptr(armservicebus.SKUNameStandard),
		// 				Tier: to.Ptr(armservicebus.SKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) RegenerateKeys

func (client *NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *NamespacesClientRegenerateKeysOptions) (NamespacesClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the primary or secondary connection strings for the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate the authorization rule.
  • options - NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceAuthorizationRuleRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-6914", "sdk-AuthRules-1788", armservicebus.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	KeyName: to.Ptr("sdk-AuthRules-1788"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=#############################################"),
	// 	PrimaryKey: to.Ptr("#############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=#############################################"),
	// 	SecondaryKey: to.Ptr("#############################################"),
	// }
}
Output:

func (*NamespacesClient) Update

func (client *NamespacesClient) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters SBNamespaceUpdateParameters, options *NamespacesClientUpdateOptions) (NamespacesClientUpdateResponse, error)

Update - Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • parameters - Parameters supplied to update a namespace resource.
  • options - NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/SBNameSpaceUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Update(ctx, "ArunMonocle", "sdk-Namespace-3285", armservicebus.SBNamespaceUpdateParameters{
		Location: to.Ptr("South Central US"),
		Tags: map[string]*string{
			"tag3": to.Ptr("value3"),
			"tag4": to.Ptr("value4"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBNamespace = armservicebus.SBNamespace{
	// 	Name: to.Ptr("sdk-Namespace-3285"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3285"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag3": to.Ptr("value3"),
	// 		"tag4": to.Ptr("value4"),
	// 	},
	// 	Properties: &armservicebus.SBNamespaceProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T23:07:58.170Z"); return t}()),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-3285"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-3285.servicebus.windows-int.net:443/"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T23:08:45.497Z"); return t}()),
	// 	},
	// 	SKU: &armservicebus.SBSKU{
	// 		Name: to.Ptr(armservicebus.SKUNameStandard),
	// 		Tier: to.Ptr(armservicebus.SKUTierStandard),
	// 	},
	// }
}
Output:

type NamespacesClientBeginCreateOrUpdateOptions added in v0.3.0

type NamespacesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.

type NamespacesClientBeginDeleteOptions added in v0.3.0

type NamespacesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.

type NamespacesClientCheckNameAvailabilityOptions added in v0.3.0

type NamespacesClientCheckNameAvailabilityOptions struct {
}

NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability method.

type NamespacesClientCheckNameAvailabilityResponse added in v0.3.0

type NamespacesClientCheckNameAvailabilityResponse struct {
	// Description of a Check Name availability request properties.
	CheckNameAvailabilityResult
}

NamespacesClientCheckNameAvailabilityResponse contains the response from method NamespacesClient.CheckNameAvailability.

type NamespacesClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type NamespacesClientCreateOrUpdateAuthorizationRuleOptions struct {
}

NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.

type NamespacesClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type NamespacesClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

NamespacesClientCreateOrUpdateAuthorizationRuleResponse contains the response from method NamespacesClient.CreateOrUpdateAuthorizationRule.

type NamespacesClientCreateOrUpdateNetworkRuleSetOptions added in v0.3.0

type NamespacesClientCreateOrUpdateNetworkRuleSetOptions struct {
}

NamespacesClientCreateOrUpdateNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateNetworkRuleSet method.

type NamespacesClientCreateOrUpdateNetworkRuleSetResponse added in v0.3.0

type NamespacesClientCreateOrUpdateNetworkRuleSetResponse struct {
	// Description of NetworkRuleSet resource.
	NetworkRuleSet
}

NamespacesClientCreateOrUpdateNetworkRuleSetResponse contains the response from method NamespacesClient.CreateOrUpdateNetworkRuleSet.

type NamespacesClientCreateOrUpdateResponse added in v0.3.0

type NamespacesClientCreateOrUpdateResponse struct {
	// Description of a namespace resource.
	SBNamespace
}

NamespacesClientCreateOrUpdateResponse contains the response from method NamespacesClient.BeginCreateOrUpdate.

type NamespacesClientDeleteAuthorizationRuleOptions added in v0.3.0

type NamespacesClientDeleteAuthorizationRuleOptions struct {
}

NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.

type NamespacesClientDeleteAuthorizationRuleResponse added in v0.3.0

type NamespacesClientDeleteAuthorizationRuleResponse struct {
}

NamespacesClientDeleteAuthorizationRuleResponse contains the response from method NamespacesClient.DeleteAuthorizationRule.

type NamespacesClientDeleteResponse added in v0.3.0

type NamespacesClientDeleteResponse struct {
}

NamespacesClientDeleteResponse contains the response from method NamespacesClient.BeginDelete.

type NamespacesClientGetAuthorizationRuleOptions added in v0.3.0

type NamespacesClientGetAuthorizationRuleOptions struct {
}

NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.

type NamespacesClientGetAuthorizationRuleResponse added in v0.3.0

type NamespacesClientGetAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

NamespacesClientGetAuthorizationRuleResponse contains the response from method NamespacesClient.GetAuthorizationRule.

type NamespacesClientGetNetworkRuleSetOptions added in v0.3.0

type NamespacesClientGetNetworkRuleSetOptions struct {
}

NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet method.

type NamespacesClientGetNetworkRuleSetResponse added in v0.3.0

type NamespacesClientGetNetworkRuleSetResponse struct {
	// Description of NetworkRuleSet resource.
	NetworkRuleSet
}

NamespacesClientGetNetworkRuleSetResponse contains the response from method NamespacesClient.GetNetworkRuleSet.

type NamespacesClientGetOptions added in v0.3.0

type NamespacesClientGetOptions struct {
}

NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.

type NamespacesClientGetResponse added in v0.3.0

type NamespacesClientGetResponse struct {
	// Description of a namespace resource.
	SBNamespace
}

NamespacesClientGetResponse contains the response from method NamespacesClient.Get.

type NamespacesClientListAuthorizationRulesOptions added in v0.3.0

type NamespacesClientListAuthorizationRulesOptions struct {
}

NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.

type NamespacesClientListAuthorizationRulesResponse added in v0.3.0

type NamespacesClientListAuthorizationRulesResponse struct {
	// The response to the List Namespace operation.
	SBAuthorizationRuleListResult
}

NamespacesClientListAuthorizationRulesResponse contains the response from method NamespacesClient.NewListAuthorizationRulesPager.

type NamespacesClientListByResourceGroupOptions added in v0.3.0

type NamespacesClientListByResourceGroupOptions struct {
}

NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager method.

type NamespacesClientListByResourceGroupResponse added in v0.3.0

type NamespacesClientListByResourceGroupResponse struct {
	// The response of the List Namespace operation.
	SBNamespaceListResult
}

NamespacesClientListByResourceGroupResponse contains the response from method NamespacesClient.NewListByResourceGroupPager.

type NamespacesClientListKeysOptions added in v0.3.0

type NamespacesClientListKeysOptions struct {
}

NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.

type NamespacesClientListKeysResponse added in v0.3.0

type NamespacesClientListKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

NamespacesClientListKeysResponse contains the response from method NamespacesClient.ListKeys.

type NamespacesClientListNetworkRuleSetsOptions added in v0.3.0

type NamespacesClientListNetworkRuleSetsOptions struct {
}

NamespacesClientListNetworkRuleSetsOptions contains the optional parameters for the NamespacesClient.NewListNetworkRuleSetsPager method.

type NamespacesClientListNetworkRuleSetsResponse added in v0.3.0

type NamespacesClientListNetworkRuleSetsResponse struct {
	// The response of the List NetworkRuleSet operation.
	NetworkRuleSetListResult
}

NamespacesClientListNetworkRuleSetsResponse contains the response from method NamespacesClient.NewListNetworkRuleSetsPager.

type NamespacesClientListOptions added in v0.3.0

type NamespacesClientListOptions struct {
}

NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.

type NamespacesClientListResponse added in v0.3.0

type NamespacesClientListResponse struct {
	// The response of the List Namespace operation.
	SBNamespaceListResult
}

NamespacesClientListResponse contains the response from method NamespacesClient.NewListPager.

type NamespacesClientRegenerateKeysOptions added in v0.3.0

type NamespacesClientRegenerateKeysOptions struct {
}

NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.

type NamespacesClientRegenerateKeysResponse added in v0.3.0

type NamespacesClientRegenerateKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

NamespacesClientRegenerateKeysResponse contains the response from method NamespacesClient.RegenerateKeys.

type NamespacesClientUpdateOptions added in v0.3.0

type NamespacesClientUpdateOptions struct {
}

NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.

type NamespacesClientUpdateResponse added in v0.3.0

type NamespacesClientUpdateResponse struct {
	// Description of a namespace resource.
	SBNamespace
}

NamespacesClientUpdateResponse contains the response from method NamespacesClient.Update.

type NetworkRuleIPAction

type NetworkRuleIPAction string

NetworkRuleIPAction - The IP Filter Action

const (
	NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow"
)

func PossibleNetworkRuleIPActionValues

func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction

PossibleNetworkRuleIPActionValues returns the possible values for the NetworkRuleIPAction const type.

type NetworkRuleSet

type NetworkRuleSet struct {
	// NetworkRuleSet properties
	Properties *NetworkRuleSetProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

NetworkRuleSet - Description of NetworkRuleSet resource.

func (NetworkRuleSet) MarshalJSON

func (n NetworkRuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.

func (*NetworkRuleSet) UnmarshalJSON added in v1.1.0

func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.

type NetworkRuleSetListResult

type NetworkRuleSetListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of NetworkRuleSet.
	NextLink *string

	// Result of the List NetworkRuleSet operation.
	Value []*NetworkRuleSet
}

NetworkRuleSetListResult - The response of the List NetworkRuleSet operation.

func (NetworkRuleSetListResult) MarshalJSON

func (n NetworkRuleSetListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetListResult.

func (*NetworkRuleSetListResult) UnmarshalJSON added in v1.1.0

func (n *NetworkRuleSetListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetListResult.

type NetworkRuleSetProperties

type NetworkRuleSetProperties struct {
	// Default Action for Network Rule Set
	DefaultAction *DefaultAction

	// List of IpRules
	IPRules []*NWRuleSetIPRules

	// This determines if traffic is allowed over public network. By default it is enabled.
	PublicNetworkAccess *PublicNetworkAccessFlag

	// Value that indicates whether Trusted Service Access is Enabled or not.
	TrustedServiceAccessEnabled *bool

	// List VirtualNetwork Rules
	VirtualNetworkRules []*NWRuleSetVirtualNetworkRules
}

NetworkRuleSetProperties - NetworkRuleSet properties

func (NetworkRuleSetProperties) MarshalJSON

func (n NetworkRuleSetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetProperties.

func (*NetworkRuleSetProperties) UnmarshalJSON added in v1.1.0

func (n *NetworkRuleSetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetProperties.

type Operation

type Operation struct {
	// Display of the operation
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// Origin of the operation
	Origin *string

	// Properties of the operation
	Properties any

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}
	Name *string
}

Operation - A Service Bus REST API operation

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Localized friendly description for the operation
	Description *string

	// READ-ONLY; Localized friendly name for the operation
	Operation *string

	// READ-ONLY; Resource provider of the operation
	Provider *string

	// READ-ONLY; Resource of the operation
	Resource *string
}

OperationDisplay - Operation display payload

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string

	// READ-ONLY; List of ServiceBus operations supported by the Microsoft.ServiceBus resource provider.
	Value []*Operation
}

OperationListResult - Result of the request to list ServiceBus operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.1.0

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists all of the available ServiceBus REST API operations.

Generated from API version 2021-11-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/SBOperations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armservicebus.OperationListResult{
		// 	Value: []*armservicebus.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/checkNameAvailability/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get namespace availability."),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Non Resource Operation"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/register/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Registers the ServiceBus Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("ServiceBus Resource Provider"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create Or Update Namespace "),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Resource"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/Delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Namespace"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Namespace Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Namespace Authorization Rule"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/listkeys/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Listkeys"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/regenerateKeys/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Resource Regeneratekeys"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Queue"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Queue"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/Delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Queue"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Queue Authorization Rule"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr(" Get Queue Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Queue Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/listkeys/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("List Queue keys"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/regenerateKeys/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Resource Regeneratekeys"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Queue AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Topic"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Topic"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/Delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Topic"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Topic Authorization Rule"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr(" Get Topic Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Topic Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/listkeys/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("List Topic keys"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/regenerateKeys/action"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Resource Regeneratekeys"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Topic AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update TopicSubscription"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("TopicSubscription"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get TopicSubscription"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("TopicSubscription"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/Delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete TopicSubscription"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("TopicSubscription"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/rules/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Rule"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Rule"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/rules/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Rule"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Rule"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/rules/Delete"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Delete Rule"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Rule"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/metricDefinitions/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace metrics"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace metrics"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/diagnosticSettings/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace diagnostic settings"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace diagnostic settings"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/diagnosticSettings/write"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Namespace diagnostic settings"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace diagnostic settings"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceBus/namespaces/logDefinitions/read"),
		// 			Display: &armservicebus.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace logs"),
		// 				Provider: to.Ptr("Microsoft Azure ServiceBus"),
		// 				Resource: to.Ptr("Namespace logs"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// Result of the request to list ServiceBus operations. It contains a list of operations and a URL link to get the next set
	// of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PrivateEndpoint

type PrivateEndpoint struct {
	// The ARM identifier for Private Endpoint.
	ID *string
}

PrivateEndpoint information.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Properties of the PrivateEndpointConnection.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

PrivateEndpointConnection - Properties of the PrivateEndpointConnection.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// A link for the next page of private endpoint connection resources.
	NextLink *string

	// A collection of private endpoint connection resources.
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - Result of the list of all private endpoint connections operation.

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// The Private Endpoint resource for this Connection.
	PrivateEndpoint *PrivateEndpoint

	// Details about the state of the connection.
	PrivateLinkServiceConnectionState *ConnectionState

	// Provisioning state of the Private Endpoint Connection.
	ProvisioningState *EndPointProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource.

func (PrivateEndpointConnectionProperties) MarshalJSON added in v1.1.0

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes an existing Private Endpoint Connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "ArunMonocle", "sdk-Namespace-3285", "928c44d5-b7c6-423b-b6fa-811e0c27b3e0", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) CreateOrUpdate

func (client *PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientCreateOrUpdateOptions) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates PrivateEndpointConnections of service namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • parameters - Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource.
  • options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-2924", "privateEndpointConnectionName", armservicebus.PrivateEndpointConnection{
		Properties: &armservicebus.PrivateEndpointConnectionProperties{
			PrivateEndpoint: &armservicebus.PrivateEndpoint{
				ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847"),
			},
			PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{
				Description: to.Ptr("testing"),
				Status:      to.Ptr(armservicebus.PrivateLinkConnectionStatusRejected),
			},
			ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armservicebus.PrivateEndpointConnection{
	// 	Name: to.Ptr("928c44d5-b7c6-423b-b6fa-811e0c27b3e0"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5828/privateEndpointConnections/928c44d5-b7c6-423b-b6fa-811e0c27b3e0"),
	// 	Properties: &armservicebus.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armservicebus.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5828"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets a description for the specified Private Endpoint Connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "SDK-ServiceBus-4794", "sdk-Namespace-5828", "privateEndpointConnectionName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armservicebus.PrivateEndpointConnection{
	// 	Name: to.Ptr("privateEndpointConnectionName"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5828/privateEndpointConnections/privateEndpointConnectionName"),
	// 	Properties: &armservicebus.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armservicebus.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5828"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.5.0

NewListPager - Gets the available PrivateEndpointConnections within a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("SDK-ServiceBus-4794", "sdk-Namespace-5828", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateEndpointConnectionListResult = armservicebus.PrivateEndpointConnectionListResult{
		// 	Value: []*armservicebus.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("5dc668b3-70e4-437f-b61c-a3c1e594be7a"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-7182/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5705-new/privateEndpointConnections/5dc668b3-70e4-437f-b61c-a3c1e594be7a"),
		// 			Properties: &armservicebus.PrivateEndpointConnectionProperties{
		// 				PrivateEndpoint: &armservicebus.PrivateEndpoint{
		// 					ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-7182/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5705-new"),
		// 				},
		// 				PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{
		// 					Description: to.Ptr("Auto-Approved"),
		// 					Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved),
		// 				},
		// 				ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.3.0

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateOrUpdateOptions added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// Properties of the PrivateEndpointConnection.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.3.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.3.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.3.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// Properties of the PrivateEndpointConnection.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.3.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.

type PrivateEndpointConnectionsClientListResponse added in v0.3.0

type PrivateEndpointConnectionsClientListResponse struct {
	// Result of the list of all private endpoint connections operation.
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateLinkConnectionStatus

type PrivateLinkConnectionStatus string

PrivateLinkConnectionStatus - Status of the connection.

const (
	PrivateLinkConnectionStatusApproved     PrivateLinkConnectionStatus = "Approved"
	PrivateLinkConnectionStatusDisconnected PrivateLinkConnectionStatus = "Disconnected"
	PrivateLinkConnectionStatusPending      PrivateLinkConnectionStatus = "Pending"
	PrivateLinkConnectionStatusRejected     PrivateLinkConnectionStatus = "Rejected"
)

func PossiblePrivateLinkConnectionStatusValues

func PossiblePrivateLinkConnectionStatusValues() []PrivateLinkConnectionStatus

PossiblePrivateLinkConnectionStatusValues returns the possible values for the PrivateLinkConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Fully qualified identifier of the resource.
	ID *string

	// Name of the resource
	Name *string

	// Properties of the private link resource.
	Properties *PrivateLinkResourceProperties

	// Type of the resource
	Type *string
}

PrivateLinkResource - Information of the private link resource.

func (PrivateLinkResource) MarshalJSON added in v1.1.0

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	GroupID *string

	// Required Members
	RequiredMembers []*string

	// Required Zone Names
	RequiredZoneNames []*string
}

PrivateLinkResourceProperties - Properties of PrivateLinkResource

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get

Get - Gets lists of resources that supports Privatelinks. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/NameSpaces/PrivateLinkResourcesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-2924", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateLinkResourcesListResult = armservicebus.PrivateLinkResourcesListResult{
	// 	Value: []*armservicebus.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("namespace"),
	// 			Type: to.Ptr("Microsoft.ServiceBus/namespaces/privateLinkResources"),
	// 			ID: to.Ptr("subscriptions/subID/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5828/privateLinkResources/namespace"),
	// 			Properties: &armservicebus.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("namespace"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("namespace")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.servicebus.windows.net")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v0.3.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v0.3.0

type PrivateLinkResourcesClientGetResponse struct {
	// Result of the List private link resources operation.
	PrivateLinkResourcesListResult
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesListResult

type PrivateLinkResourcesListResult struct {
	// A link for the next page of private link resources.
	NextLink *string

	// A collection of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourcesListResult - Result of the List private link resources operation.

func (PrivateLinkResourcesListResult) MarshalJSON

func (p PrivateLinkResourcesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourcesListResult.

func (*PrivateLinkResourcesListResult) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourcesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourcesListResult.

type ProvisioningStateDR

type ProvisioningStateDR string

ProvisioningStateDR - Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'

const (
	ProvisioningStateDRAccepted  ProvisioningStateDR = "Accepted"
	ProvisioningStateDRFailed    ProvisioningStateDR = "Failed"
	ProvisioningStateDRSucceeded ProvisioningStateDR = "Succeeded"
)

func PossibleProvisioningStateDRValues

func PossibleProvisioningStateDRValues() []ProvisioningStateDR

PossibleProvisioningStateDRValues returns the possible values for the ProvisioningStateDR const type.

type ProxyResource added in v0.3.0

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

ProxyResource - Common fields that are returned in the response for all Azure Resource Manager resources

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicNetworkAccessFlag

type PublicNetworkAccessFlag string

PublicNetworkAccessFlag - This determines if traffic is allowed over public network. By default it is enabled.

const (
	PublicNetworkAccessFlagDisabled PublicNetworkAccessFlag = "Disabled"
	PublicNetworkAccessFlagEnabled  PublicNetworkAccessFlag = "Enabled"
)

func PossiblePublicNetworkAccessFlagValues

func PossiblePublicNetworkAccessFlagValues() []PublicNetworkAccessFlag

PossiblePublicNetworkAccessFlagValues returns the possible values for the PublicNetworkAccessFlag const type.

type QueuesClient

type QueuesClient struct {
	// contains filtered or unexported fields
}

QueuesClient contains the methods for the Queues group. Don't use this type directly, use NewQueuesClient() instead.

func NewQueuesClient

func NewQueuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QueuesClient, error)

NewQueuesClient creates a new instance of QueuesClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*QueuesClient) CreateOrUpdate

func (client *QueuesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, parameters SBQueue, options *QueuesClientCreateOrUpdateOptions) (QueuesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a Service Bus queue. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • parameters - Parameters supplied to create or update a queue resource.
  • options - QueuesClientCreateOrUpdateOptions contains the optional parameters for the QueuesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewQueuesClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-3174", "sdk-Queues-5647", armservicebus.SBQueue{
		Properties: &armservicebus.SBQueueProperties{
			EnablePartitioning: to.Ptr(true),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBQueue = armservicebus.SBQueue{
	// 	Name: to.Ptr("sdk-Queues-5647"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3174/queues/sdk-Queues-5647"),
	// 	Properties: &armservicebus.SBQueueProperties{
	// 		AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.227Z"); return t}()),
	// 		AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:33.680Z"); return t}()),
	// 		DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"),
	// 		EnableExpress: to.Ptr(false),
	// 		EnablePartitioning: to.Ptr(true),
	// 		LockDuration: to.Ptr("PT1M"),
	// 		MaxDeliveryCount: to.Ptr[int32](10),
	// 		MaxMessageSizeInKilobytes: to.Ptr[int64](10240),
	// 		MaxSizeInMegabytes: to.Ptr[int32](163840),
	// 		MessageCount: to.Ptr[int64](0),
	// 		RequiresDuplicateDetection: to.Ptr(false),
	// 		RequiresSession: to.Ptr(false),
	// 		SizeInBytes: to.Ptr[int64](0),
	// 		Status: to.Ptr(armservicebus.EntityStatusActive),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.227Z"); return t}()),
	// 	},
	// }
}
Output:

func (*QueuesClient) CreateOrUpdateAuthorizationRule

func (client *QueuesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SBAuthorizationRule, options *QueuesClientCreateOrUpdateAuthorizationRuleOptions) (QueuesClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates an authorization rule for a queue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • authorizationRuleName - The authorization rule name.
  • parameters - The shared access authorization rule.
  • options - QueuesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the QueuesClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewQueuesClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", armservicebus.SBAuthorizationRule{
		Properties: &armservicebus.SBAuthorizationRuleProperties{
			Rights: []*armservicebus.AccessRights{
				to.Ptr(armservicebus.AccessRightsListen),
				to.Ptr(armservicebus.AccessRightsSend)},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-AuthRules-5800"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*QueuesClient) Delete

func (client *QueuesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, options *QueuesClientDeleteOptions) (QueuesClientDeleteResponse, error)

Delete - Deletes a queue from the specified namespace in a resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • options - QueuesClientDeleteOptions contains the optional parameters for the QueuesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewQueuesClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-183", "sdk-Queues-8708", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*QueuesClient) DeleteAuthorizationRule

func (client *QueuesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, options *QueuesClientDeleteAuthorizationRuleOptions) (QueuesClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes a queue authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • authorizationRuleName - The authorization rule name.
  • options - QueuesClientDeleteAuthorizationRuleOptions contains the optional parameters for the QueuesClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewQueuesClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*QueuesClient) Get

func (client *QueuesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, options *QueuesClientGetOptions) (QueuesClientGetResponse, error)

Get - Returns a description for the specified queue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • options - QueuesClientGetOptions contains the optional parameters for the QueuesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewQueuesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-3174", "sdk-Queues-5647", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBQueue = armservicebus.SBQueue{
	// 	Name: to.Ptr("sdk-Queues-5647"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3174/queues/sdk-Queues-5647"),
	// 	Properties: &armservicebus.SBQueueProperties{
	// 		AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
	// 		AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:32.459Z"); return t}()),
	// 		DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"),
	// 		EnableExpress: to.Ptr(false),
	// 		EnablePartitioning: to.Ptr(true),
	// 		LockDuration: to.Ptr("PT1M"),
	// 		MaxDeliveryCount: to.Ptr[int32](10),
	// 		MaxMessageSizeInKilobytes: to.Ptr[int64](10240),
	// 		MaxSizeInMegabytes: to.Ptr[int32](163840),
	// 		MessageCount: to.Ptr[int64](0),
	// 		RequiresDuplicateDetection: to.Ptr(false),
	// 		RequiresSession: to.Ptr(false),
	// 		SizeInBytes: to.Ptr[int64](0),
	// 		Status: to.Ptr(armservicebus.EntityStatusActive),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.624Z"); return t}()),
	// 	},
	// }
}
Output:

func (*QueuesClient) GetAuthorizationRule

func (client *QueuesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, options *QueuesClientGetAuthorizationRuleOptions) (QueuesClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Gets an authorization rule for a queue by rule name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • authorizationRuleName - The authorization rule name.
  • options - QueuesClientGetAuthorizationRuleOptions contains the optional parameters for the QueuesClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewQueuesClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-AuthRules-5800"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*QueuesClient) ListKeys

func (client *QueuesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, options *QueuesClientListKeysOptions) (QueuesClientListKeysResponse, error)

ListKeys - Primary and secondary connection strings to the queue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • authorizationRuleName - The authorization rule name.
  • options - QueuesClientListKeysOptions contains the optional parameters for the QueuesClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewQueuesClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	KeyName: to.Ptr("sdk-AuthRules-5800"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*QueuesClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *QueuesClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, queueName string, options *QueuesClientListAuthorizationRulesOptions) *runtime.Pager[QueuesClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Gets all authorization rules for a queue.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • options - QueuesClientListAuthorizationRulesOptions contains the optional parameters for the QueuesClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewQueuesClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-7982", "sdk-Queues-2317", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{
		// 	Value: []*armservicebus.SBAuthorizationRule{
		// 		{
		// 			Name: to.Ptr("sdk-AuthRules-5800"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800"),
		// 			Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 				Rights: []*armservicebus.AccessRights{
		// 					to.Ptr(armservicebus.AccessRightsListen),
		// 					to.Ptr(armservicebus.AccessRightsSend)},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*QueuesClient) NewListByNamespacePager added in v0.5.0

func (client *QueuesClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *QueuesClientListByNamespaceOptions) *runtime.Pager[QueuesClientListByNamespaceResponse]

NewListByNamespacePager - Gets the queues within a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - QueuesClientListByNamespaceOptions contains the optional parameters for the QueuesClient.NewListByNamespacePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueListByNameSpace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewQueuesClient().NewListByNamespacePager("ArunMonocle", "sdk-Namespace-3174", &armservicebus.QueuesClientListByNamespaceOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBQueueListResult = armservicebus.SBQueueListResult{
		// 	Value: []*armservicebus.SBQueue{
		// 		{
		// 			Name: to.Ptr("sdk-queues-5647"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3174/queues/sdk-queues-5647"),
		// 			Properties: &armservicebus.SBQueueProperties{
		// 				AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
		// 				AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:32.459Z"); return t}()),
		// 				DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
		// 				DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"),
		// 				EnableExpress: to.Ptr(false),
		// 				EnablePartitioning: to.Ptr(true),
		// 				LockDuration: to.Ptr("PT1M"),
		// 				MaxDeliveryCount: to.Ptr[int32](10),
		// 				MaxMessageSizeInKilobytes: to.Ptr[int64](10240),
		// 				MaxSizeInMegabytes: to.Ptr[int32](163840),
		// 				MessageCount: to.Ptr[int64](0),
		// 				RequiresDuplicateDetection: to.Ptr(false),
		// 				RequiresSession: to.Ptr(false),
		// 				SizeInBytes: to.Ptr[int64](0),
		// 				Status: to.Ptr(armservicebus.EntityStatusActive),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.624Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*QueuesClient) RegenerateKeys

func (client *QueuesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *QueuesClientRegenerateKeysOptions) (QueuesClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the primary or secondary connection strings to the queue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • queueName - The queue name.
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate the authorization rule.
  • options - QueuesClientRegenerateKeysOptions contains the optional parameters for the QueuesClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewQueuesClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", armservicebus.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	KeyName: to.Ptr("sdk-AuthRules-5800"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

type QueuesClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type QueuesClientCreateOrUpdateAuthorizationRuleOptions struct {
}

QueuesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the QueuesClient.CreateOrUpdateAuthorizationRule method.

type QueuesClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type QueuesClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

QueuesClientCreateOrUpdateAuthorizationRuleResponse contains the response from method QueuesClient.CreateOrUpdateAuthorizationRule.

type QueuesClientCreateOrUpdateOptions added in v0.3.0

type QueuesClientCreateOrUpdateOptions struct {
}

QueuesClientCreateOrUpdateOptions contains the optional parameters for the QueuesClient.CreateOrUpdate method.

type QueuesClientCreateOrUpdateResponse added in v0.3.0

type QueuesClientCreateOrUpdateResponse struct {
	// Description of queue Resource.
	SBQueue
}

QueuesClientCreateOrUpdateResponse contains the response from method QueuesClient.CreateOrUpdate.

type QueuesClientDeleteAuthorizationRuleOptions added in v0.3.0

type QueuesClientDeleteAuthorizationRuleOptions struct {
}

QueuesClientDeleteAuthorizationRuleOptions contains the optional parameters for the QueuesClient.DeleteAuthorizationRule method.

type QueuesClientDeleteAuthorizationRuleResponse added in v0.3.0

type QueuesClientDeleteAuthorizationRuleResponse struct {
}

QueuesClientDeleteAuthorizationRuleResponse contains the response from method QueuesClient.DeleteAuthorizationRule.

type QueuesClientDeleteOptions added in v0.3.0

type QueuesClientDeleteOptions struct {
}

QueuesClientDeleteOptions contains the optional parameters for the QueuesClient.Delete method.

type QueuesClientDeleteResponse added in v0.3.0

type QueuesClientDeleteResponse struct {
}

QueuesClientDeleteResponse contains the response from method QueuesClient.Delete.

type QueuesClientGetAuthorizationRuleOptions added in v0.3.0

type QueuesClientGetAuthorizationRuleOptions struct {
}

QueuesClientGetAuthorizationRuleOptions contains the optional parameters for the QueuesClient.GetAuthorizationRule method.

type QueuesClientGetAuthorizationRuleResponse added in v0.3.0

type QueuesClientGetAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

QueuesClientGetAuthorizationRuleResponse contains the response from method QueuesClient.GetAuthorizationRule.

type QueuesClientGetOptions added in v0.3.0

type QueuesClientGetOptions struct {
}

QueuesClientGetOptions contains the optional parameters for the QueuesClient.Get method.

type QueuesClientGetResponse added in v0.3.0

type QueuesClientGetResponse struct {
	// Description of queue Resource.
	SBQueue
}

QueuesClientGetResponse contains the response from method QueuesClient.Get.

type QueuesClientListAuthorizationRulesOptions added in v0.3.0

type QueuesClientListAuthorizationRulesOptions struct {
}

QueuesClientListAuthorizationRulesOptions contains the optional parameters for the QueuesClient.NewListAuthorizationRulesPager method.

type QueuesClientListAuthorizationRulesResponse added in v0.3.0

type QueuesClientListAuthorizationRulesResponse struct {
	// The response to the List Namespace operation.
	SBAuthorizationRuleListResult
}

QueuesClientListAuthorizationRulesResponse contains the response from method QueuesClient.NewListAuthorizationRulesPager.

type QueuesClientListByNamespaceOptions added in v0.3.0

type QueuesClientListByNamespaceOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

QueuesClientListByNamespaceOptions contains the optional parameters for the QueuesClient.NewListByNamespacePager method.

type QueuesClientListByNamespaceResponse added in v0.3.0

type QueuesClientListByNamespaceResponse struct {
	// The response to the List Queues operation.
	SBQueueListResult
}

QueuesClientListByNamespaceResponse contains the response from method QueuesClient.NewListByNamespacePager.

type QueuesClientListKeysOptions added in v0.3.0

type QueuesClientListKeysOptions struct {
}

QueuesClientListKeysOptions contains the optional parameters for the QueuesClient.ListKeys method.

type QueuesClientListKeysResponse added in v0.3.0

type QueuesClientListKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

QueuesClientListKeysResponse contains the response from method QueuesClient.ListKeys.

type QueuesClientRegenerateKeysOptions added in v0.3.0

type QueuesClientRegenerateKeysOptions struct {
}

QueuesClientRegenerateKeysOptions contains the optional parameters for the QueuesClient.RegenerateKeys method.

type QueuesClientRegenerateKeysResponse added in v0.3.0

type QueuesClientRegenerateKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

QueuesClientRegenerateKeysResponse contains the response from method QueuesClient.RegenerateKeys.

type RegenerateAccessKeyParameters

type RegenerateAccessKeyParameters struct {
	// REQUIRED; The access key to regenerate.
	KeyType *KeyType

	// Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType
	Key *string
}

RegenerateAccessKeyParameters - Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.

func (RegenerateAccessKeyParameters) MarshalJSON added in v1.1.0

func (r RegenerateAccessKeyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegenerateAccessKeyParameters.

func (*RegenerateAccessKeyParameters) UnmarshalJSON added in v1.1.0

func (r *RegenerateAccessKeyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateAccessKeyParameters.

type Resource

type Resource struct {
	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

Resource - The Resource definition for other than namespace.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceNamespacePatch

type ResourceNamespacePatch struct {
	// Resource location
	Location *string

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

ResourceNamespacePatch - The Resource definition.

func (ResourceNamespacePatch) MarshalJSON

func (r ResourceNamespacePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceNamespacePatch.

func (*ResourceNamespacePatch) UnmarshalJSON added in v1.1.0

func (r *ResourceNamespacePatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNamespacePatch.

type RoleDisasterRecovery

type RoleDisasterRecovery string

RoleDisasterRecovery - role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'

const (
	RoleDisasterRecoveryPrimary               RoleDisasterRecovery = "Primary"
	RoleDisasterRecoveryPrimaryNotReplicating RoleDisasterRecovery = "PrimaryNotReplicating"
	RoleDisasterRecoverySecondary             RoleDisasterRecovery = "Secondary"
)

func PossibleRoleDisasterRecoveryValues

func PossibleRoleDisasterRecoveryValues() []RoleDisasterRecovery

PossibleRoleDisasterRecoveryValues returns the possible values for the RoleDisasterRecovery const type.

type Rule

type Rule struct {
	// Properties of Rule resource
	Properties *Ruleproperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

Rule - Description of Rule Resource.

func (Rule) MarshalJSON

func (r Rule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Rule.

func (*Rule) UnmarshalJSON added in v1.1.0

func (r *Rule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Rule.

type RuleListResult

type RuleListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of rules
	NextLink *string

	// Result of the List Rules operation.
	Value []*Rule
}

RuleListResult - The response of the List rule operation.

func (RuleListResult) MarshalJSON

func (r RuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleListResult.

func (*RuleListResult) UnmarshalJSON added in v1.1.0

func (r *RuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleListResult.

type Ruleproperties

type Ruleproperties struct {
	// Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter
	// expression.
	Action *Action

	// Properties of correlationFilter
	CorrelationFilter *CorrelationFilter

	// Filter type that is evaluated against a BrokeredMessage.
	FilterType *FilterType

	// Properties of sqlFilter
	SQLFilter *SQLFilter
}

Ruleproperties - Description of Rule Resource.

func (Ruleproperties) MarshalJSON added in v1.1.0

func (r Ruleproperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Ruleproperties.

func (*Ruleproperties) UnmarshalJSON added in v1.1.0

func (r *Ruleproperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Ruleproperties.

type RulesClient

type RulesClient struct {
	// contains filtered or unexported fields
}

RulesClient contains the methods for the Rules group. Don't use this type directly, use NewRulesClient() instead.

func NewRulesClient

func NewRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RulesClient, error)

NewRulesClient creates a new instance of RulesClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RulesClient) CreateOrUpdate

func (client *RulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string, parameters Rule, options *RulesClientCreateOrUpdateOptions) (RulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new rule and updates an existing rule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • ruleName - The rule name.
  • parameters - Parameters supplied to create a rule.
  • options - RulesClientCreateOrUpdateOptions contains the optional parameters for the RulesClient.CreateOrUpdate method.
Example (RulesCreateCorrelationFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Rules/RuleCreate_CorrelationFilter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRulesClient().CreateOrUpdate(ctx, "resourceGroupName", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", armservicebus.Rule{
		Properties: &armservicebus.Ruleproperties{
			CorrelationFilter: &armservicebus.CorrelationFilter{
				Properties: map[string]*string{
					"topicHint": to.Ptr("Crop"),
				},
			},
			FilterType: to.Ptr(armservicebus.FilterTypeCorrelationFilter),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Rule = armservicebus.Rule{
	// 	Name: to.Ptr("sdk-Rules-6571"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"),
	// 	Properties: &armservicebus.Ruleproperties{
	// 		Action: &armservicebus.Action{
	// 		},
	// 		CorrelationFilter: &armservicebus.CorrelationFilter{
	// 			Properties: map[string]*string{
	// 				"queueHint": to.Ptr("Crop"),
	// 			},
	// 		},
	// 		FilterType: to.Ptr(armservicebus.FilterTypeCorrelationFilter),
	// 	},
	// }
}
Output:

Example (RulesCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Rules/RuleCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRulesClient().CreateOrUpdate(ctx, "resourceGroupName", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", armservicebus.Rule{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Rule = armservicebus.Rule{
	// 	Name: to.Ptr("sdk-Rules-6571"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"),
	// 	Properties: &armservicebus.Ruleproperties{
	// 		Action: &armservicebus.Action{
	// 		},
	// 		FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter),
	// 		SQLFilter: &armservicebus.SQLFilter{
	// 			CompatibilityLevel: to.Ptr[int32](20),
	// 			SQLExpression: to.Ptr("1=1"),
	// 		},
	// 	},
	// }
}
Output:

Example (RulesCreateSqlFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Rules/RuleCreate_SqlFilter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRulesClient().CreateOrUpdate(ctx, "resourceGroupName", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", armservicebus.Rule{
		Properties: &armservicebus.Ruleproperties{
			FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter),
			SQLFilter: &armservicebus.SQLFilter{
				SQLExpression: to.Ptr("myproperty=test"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Rule = armservicebus.Rule{
	// 	Name: to.Ptr("sdk-Rules-6571"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"),
	// 	Properties: &armservicebus.Ruleproperties{
	// 		Action: &armservicebus.Action{
	// 		},
	// 		FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter),
	// 		SQLFilter: &armservicebus.SQLFilter{
	// 			CompatibilityLevel: to.Ptr[int32](20),
	// 			SQLExpression: to.Ptr("myproperty=test"),
	// 		},
	// 	},
	// }
}
Output:

func (*RulesClient) Delete

func (client *RulesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string, options *RulesClientDeleteOptions) (RulesClientDeleteResponse, error)

Delete - Deletes an existing rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • ruleName - The rule name.
  • options - RulesClientDeleteOptions contains the optional parameters for the RulesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Rules/RuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewRulesClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*RulesClient) Get

func (client *RulesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string, options *RulesClientGetOptions) (RulesClientGetResponse, error)

Get - Retrieves the description for the specified rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • ruleName - The rule name.
  • options - RulesClientGetOptions contains the optional parameters for the RulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Rules/RuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRulesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Rule = armservicebus.Rule{
	// 	Name: to.Ptr("sdk-Rules-6571"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"),
	// 	Properties: &armservicebus.Ruleproperties{
	// 		Action: &armservicebus.Action{
	// 		},
	// 		FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter),
	// 		SQLFilter: &armservicebus.SQLFilter{
	// 			CompatibilityLevel: to.Ptr[int32](20),
	// 			SQLExpression: to.Ptr("1=1"),
	// 		},
	// 	},
	// }
}
Output:

func (*RulesClient) NewListBySubscriptionsPager added in v0.5.0

func (client *RulesClient) NewListBySubscriptionsPager(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, options *RulesClientListBySubscriptionsOptions) *runtime.Pager[RulesClientListBySubscriptionsResponse]

NewListBySubscriptionsPager - List all the rules within given topic-subscription

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • options - RulesClientListBySubscriptionsOptions contains the optional parameters for the RulesClient.NewListBySubscriptionsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Rules/RuleListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRulesClient().NewListBySubscriptionsPager("ArunMonocle", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", &armservicebus.RulesClientListBySubscriptionsOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RuleListResult = armservicebus.RuleListResult{
		// 	Value: []*armservicebus.Rule{
		// 		{
		// 			Name: to.Ptr("sdk-Rules-6571"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"),
		// 			Properties: &armservicebus.Ruleproperties{
		// 				Action: &armservicebus.Action{
		// 				},
		// 				FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter),
		// 				SQLFilter: &armservicebus.SQLFilter{
		// 					CompatibilityLevel: to.Ptr[int32](20),
		// 					SQLExpression: to.Ptr("1=1"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type RulesClientCreateOrUpdateOptions added in v0.3.0

type RulesClientCreateOrUpdateOptions struct {
}

RulesClientCreateOrUpdateOptions contains the optional parameters for the RulesClient.CreateOrUpdate method.

type RulesClientCreateOrUpdateResponse added in v0.3.0

type RulesClientCreateOrUpdateResponse struct {
	// Description of Rule Resource.
	Rule
}

RulesClientCreateOrUpdateResponse contains the response from method RulesClient.CreateOrUpdate.

type RulesClientDeleteOptions added in v0.3.0

type RulesClientDeleteOptions struct {
}

RulesClientDeleteOptions contains the optional parameters for the RulesClient.Delete method.

type RulesClientDeleteResponse added in v0.3.0

type RulesClientDeleteResponse struct {
}

RulesClientDeleteResponse contains the response from method RulesClient.Delete.

type RulesClientGetOptions added in v0.3.0

type RulesClientGetOptions struct {
}

RulesClientGetOptions contains the optional parameters for the RulesClient.Get method.

type RulesClientGetResponse added in v0.3.0

type RulesClientGetResponse struct {
	// Description of Rule Resource.
	Rule
}

RulesClientGetResponse contains the response from method RulesClient.Get.

type RulesClientListBySubscriptionsOptions added in v0.3.0

type RulesClientListBySubscriptionsOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

RulesClientListBySubscriptionsOptions contains the optional parameters for the RulesClient.NewListBySubscriptionsPager method.

type RulesClientListBySubscriptionsResponse added in v0.3.0

type RulesClientListBySubscriptionsResponse struct {
	// The response of the List rule operation.
	RuleListResult
}

RulesClientListBySubscriptionsResponse contains the response from method RulesClient.NewListBySubscriptionsPager.

type SBAuthorizationRule

type SBAuthorizationRule struct {
	// AuthorizationRule properties.
	Properties *SBAuthorizationRuleProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

SBAuthorizationRule - Description of a namespace authorization rule.

func (SBAuthorizationRule) MarshalJSON

func (s SBAuthorizationRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBAuthorizationRule.

func (*SBAuthorizationRule) UnmarshalJSON added in v1.1.0

func (s *SBAuthorizationRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBAuthorizationRule.

type SBAuthorizationRuleListResult

type SBAuthorizationRuleListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of Authorization Rules.
	NextLink *string

	// Result of the List Authorization Rules operation.
	Value []*SBAuthorizationRule
}

SBAuthorizationRuleListResult - The response to the List Namespace operation.

func (SBAuthorizationRuleListResult) MarshalJSON

func (s SBAuthorizationRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBAuthorizationRuleListResult.

func (*SBAuthorizationRuleListResult) UnmarshalJSON added in v1.1.0

func (s *SBAuthorizationRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBAuthorizationRuleListResult.

type SBAuthorizationRuleProperties

type SBAuthorizationRuleProperties struct {
	// REQUIRED; The rights associated with the rule.
	Rights []*AccessRights
}

SBAuthorizationRuleProperties - AuthorizationRule properties.

func (SBAuthorizationRuleProperties) MarshalJSON

func (s SBAuthorizationRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBAuthorizationRuleProperties.

func (*SBAuthorizationRuleProperties) UnmarshalJSON added in v1.1.0

func (s *SBAuthorizationRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBAuthorizationRuleProperties.

type SBClientAffineProperties

type SBClientAffineProperties struct {
	// Indicates the Client ID of the application that created the client-affine subscription.
	ClientID *string

	// For client-affine subscriptions, this value indicates whether the subscription is durable or not.
	IsDurable *bool

	// For client-affine subscriptions, this value indicates whether the subscription is shared or not.
	IsShared *bool
}

SBClientAffineProperties - Properties specific to client affine subscriptions.

func (SBClientAffineProperties) MarshalJSON added in v1.1.0

func (s SBClientAffineProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBClientAffineProperties.

func (*SBClientAffineProperties) UnmarshalJSON added in v1.1.0

func (s *SBClientAffineProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBClientAffineProperties.

type SBNamespace

type SBNamespace struct {
	// REQUIRED; The Geo-location where the resource lives
	Location *string

	// Properties of BYOK Identity description
	Identity *Identity

	// Properties of the namespace.
	Properties *SBNamespaceProperties

	// Properties of SKU
	SKU *SBSKU

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; Resource type
	Type *string
}

SBNamespace - Description of a namespace resource.

func (SBNamespace) MarshalJSON

func (s SBNamespace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBNamespace.

func (*SBNamespace) UnmarshalJSON added in v1.1.0

func (s *SBNamespace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBNamespace.

type SBNamespaceListResult

type SBNamespaceListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of Namespaces.
	NextLink *string

	// Result of the List Namespace operation.
	Value []*SBNamespace
}

SBNamespaceListResult - The response of the List Namespace operation.

func (SBNamespaceListResult) MarshalJSON

func (s SBNamespaceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBNamespaceListResult.

func (*SBNamespaceListResult) UnmarshalJSON added in v1.1.0

func (s *SBNamespaceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBNamespaceListResult.

type SBNamespaceProperties

type SBNamespaceProperties struct {
	// Alternate name for namespace
	AlternateName *string

	// This property disables SAS authentication for the Service Bus namespace.
	DisableLocalAuth *bool

	// Properties of BYOK Encryption description
	Encryption *Encryption

	// List of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones.
	ZoneRedundant *bool

	// READ-ONLY; The time the namespace was created
	CreatedAt *time.Time

	// READ-ONLY; Identifier for Azure Insights metrics
	MetricID *string

	// READ-ONLY; Provisioning state of the namespace.
	ProvisioningState *string

	// READ-ONLY; Endpoint you can use to perform Service Bus operations.
	ServiceBusEndpoint *string

	// READ-ONLY; Status of the namespace.
	Status *string

	// READ-ONLY; The time the namespace was updated.
	UpdatedAt *time.Time
}

SBNamespaceProperties - Properties of the namespace.

func (SBNamespaceProperties) MarshalJSON

func (s SBNamespaceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBNamespaceProperties.

func (*SBNamespaceProperties) UnmarshalJSON

func (s *SBNamespaceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBNamespaceProperties.

type SBNamespaceUpdateParameters

type SBNamespaceUpdateParameters struct {
	// Properties of BYOK Identity description
	Identity *Identity

	// Resource location
	Location *string

	// Properties of the namespace.
	Properties *SBNamespaceUpdateProperties

	// Properties of SKU
	SKU *SBSKU

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

SBNamespaceUpdateParameters - Description of a namespace resource.

func (SBNamespaceUpdateParameters) MarshalJSON

func (s SBNamespaceUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBNamespaceUpdateParameters.

func (*SBNamespaceUpdateParameters) UnmarshalJSON added in v1.1.0

func (s *SBNamespaceUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBNamespaceUpdateParameters.

type SBNamespaceUpdateProperties added in v0.3.0

type SBNamespaceUpdateProperties struct {
	// Alternate name for namespace
	AlternateName *string

	// This property disables SAS authentication for the Service Bus namespace.
	DisableLocalAuth *bool

	// Properties of BYOK Encryption description
	Encryption *Encryption

	// List of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; The time the namespace was created
	CreatedAt *time.Time

	// READ-ONLY; Identifier for Azure Insights metrics
	MetricID *string

	// READ-ONLY; Provisioning state of the namespace.
	ProvisioningState *string

	// READ-ONLY; Endpoint you can use to perform Service Bus operations.
	ServiceBusEndpoint *string

	// READ-ONLY; Status of the namespace.
	Status *string

	// READ-ONLY; The time the namespace was updated.
	UpdatedAt *time.Time
}

SBNamespaceUpdateProperties - Properties of the namespace.

func (SBNamespaceUpdateProperties) MarshalJSON added in v0.3.0

func (s SBNamespaceUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBNamespaceUpdateProperties.

func (*SBNamespaceUpdateProperties) UnmarshalJSON added in v0.3.0

func (s *SBNamespaceUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBNamespaceUpdateProperties.

type SBQueue

type SBQueue struct {
	// Queue Properties
	Properties *SBQueueProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

SBQueue - Description of queue Resource.

func (SBQueue) MarshalJSON

func (s SBQueue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBQueue.

func (*SBQueue) UnmarshalJSON added in v1.1.0

func (s *SBQueue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBQueue.

type SBQueueListResult

type SBQueueListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of queues.
	NextLink *string

	// Result of the List Queues operation.
	Value []*SBQueue
}

SBQueueListResult - The response to the List Queues operation.

func (SBQueueListResult) MarshalJSON

func (s SBQueueListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBQueueListResult.

func (*SBQueueListResult) UnmarshalJSON added in v1.1.0

func (s *SBQueueListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBQueueListResult.

type SBQueueProperties

type SBQueueProperties struct {
	// ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.
	AutoDeleteOnIdle *string

	// A value that indicates whether this queue has dead letter support when a message expires.
	DeadLetteringOnMessageExpiration *bool

	// ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when
	// the message is sent to Service Bus. This is the default value used when
	// TimeToLive is not set on a message itself.
	DefaultMessageTimeToLive *string

	// ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
	DuplicateDetectionHistoryTimeWindow *string

	// Value that indicates whether server-side batched operations are enabled.
	EnableBatchedOperations *bool

	// A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before
	// writing it to persistent storage.
	EnableExpress *bool

	// A value that indicates whether the queue is to be partitioned across multiple message brokers.
	EnablePartitioning *bool

	// Queue/Topic name to forward the Dead Letter message
	ForwardDeadLetteredMessagesTo *string

	// Queue/Topic name to forward the messages
	ForwardTo *string

	// ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.
	// The maximum value for LockDuration is 5 minutes; the default value is 1 minute.
	LockDuration *string

	// The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.
	MaxDeliveryCount *int32

	// Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today
	// and default is 1024.
	MaxMessageSizeInKilobytes *int64

	// The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.
	MaxSizeInMegabytes *int32

	// A value indicating if this queue requires duplicate detection.
	RequiresDuplicateDetection *bool

	// A value that indicates whether the queue supports the concept of sessions.
	RequiresSession *bool

	// Enumerates the possible values for the status of a messaging entity.
	Status *EntityStatus

	// READ-ONLY; Last time a message was sent, or the last time there was a receive request to this queue.
	AccessedAt *time.Time

	// READ-ONLY; Message Count Details.
	CountDetails *MessageCountDetails

	// READ-ONLY; The exact time the message was created.
	CreatedAt *time.Time

	// READ-ONLY; The number of messages in the queue.
	MessageCount *int64

	// READ-ONLY; The size of the queue, in bytes.
	SizeInBytes *int64

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time
}

SBQueueProperties - The Queue Properties definition.

func (SBQueueProperties) MarshalJSON

func (s SBQueueProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBQueueProperties.

func (*SBQueueProperties) UnmarshalJSON

func (s *SBQueueProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBQueueProperties.

type SBSKU

type SBSKU struct {
	// REQUIRED; Name of this SKU.
	Name *SKUName

	// The specified messaging units for the tier. For Premium tier, capacity are 1,2 and 4.
	Capacity *int32

	// The billing tier of this particular SKU.
	Tier *SKUTier
}

SBSKU - SKU of the namespace.

func (SBSKU) MarshalJSON added in v1.1.0

func (s SBSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBSKU.

func (*SBSKU) UnmarshalJSON added in v1.1.0

func (s *SBSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBSKU.

type SBSubscription

type SBSubscription struct {
	// Properties of subscriptions resource.
	Properties *SBSubscriptionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

SBSubscription - Description of subscription resource.

func (SBSubscription) MarshalJSON

func (s SBSubscription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBSubscription.

func (*SBSubscription) UnmarshalJSON added in v1.1.0

func (s *SBSubscription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBSubscription.

type SBSubscriptionListResult

type SBSubscriptionListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of subscriptions.
	NextLink *string

	// Result of the List Subscriptions operation.
	Value []*SBSubscription
}

SBSubscriptionListResult - The response to the List Subscriptions operation.

func (SBSubscriptionListResult) MarshalJSON

func (s SBSubscriptionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBSubscriptionListResult.

func (*SBSubscriptionListResult) UnmarshalJSON added in v1.1.0

func (s *SBSubscriptionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBSubscriptionListResult.

type SBSubscriptionProperties

type SBSubscriptionProperties struct {
	// ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
	AutoDeleteOnIdle *string

	// Properties specific to client affine subscriptions.
	ClientAffineProperties *SBClientAffineProperties

	// Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
	DeadLetteringOnFilterEvaluationExceptions *bool

	// Value that indicates whether a subscription has dead letter support when a message expires.
	DeadLetteringOnMessageExpiration *bool

	// ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when
	// the message is sent to Service Bus. This is the default value used when
	// TimeToLive is not set on a message itself.
	DefaultMessageTimeToLive *string

	// ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
	DuplicateDetectionHistoryTimeWindow *string

	// Value that indicates whether server-side batched operations are enabled.
	EnableBatchedOperations *bool

	// Queue/Topic name to forward the Dead Letter message
	ForwardDeadLetteredMessagesTo *string

	// Queue/Topic name to forward the messages
	ForwardTo *string

	// Value that indicates whether the subscription has an affinity to the client id.
	IsClientAffine *bool

	// ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
	LockDuration *string

	// Number of maximum deliveries.
	MaxDeliveryCount *int32

	// Value indicating if a subscription supports the concept of sessions.
	RequiresSession *bool

	// Enumerates the possible values for the status of a messaging entity.
	Status *EntityStatus

	// READ-ONLY; Last time there was a receive request to this subscription.
	AccessedAt *time.Time

	// READ-ONLY; Message count details
	CountDetails *MessageCountDetails

	// READ-ONLY; Exact time the message was created.
	CreatedAt *time.Time

	// READ-ONLY; Number of messages.
	MessageCount *int64

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time
}

SBSubscriptionProperties - Description of Subscription Resource.

func (SBSubscriptionProperties) MarshalJSON

func (s SBSubscriptionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBSubscriptionProperties.

func (*SBSubscriptionProperties) UnmarshalJSON

func (s *SBSubscriptionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBSubscriptionProperties.

type SBTopic

type SBTopic struct {
	// Properties of topic resource.
	Properties *SBTopicProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

SBTopic - Description of topic resource.

func (SBTopic) MarshalJSON

func (s SBTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBTopic.

func (*SBTopic) UnmarshalJSON added in v1.1.0

func (s *SBTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBTopic.

type SBTopicListResult

type SBTopicListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of topics.
	NextLink *string

	// Result of the List Topics operation.
	Value []*SBTopic
}

SBTopicListResult - The response to the List Topics operation.

func (SBTopicListResult) MarshalJSON

func (s SBTopicListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBTopicListResult.

func (*SBTopicListResult) UnmarshalJSON added in v1.1.0

func (s *SBTopicListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBTopicListResult.

type SBTopicProperties

type SBTopicProperties struct {
	// ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
	AutoDeleteOnIdle *string

	// ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when
	// the message is sent to Service Bus. This is the default value used when
	// TimeToLive is not set on a message itself.
	DefaultMessageTimeToLive *string

	// ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
	DuplicateDetectionHistoryTimeWindow *string

	// Value that indicates whether server-side batched operations are enabled.
	EnableBatchedOperations *bool

	// Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before
	// writing it to persistent storage.
	EnableExpress *bool

	// Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.
	EnablePartitioning *bool

	// Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today
	// and default is 1024.
	MaxMessageSizeInKilobytes *int64

	// Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.
	MaxSizeInMegabytes *int32

	// Value indicating if this topic requires duplicate detection.
	RequiresDuplicateDetection *bool

	// Enumerates the possible values for the status of a messaging entity.
	Status *EntityStatus

	// Value that indicates whether the topic supports ordering.
	SupportOrdering *bool

	// READ-ONLY; Last time the message was sent, or a request was received, for this topic.
	AccessedAt *time.Time

	// READ-ONLY; Message count details
	CountDetails *MessageCountDetails

	// READ-ONLY; Exact time the message was created.
	CreatedAt *time.Time

	// READ-ONLY; Size of the topic, in bytes.
	SizeInBytes *int64

	// READ-ONLY; Number of subscriptions.
	SubscriptionCount *int32

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time
}

SBTopicProperties - The Topic Properties definition.

func (SBTopicProperties) MarshalJSON

func (s SBTopicProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SBTopicProperties.

func (*SBTopicProperties) UnmarshalJSON

func (s *SBTopicProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SBTopicProperties.

type SKUName

type SKUName string

SKUName - Name of this SKU.

const (
	SKUNameBasic    SKUName = "Basic"
	SKUNamePremium  SKUName = "Premium"
	SKUNameStandard SKUName = "Standard"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type SKUTier

type SKUTier string

SKUTier - The billing tier of this particular SKU.

const (
	SKUTierBasic    SKUTier = "Basic"
	SKUTierPremium  SKUTier = "Premium"
	SKUTierStandard SKUTier = "Standard"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type SQLFilter

type SQLFilter struct {
	// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
	CompatibilityLevel *int32

	// Value that indicates whether the rule action requires preprocessing.
	RequiresPreprocessing *bool

	// The SQL expression. e.g. MyProperty='ABC'
	SQLExpression *string
}

SQLFilter - Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline.

func (SQLFilter) MarshalJSON added in v1.1.0

func (s SQLFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SQLFilter.

func (*SQLFilter) UnmarshalJSON added in v1.1.0

func (s *SQLFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SQLFilter.

type SQLRuleAction

type SQLRuleAction struct {
	// This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
	CompatibilityLevel *int32

	// Value that indicates whether the rule action requires preprocessing.
	RequiresPreprocessing *bool

	// SQL expression. e.g. MyProperty='ABC'
	SQLExpression *string
}

SQLRuleAction - Represents set of actions written in SQL language-based syntax that is performed against a ServiceBus.Messaging.BrokeredMessage

func (SQLRuleAction) MarshalJSON added in v1.1.0

func (s SQLRuleAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SQLRuleAction.

func (*SQLRuleAction) UnmarshalJSON added in v1.1.0

func (s *SQLRuleAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SQLRuleAction.

type Subnet

type Subnet struct {
	// REQUIRED; Resource ID of Virtual Network Subnet
	ID *string
}

Subnet - Properties supplied for Subnet

func (Subnet) MarshalJSON added in v1.1.0

func (s Subnet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Subnet.

func (*Subnet) UnmarshalJSON added in v1.1.0

func (s *Subnet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Subnet.

type SubscriptionsClient

type SubscriptionsClient struct {
	// contains filtered or unexported fields
}

SubscriptionsClient contains the methods for the Subscriptions group. Don't use this type directly, use NewSubscriptionsClient() instead.

func NewSubscriptionsClient

func NewSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionsClient, error)

NewSubscriptionsClient creates a new instance of SubscriptionsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SubscriptionsClient) CreateOrUpdate

func (client *SubscriptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, parameters SBSubscription, options *SubscriptionsClientCreateOrUpdateOptions) (SubscriptionsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a topic subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • parameters - Parameters supplied to create a subscription resource.
  • options - SubscriptionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Subscriptions/SBSubscriptionCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSubscriptionsClient().CreateOrUpdate(ctx, "ResourceGroup", "sdk-Namespace-1349", "sdk-Topics-8740", "sdk-Subscriptions-2178", armservicebus.SBSubscription{
		Properties: &armservicebus.SBSubscriptionProperties{
			EnableBatchedOperations: to.Ptr(true),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBSubscription = armservicebus.SBSubscription{
	// 	Name: to.Ptr("sdk-Subscriptions-2178"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions"),
	// 	ID: to.Ptr("/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178"),
	// 	Properties: &armservicebus.SBSubscriptionProperties{
	// 		AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
	// 		AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		CountDetails: &armservicebus.MessageCountDetails{
	// 			ActiveMessageCount: to.Ptr[int64](0),
	// 			DeadLetterMessageCount: to.Ptr[int64](0),
	// 			ScheduledMessageCount: to.Ptr[int64](0),
	// 			TransferDeadLetterMessageCount: to.Ptr[int64](0),
	// 			TransferMessageCount: to.Ptr[int64](0),
	// 		},
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
	// 		DeadLetteringOnFilterEvaluationExceptions: to.Ptr(true),
	// 		DeadLetteringOnMessageExpiration: to.Ptr(true),
	// 		DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		EnableBatchedOperations: to.Ptr(true),
	// 		ForwardDeadLetteredMessagesTo: to.Ptr("sdk-Topics-3065"),
	// 		ForwardTo: to.Ptr("sdk-Topics-3065"),
	// 		LockDuration: to.Ptr("PT1M"),
	// 		MaxDeliveryCount: to.Ptr[int32](10),
	// 		MessageCount: to.Ptr[int64](0),
	// 		RequiresSession: to.Ptr(false),
	// 		Status: to.Ptr(armservicebus.EntityStatusActive),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
	// 	},
	// }
}
Output:

func (*SubscriptionsClient) Delete

func (client *SubscriptionsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, options *SubscriptionsClientDeleteOptions) (SubscriptionsClientDeleteResponse, error)

Delete - Deletes a subscription from the specified topic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • options - SubscriptionsClientDeleteOptions contains the optional parameters for the SubscriptionsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Subscriptions/SBSubscriptionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSubscriptionsClient().Delete(ctx, "ResourceGroup", "sdk-Namespace-5882", "sdk-Topics-1804", "sdk-Subscriptions-3670", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*SubscriptionsClient) Get

func (client *SubscriptionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, options *SubscriptionsClientGetOptions) (SubscriptionsClientGetResponse, error)

Get - Returns a subscription description for the specified topic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • subscriptionName - The subscription name.
  • options - SubscriptionsClientGetOptions contains the optional parameters for the SubscriptionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Subscriptions/SBSubscriptionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSubscriptionsClient().Get(ctx, "ResourceGroup", "sdk-Namespace-1349", "sdk-Topics-8740", "sdk-Subscriptions-2178", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBSubscription = armservicebus.SBSubscription{
	// 	Name: to.Ptr("sdk-Subscriptions-2178"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions"),
	// 	ID: to.Ptr("/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178"),
	// 	Properties: &armservicebus.SBSubscriptionProperties{
	// 		AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
	// 		AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		CountDetails: &armservicebus.MessageCountDetails{
	// 			ActiveMessageCount: to.Ptr[int64](0),
	// 			DeadLetterMessageCount: to.Ptr[int64](0),
	// 			ScheduledMessageCount: to.Ptr[int64](0),
	// 			TransferDeadLetterMessageCount: to.Ptr[int64](0),
	// 			TransferMessageCount: to.Ptr[int64](0),
	// 		},
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
	// 		DeadLetteringOnFilterEvaluationExceptions: to.Ptr(true),
	// 		DeadLetteringOnMessageExpiration: to.Ptr(true),
	// 		DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		EnableBatchedOperations: to.Ptr(true),
	// 		ForwardDeadLetteredMessagesTo: to.Ptr("sdk-Topics-3065"),
	// 		ForwardTo: to.Ptr("sdk-Topics-3065"),
	// 		LockDuration: to.Ptr("PT1M"),
	// 		MaxDeliveryCount: to.Ptr[int32](10),
	// 		MessageCount: to.Ptr[int64](0),
	// 		RequiresSession: to.Ptr(false),
	// 		Status: to.Ptr(armservicebus.EntityStatusActive),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
	// 	},
	// }
}
Output:

func (*SubscriptionsClient) NewListByTopicPager added in v0.5.0

func (client *SubscriptionsClient) NewListByTopicPager(resourceGroupName string, namespaceName string, topicName string, options *SubscriptionsClientListByTopicOptions) *runtime.Pager[SubscriptionsClientListByTopicResponse]

NewListByTopicPager - List all the subscriptions under a specified topic.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • options - SubscriptionsClientListByTopicOptions contains the optional parameters for the SubscriptionsClient.NewListByTopicPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Subscriptions/SBSubscriptionListByTopic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSubscriptionsClient().NewListByTopicPager("ResourceGroup", "sdk-Namespace-1349", "sdk-Topics-8740", &armservicebus.SubscriptionsClientListByTopicOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBSubscriptionListResult = armservicebus.SBSubscriptionListResult{
		// 	Value: []*armservicebus.SBSubscription{
		// 		{
		// 			Name: to.Ptr("sdk-Subscriptions-2178"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions"),
		// 			ID: to.Ptr("/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178"),
		// 			Properties: &armservicebus.SBSubscriptionProperties{
		// 				AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
		// 				AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
		// 				CountDetails: &armservicebus.MessageCountDetails{
		// 					ActiveMessageCount: to.Ptr[int64](0),
		// 					DeadLetterMessageCount: to.Ptr[int64](0),
		// 					ScheduledMessageCount: to.Ptr[int64](0),
		// 					TransferDeadLetterMessageCount: to.Ptr[int64](0),
		// 					TransferMessageCount: to.Ptr[int64](0),
		// 				},
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
		// 				DeadLetteringOnFilterEvaluationExceptions: to.Ptr(true),
		// 				DeadLetteringOnMessageExpiration: to.Ptr(true),
		// 				DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
		// 				EnableBatchedOperations: to.Ptr(true),
		// 				ForwardDeadLetteredMessagesTo: to.Ptr("sdk-Topics-3065"),
		// 				ForwardTo: to.Ptr("sdk-Topics-3065"),
		// 				LockDuration: to.Ptr("PT1M"),
		// 				MaxDeliveryCount: to.Ptr[int32](10),
		// 				MessageCount: to.Ptr[int64](0),
		// 				RequiresSession: to.Ptr(false),
		// 				Status: to.Ptr(armservicebus.EntityStatusActive),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.599Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

type SubscriptionsClientCreateOrUpdateOptions added in v0.3.0

type SubscriptionsClientCreateOrUpdateOptions struct {
}

SubscriptionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionsClient.CreateOrUpdate method.

type SubscriptionsClientCreateOrUpdateResponse added in v0.3.0

type SubscriptionsClientCreateOrUpdateResponse struct {
	// Description of subscription resource.
	SBSubscription
}

SubscriptionsClientCreateOrUpdateResponse contains the response from method SubscriptionsClient.CreateOrUpdate.

type SubscriptionsClientDeleteOptions added in v0.3.0

type SubscriptionsClientDeleteOptions struct {
}

SubscriptionsClientDeleteOptions contains the optional parameters for the SubscriptionsClient.Delete method.

type SubscriptionsClientDeleteResponse added in v0.3.0

type SubscriptionsClientDeleteResponse struct {
}

SubscriptionsClientDeleteResponse contains the response from method SubscriptionsClient.Delete.

type SubscriptionsClientGetOptions added in v0.3.0

type SubscriptionsClientGetOptions struct {
}

SubscriptionsClientGetOptions contains the optional parameters for the SubscriptionsClient.Get method.

type SubscriptionsClientGetResponse added in v0.3.0

type SubscriptionsClientGetResponse struct {
	// Description of subscription resource.
	SBSubscription
}

SubscriptionsClientGetResponse contains the response from method SubscriptionsClient.Get.

type SubscriptionsClientListByTopicOptions added in v0.3.0

type SubscriptionsClientListByTopicOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

SubscriptionsClientListByTopicOptions contains the optional parameters for the SubscriptionsClient.NewListByTopicPager method.

type SubscriptionsClientListByTopicResponse added in v0.3.0

type SubscriptionsClientListByTopicResponse struct {
	// The response to the List Subscriptions operation.
	SBSubscriptionListResult
}

SubscriptionsClientListByTopicResponse contains the response from method SubscriptionsClient.NewListByTopicPager.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The type of identity that last modified the resource.
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TopicsClient

type TopicsClient struct {
	// contains filtered or unexported fields
}

TopicsClient contains the methods for the Topics group. Don't use this type directly, use NewTopicsClient() instead.

func NewTopicsClient

func NewTopicsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TopicsClient, error)

NewTopicsClient creates a new instance of TopicsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TopicsClient) CreateOrUpdate

func (client *TopicsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, parameters SBTopic, options *TopicsClientCreateOrUpdateOptions) (TopicsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a topic in the specified namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • parameters - Parameters supplied to create a topic resource.
  • options - TopicsClientCreateOrUpdateOptions contains the optional parameters for the TopicsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopicsClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-1617", "sdk-Topics-5488", armservicebus.SBTopic{
		Properties: &armservicebus.SBTopicProperties{
			EnableExpress: to.Ptr(true),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBTopic = armservicebus.SBTopic{
	// 	Name: to.Ptr("sdk-Topics-5488"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-Topics-5488"),
	// 	Properties: &armservicebus.SBTopicProperties{
	// 		AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:34.320Z"); return t}()),
	// 		AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:34.100Z"); return t}()),
	// 		DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"),
	// 		EnableBatchedOperations: to.Ptr(true),
	// 		EnableExpress: to.Ptr(true),
	// 		EnablePartitioning: to.Ptr(false),
	// 		MaxMessageSizeInKilobytes: to.Ptr[int64](10240),
	// 		MaxSizeInMegabytes: to.Ptr[int32](10240),
	// 		RequiresDuplicateDetection: to.Ptr(false),
	// 		SizeInBytes: to.Ptr[int64](0),
	// 		Status: to.Ptr(armservicebus.EntityStatusActive),
	// 		SubscriptionCount: to.Ptr[int32](0),
	// 		SupportOrdering: to.Ptr(true),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:34.320Z"); return t}()),
	// 	},
	// }
}
Output:

func (*TopicsClient) CreateOrUpdateAuthorizationRule

func (client *TopicsClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SBAuthorizationRule, options *TopicsClientCreateOrUpdateAuthorizationRuleOptions) (TopicsClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates an authorization rule for the specified topic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • authorizationRuleName - The authorization rule name.
  • parameters - The shared access authorization rule.
  • options - TopicsClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the TopicsClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicAuthorizationRuleCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopicsClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", "sdk-AuthRules-4310", armservicebus.SBAuthorizationRule{
		Properties: &armservicebus.SBAuthorizationRuleProperties{
			Rights: []*armservicebus.AccessRights{
				to.Ptr(armservicebus.AccessRightsListen),
				to.Ptr(armservicebus.AccessRightsSend)},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-AuthRules-4310"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*TopicsClient) Delete

func (client *TopicsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, options *TopicsClientDeleteOptions) (TopicsClientDeleteResponse, error)

Delete - Deletes a topic from the specified namespace and resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • options - TopicsClientDeleteOptions contains the optional parameters for the TopicsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewTopicsClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-1617", "sdk-Topics-5488", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*TopicsClient) DeleteAuthorizationRule

func (client *TopicsClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, options *TopicsClientDeleteAuthorizationRuleOptions) (TopicsClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes a topic authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • authorizationRuleName - The authorization rule name.
  • options - TopicsClientDeleteAuthorizationRuleOptions contains the optional parameters for the TopicsClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewTopicsClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", "sdk-AuthRules-4310", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*TopicsClient) Get

func (client *TopicsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, options *TopicsClientGetOptions) (TopicsClientGetResponse, error)

Get - Returns a description for the specified topic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • options - TopicsClientGetOptions contains the optional parameters for the TopicsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopicsClient().Get(ctx, "ArunMonocle", "sdk-Namespace-1617", "sdk-Topics-5488", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBTopic = armservicebus.SBTopic{
	// 	Name: to.Ptr("sdk-Topics-5488"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-Topics-5488"),
	// 	Properties: &armservicebus.SBTopicProperties{
	// 		AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
	// 		AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:31.444Z"); return t}()),
	// 		DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
	// 		DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"),
	// 		EnableBatchedOperations: to.Ptr(true),
	// 		EnableExpress: to.Ptr(true),
	// 		EnablePartitioning: to.Ptr(false),
	// 		MaxMessageSizeInKilobytes: to.Ptr[int64](10240),
	// 		MaxSizeInMegabytes: to.Ptr[int32](10240),
	// 		RequiresDuplicateDetection: to.Ptr(false),
	// 		SizeInBytes: to.Ptr[int64](0),
	// 		Status: to.Ptr(armservicebus.EntityStatusActive),
	// 		SubscriptionCount: to.Ptr[int32](0),
	// 		SupportOrdering: to.Ptr(true),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:52:32.209Z"); return t}()),
	// 	},
	// }
}
Output:

func (*TopicsClient) GetAuthorizationRule

func (client *TopicsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, options *TopicsClientGetAuthorizationRuleOptions) (TopicsClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Returns the specified authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • authorizationRuleName - The authorization rule name.
  • options - TopicsClientGetAuthorizationRuleOptions contains the optional parameters for the TopicsClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopicsClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", "sdk-AuthRules-4310", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SBAuthorizationRule = armservicebus.SBAuthorizationRule{
	// 	Name: to.Ptr("sdk-AuthRules-4310"),
	// 	Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310"),
	// 	Properties: &armservicebus.SBAuthorizationRuleProperties{
	// 		Rights: []*armservicebus.AccessRights{
	// 			to.Ptr(armservicebus.AccessRightsListen),
	// 			to.Ptr(armservicebus.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*TopicsClient) ListKeys

func (client *TopicsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, options *TopicsClientListKeysOptions) (TopicsClientListKeysResponse, error)

ListKeys - Gets the primary and secondary connection strings for the topic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • authorizationRuleName - The authorization rule name.
  • options - TopicsClientListKeysOptions contains the optional parameters for the TopicsClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopicsClient().ListKeys(ctx, "Default-ServiceBus-WestUS", "sdk-Namespace8408", "sdk-Topics2075", "sdk-Authrules5067", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	KeyName: to.Ptr("sdk-AuthRules-4310"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"),
	// 	PrimaryKey: to.Ptr("#############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"),
	// 	SecondaryKey: to.Ptr("#############################################"),
	// }
}
Output:

func (*TopicsClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *TopicsClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, topicName string, options *TopicsClientListAuthorizationRulesOptions) *runtime.Pager[TopicsClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Gets authorization rules for a topic.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • options - TopicsClientListAuthorizationRulesOptions contains the optional parameters for the TopicsClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTopicsClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{
		// 	Value: []*armservicebus.SBAuthorizationRule{
		// 		{
		// 			Name: to.Ptr("sdk-AuthRules-4310"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310"),
		// 			Properties: &armservicebus.SBAuthorizationRuleProperties{
		// 				Rights: []*armservicebus.AccessRights{
		// 					to.Ptr(armservicebus.AccessRightsListen),
		// 					to.Ptr(armservicebus.AccessRightsSend)},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*TopicsClient) NewListByNamespacePager added in v0.5.0

func (client *TopicsClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *TopicsClientListByNamespaceOptions) *runtime.Pager[TopicsClientListByNamespaceResponse]

NewListByNamespacePager - Gets all the topics in a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - TopicsClientListByNamespaceOptions contains the optional parameters for the TopicsClient.NewListByNamespacePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicListByNameSpace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTopicsClient().NewListByNamespacePager("Default-ServiceBus-WestUS", "sdk-Namespace-1617", &armservicebus.TopicsClientListByNamespaceOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SBTopicListResult = armservicebus.SBTopicListResult{
		// 	Value: []*armservicebus.SBTopic{
		// 		{
		// 			Name: to.Ptr("sdk-topics-5488"),
		// 			Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-topics-5488"),
		// 			Properties: &armservicebus.SBTopicProperties{
		// 				AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
		// 				AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"),
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:31.444Z"); return t}()),
		// 				DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"),
		// 				DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"),
		// 				EnableBatchedOperations: to.Ptr(true),
		// 				EnableExpress: to.Ptr(true),
		// 				EnablePartitioning: to.Ptr(false),
		// 				MaxMessageSizeInKilobytes: to.Ptr[int64](10240),
		// 				MaxSizeInMegabytes: to.Ptr[int32](10240),
		// 				RequiresDuplicateDetection: to.Ptr(false),
		// 				SizeInBytes: to.Ptr[int64](0),
		// 				Status: to.Ptr(armservicebus.EntityStatusActive),
		// 				SubscriptionCount: to.Ptr[int32](0),
		// 				SupportOrdering: to.Ptr(true),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:52:32.209Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*TopicsClient) RegenerateKeys

func (client *TopicsClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *TopicsClientRegenerateKeysOptions) (TopicsClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates primary or secondary connection strings for the topic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • topicName - The topic name.
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate the authorization rule.
  • options - TopicsClientRegenerateKeysOptions contains the optional parameters for the TopicsClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Topics/SBTopicAuthorizationRuleRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopicsClient().RegenerateKeys(ctx, "Default-ServiceBus-WestUS", "sdk-Namespace8408", "sdk-Topics2075", "sdk-Authrules5067", armservicebus.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armservicebus.AccessKeys{
	// 	KeyName: to.Ptr("sdk-AuthRules-4310"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"),
	// 	PrimaryKey: to.Ptr("#############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"),
	// 	SecondaryKey: to.Ptr("#############################################"),
	// }
}
Output:

type TopicsClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type TopicsClientCreateOrUpdateAuthorizationRuleOptions struct {
}

TopicsClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the TopicsClient.CreateOrUpdateAuthorizationRule method.

type TopicsClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type TopicsClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

TopicsClientCreateOrUpdateAuthorizationRuleResponse contains the response from method TopicsClient.CreateOrUpdateAuthorizationRule.

type TopicsClientCreateOrUpdateOptions added in v0.3.0

type TopicsClientCreateOrUpdateOptions struct {
}

TopicsClientCreateOrUpdateOptions contains the optional parameters for the TopicsClient.CreateOrUpdate method.

type TopicsClientCreateOrUpdateResponse added in v0.3.0

type TopicsClientCreateOrUpdateResponse struct {
	// Description of topic resource.
	SBTopic
}

TopicsClientCreateOrUpdateResponse contains the response from method TopicsClient.CreateOrUpdate.

type TopicsClientDeleteAuthorizationRuleOptions added in v0.3.0

type TopicsClientDeleteAuthorizationRuleOptions struct {
}

TopicsClientDeleteAuthorizationRuleOptions contains the optional parameters for the TopicsClient.DeleteAuthorizationRule method.

type TopicsClientDeleteAuthorizationRuleResponse added in v0.3.0

type TopicsClientDeleteAuthorizationRuleResponse struct {
}

TopicsClientDeleteAuthorizationRuleResponse contains the response from method TopicsClient.DeleteAuthorizationRule.

type TopicsClientDeleteOptions added in v0.3.0

type TopicsClientDeleteOptions struct {
}

TopicsClientDeleteOptions contains the optional parameters for the TopicsClient.Delete method.

type TopicsClientDeleteResponse added in v0.3.0

type TopicsClientDeleteResponse struct {
}

TopicsClientDeleteResponse contains the response from method TopicsClient.Delete.

type TopicsClientGetAuthorizationRuleOptions added in v0.3.0

type TopicsClientGetAuthorizationRuleOptions struct {
}

TopicsClientGetAuthorizationRuleOptions contains the optional parameters for the TopicsClient.GetAuthorizationRule method.

type TopicsClientGetAuthorizationRuleResponse added in v0.3.0

type TopicsClientGetAuthorizationRuleResponse struct {
	// Description of a namespace authorization rule.
	SBAuthorizationRule
}

TopicsClientGetAuthorizationRuleResponse contains the response from method TopicsClient.GetAuthorizationRule.

type TopicsClientGetOptions added in v0.3.0

type TopicsClientGetOptions struct {
}

TopicsClientGetOptions contains the optional parameters for the TopicsClient.Get method.

type TopicsClientGetResponse added in v0.3.0

type TopicsClientGetResponse struct {
	// Description of topic resource.
	SBTopic
}

TopicsClientGetResponse contains the response from method TopicsClient.Get.

type TopicsClientListAuthorizationRulesOptions added in v0.3.0

type TopicsClientListAuthorizationRulesOptions struct {
}

TopicsClientListAuthorizationRulesOptions contains the optional parameters for the TopicsClient.NewListAuthorizationRulesPager method.

type TopicsClientListAuthorizationRulesResponse added in v0.3.0

type TopicsClientListAuthorizationRulesResponse struct {
	// The response to the List Namespace operation.
	SBAuthorizationRuleListResult
}

TopicsClientListAuthorizationRulesResponse contains the response from method TopicsClient.NewListAuthorizationRulesPager.

type TopicsClientListByNamespaceOptions added in v0.3.0

type TopicsClientListByNamespaceOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

TopicsClientListByNamespaceOptions contains the optional parameters for the TopicsClient.NewListByNamespacePager method.

type TopicsClientListByNamespaceResponse added in v0.3.0

type TopicsClientListByNamespaceResponse struct {
	// The response to the List Topics operation.
	SBTopicListResult
}

TopicsClientListByNamespaceResponse contains the response from method TopicsClient.NewListByNamespacePager.

type TopicsClientListKeysOptions added in v0.3.0

type TopicsClientListKeysOptions struct {
}

TopicsClientListKeysOptions contains the optional parameters for the TopicsClient.ListKeys method.

type TopicsClientListKeysResponse added in v0.3.0

type TopicsClientListKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

TopicsClientListKeysResponse contains the response from method TopicsClient.ListKeys.

type TopicsClientRegenerateKeysOptions added in v0.3.0

type TopicsClientRegenerateKeysOptions struct {
}

TopicsClientRegenerateKeysOptions contains the optional parameters for the TopicsClient.RegenerateKeys method.

type TopicsClientRegenerateKeysResponse added in v0.3.0

type TopicsClientRegenerateKeysResponse struct {
	// Namespace/ServiceBus Connection String
	AccessKeys
}

TopicsClientRegenerateKeysResponse contains the response from method TopicsClient.RegenerateKeys.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The Geo-location where the resource lives
	Location *string

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

TrackedResource - The Resource definition.

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UnavailableReason

type UnavailableReason string

UnavailableReason - Specifies the reason for the unavailability of the service.

const (
	UnavailableReasonInvalidName                           UnavailableReason = "InvalidName"
	UnavailableReasonNameInLockdown                        UnavailableReason = "NameInLockdown"
	UnavailableReasonNameInUse                             UnavailableReason = "NameInUse"
	UnavailableReasonNone                                  UnavailableReason = "None"
	UnavailableReasonSubscriptionIsDisabled                UnavailableReason = "SubscriptionIsDisabled"
	UnavailableReasonTooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription"
)

func PossibleUnavailableReasonValues

func PossibleUnavailableReasonValues() []UnavailableReason

PossibleUnavailableReasonValues returns the possible values for the UnavailableReason const type.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; Client Id of user assigned identity
	ClientID *string

	// READ-ONLY; Principal Id of user assigned identity
	PrincipalID *string
}

UserAssignedIdentity - Recognized Dictionary value.

func (UserAssignedIdentity) MarshalJSON added in v1.1.0

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v1.1.0

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserAssignedIdentityProperties

type UserAssignedIdentityProperties struct {
	// ARM ID of user Identity selected for encryption
	UserAssignedIdentity *string
}

func (UserAssignedIdentityProperties) MarshalJSON added in v1.1.0

func (u UserAssignedIdentityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentityProperties.

func (*UserAssignedIdentityProperties) UnmarshalJSON added in v1.1.0

func (u *UserAssignedIdentityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentityProperties.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL