NamespaceManager NamespaceManager Class

Definition

Represents an anchor class used in managing entities, such as queues, topics, subscriptions, and rules, in your service namespace. You must provide service namespace address and access credentials in order to manage your service namespace.

public sealed class NamespaceManagerPublic NotInheritable Class NamespaceManager
Inheritance
NamespaceManagerNamespaceManager

Inherited Members

System.Object

Examples

 NamespaceManagerSettings nsSettings = new NamespaceManagerSettings(); // with credentials and operation timeout
 NamespaceManager manager = new NamespaceManager(new Uri("baseUri"), nsSettings);

Constructors

NamespaceManager(IEnumerable<String>) NamespaceManager(IEnumerable(Of String))

Initializes a new instance of the NamespaceManager class with the given addresses.

public NamespaceManager(IEnumerable<string> addresses)Public Sub New(addresses As IEnumerable(Of String))
Parameters
addresses
IEnumerable<String> IEnumerable(Of String)

The full addresses of the service namespace.

NamespaceManager(IEnumerable<String>, NamespaceManagerSettings) NamespaceManager(IEnumerable(Of String), NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given addresses and settings.

public NamespaceManager(IEnumerable<string> addresses, NamespaceManagerSettings settings)Public Sub New(addresses As IEnumerable(Of String), settings As NamespaceManagerSettings)
Parameters
addresses
IEnumerable<String> IEnumerable(Of String)

The full addresses of the service namespace.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses, i.e. it is not a must that the credentials you specify be to the base adresses itself.

NamespaceManager(IEnumerable<String>, TokenProvider) NamespaceManager(IEnumerable(Of String), TokenProvider)

Initializes a new instance of the NamespaceManager class with the given addresses and token provider.

public NamespaceManager(IEnumerable<string> addresses, TokenProvider tokenProvider)Public Sub New(addresses As IEnumerable(Of String), tokenProvider As TokenProvider)
Parameters
addresses
IEnumerable<String> IEnumerable(Of String)

The full addresses of the service namespace.

tokenProvider
TokenProvider TokenProvider

The security token provider.

Remarks

Even though it is not allowed to include paths in the namespace addresses, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses.

NamespaceManager(IEnumerable<Uri>) NamespaceManager(IEnumerable(Of Uri))

Initializes a new instance of the NamespaceManager class with the given service namespace URI base addresses.

public NamespaceManager(IEnumerable<Uri> addresses)Public Sub New(addresses As IEnumerable(Of Uri))
Parameters
addresses
IEnumerable<Uri> IEnumerable(Of Uri)

The full URI addresses of the service namespace.

NamespaceManager(IEnumerable<Uri>, NamespaceManagerSettings) NamespaceManager(IEnumerable(Of Uri), NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base addresses and settings.

public NamespaceManager(IEnumerable<Uri> addresses, NamespaceManagerSettings settings)Public Sub New(addresses As IEnumerable(Of Uri), settings As NamespaceManagerSettings)
Parameters
addresses
IEnumerable<Uri> IEnumerable(Of Uri)

The full URI addresses of the service namespace.

Remarks

Even though it is not allowed to include paths in the namespace addresses, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses, i.e. it is not a must that the credentials you specify be to the base adresses itself.

NamespaceManager(IEnumerable<Uri>, TokenProvider) NamespaceManager(IEnumerable(Of Uri), TokenProvider)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base addresses and token provider.

public NamespaceManager(IEnumerable<Uri> addresses, TokenProvider tokenProvider)Public Sub New(addresses As IEnumerable(Of Uri), tokenProvider As TokenProvider)
Parameters
addresses
IEnumerable<Uri> IEnumerable(Of Uri)

The full URI addresses of the service namespace.

tokenProvider
TokenProvider TokenProvider

The security token provider.

Remarks

Even though it is not allowed to include paths in the namespace addresses, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses, i.e. it is not a must that the credentials you specify be to the base adresses itself.

NamespaceManager(String) NamespaceManager(String)

Initializes a new instance of the NamespaceManager class with the given service namespace address.

public NamespaceManager(string address)Public Sub New(address As String)
Parameters
address
String String

The full address of the service namespace.

NamespaceManager(String, NamespaceManagerSettings) NamespaceManager(String, NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given service namespace base address and NamespaceManagerSettings object.

public NamespaceManager(string address, NamespaceManagerSettings settings)Public Sub New(address As String, settings As NamespaceManagerSettings)
Parameters
address
String String

The full address of the service namespace.

Exceptions

address contains a path appended to the full address of the service namespace.

address or settings is null.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address, i.e. it is not a must that the credentials you specify be to the base adress itself.

NamespaceManager(String, TokenProvider) NamespaceManager(String, TokenProvider)

Initializes a new instance of the NamespaceManager class with the given service namespace base address and token provider.

public NamespaceManager(string address, TokenProvider tokenProvider)Public Sub New(address As String, tokenProvider As TokenProvider)
Parameters
address
String String

The full address of the service namespace.

tokenProvider
TokenProvider TokenProvider

The security token provider.

Exceptions

address contains a path appended to the full address of the service namespace.

address or tokenProvider is null.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address.

NamespaceManager(Uri) NamespaceManager(Uri)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base address.

public NamespaceManager(Uri address)Public Sub New(address As Uri)
Parameters
address
Uri Uri

The full URI address of the service namespace.

NamespaceManager(Uri, NamespaceManagerSettings) NamespaceManager(Uri, NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base address and NamespaceManagerSettings object.

public NamespaceManager(Uri address, NamespaceManagerSettings settings)Public Sub New(address As Uri, settings As NamespaceManagerSettings)
Parameters
address
Uri Uri

The full URI address of the service namespace.

Exceptions

address contains a path appended to the full address of the service namespace.

address or settings is null.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address, i.e. it is not a must that the credentials you specify be to the base adress itself.

NamespaceManager(Uri, TokenProvider) NamespaceManager(Uri, TokenProvider)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base address and TokenProvider object.

public NamespaceManager(Uri address, TokenProvider tokenProvider)Public Sub New(address As Uri, tokenProvider As TokenProvider)
Parameters
address
Uri Uri

The full URI address of the service namespace.

tokenProvider
TokenProvider TokenProvider

The security token provider object.

Exceptions

address contains a path appended to the full address of the service namespace.

address or tokenProvider is null.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address, i.e. it is not a must that the credentials you specify be to the base adress itself.

Fields

ProtocolVersion ProtocolVersion

Specifies the string of the format "YYYY-MM" that indicates the client protocol version.

public const string ProtocolVersion = "2016-07"Public Const ProtocolVersion As String = "2016-07"

Properties

Address Address

Gets the service namespace base address.

public Uri Address { get; }Public ReadOnly Property Address As Uri
Value
Uri Uri

A Uri that represents the service namespace base address.

Settings Settings

Gets the service namespace client settings.

public NamespaceManagerSettings Settings { get; }Public ReadOnly Property Settings As NamespaceManagerSettings
Value
NamespaceManagerSettings NamespaceManagerSettings

A NamespaceManagerSettings object that represents the service namespace client settings.

Methods

Create() Create()

Creates a new instance of NamespaceManager.

public static NamespaceManager Create()Public Shared Function Create As NamespaceManager
Returns

CreateConsumerGroup(ConsumerGroupDescription) CreateConsumerGroup(ConsumerGroupDescription)

Creates an Event Hubs consumer group using the specified ConsumerGroupDescription.

public ConsumerGroupDescription CreateConsumerGroup(ConsumerGroupDescription description)Public Function CreateConsumerGroup(description As ConsumerGroupDescription) As ConsumerGroupDescription
Parameters
Returns

CreateConsumerGroup(String, String) CreateConsumerGroup(String, String)

Creates an Event Hubs consumer group using default values, with the specified Event Hubs path and a name for the consumer group.

public ConsumerGroupDescription CreateConsumerGroup(string eventHubPath, string name)Public Function CreateConsumerGroup(eventHubPath As String, name As String) As ConsumerGroupDescription
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group.

Returns

CreateConsumerGroupAsync(ConsumerGroupDescription) CreateConsumerGroupAsync(ConsumerGroupDescription)

Asynchronous version of CreateConsumerGroup(ConsumerGroupDescription).

public Task<ConsumerGroupDescription> CreateConsumerGroupAsync(ConsumerGroupDescription description)Public Function CreateConsumerGroupAsync(description As ConsumerGroupDescription) As Task(Of ConsumerGroupDescription)
Parameters
Returns

The task that completes the asynchronous operation.

CreateConsumerGroupAsync(String, String) CreateConsumerGroupAsync(String, String)

Asynchronous version of CreateConsumerGroup(String, String).

public Task<ConsumerGroupDescription> CreateConsumerGroupAsync(string eventHubPath, string name)Public Function CreateConsumerGroupAsync(eventHubPath As String, name As String) As Task(Of ConsumerGroupDescription)
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group.

Returns

The task that completes the asynchronous operation.

CreateConsumerGroupIfNotExists(ConsumerGroupDescription) CreateConsumerGroupIfNotExists(ConsumerGroupDescription)

Creates a consumer group if it does not already exist, using the specified ConsumerGroupDescription as metadata. If the group already exists, then return the stored ConsumerGroupDescription.

public ConsumerGroupDescription CreateConsumerGroupIfNotExists(ConsumerGroupDescription description)Public Function CreateConsumerGroupIfNotExists(description As ConsumerGroupDescription) As ConsumerGroupDescription
Parameters
Returns

Returns the newly-created ConsumerGroupDescription. If the consumer group already exists, returns the existing ConsumerGroupDescription.

CreateConsumerGroupIfNotExists(String, String) CreateConsumerGroupIfNotExists(String, String)

Creates a consumer group if it does not already exist, using the specified Event Hubs path and group name. If the group already exists, then return the stored ConsumerGroupDescription.

public ConsumerGroupDescription CreateConsumerGroupIfNotExists(string eventHubPath, string name)Public Function CreateConsumerGroupIfNotExists(eventHubPath As String, name As String) As ConsumerGroupDescription
Parameters
eventHubPath
String String

Path to the Event Hub.

name
String String

The name of the consumer group to create.

Returns

Returns the newly-created ConsumerGroupDescription. If the consumer group already exists, returns the existing ConsumerGroupDescription.

CreateConsumerGroupIfNotExistsAsync(ConsumerGroupDescription) CreateConsumerGroupIfNotExistsAsync(ConsumerGroupDescription)

Asynchronous version of CreateConsumerGroupIfNotExists(ConsumerGroupDescription).

public Task<ConsumerGroupDescription> CreateConsumerGroupIfNotExistsAsync(ConsumerGroupDescription description)Public Function CreateConsumerGroupIfNotExistsAsync(description As ConsumerGroupDescription) As Task(Of ConsumerGroupDescription)
Parameters
description
ConsumerGroupDescription ConsumerGroupDescription

The consumer group description.

Returns

The task that completes the asynchronous operation.

CreateConsumerGroupIfNotExistsAsync(String, String) CreateConsumerGroupIfNotExistsAsync(String, String)

Asynchronous version of CreateConsumerGroupIfNotExists(String, String).

public Task<ConsumerGroupDescription> CreateConsumerGroupIfNotExistsAsync(string eventHubPath, string name)Public Function CreateConsumerGroupIfNotExistsAsync(eventHubPath As String, name As String) As Task(Of ConsumerGroupDescription)
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group.

Returns

The task that completes the asynchronous operation.

CreateEventHub(EventHubDescription) CreateEventHub(EventHubDescription)

Creates a new Event Hub using the specified EventHubDescription.

public EventHubDescription CreateEventHub(EventHubDescription description)Public Function CreateEventHub(description As EventHubDescription) As EventHubDescription
Parameters
Returns

CreateEventHub(String) CreateEventHub(String)

Creates a new Event Hub using default values, for the given input path.

public EventHubDescription CreateEventHub(string path)Public Function CreateEventHub(path As String) As EventHubDescription
Parameters
path
String String

The path to the Event Hub.

Returns

CreateEventHubAsync(EventHubDescription) CreateEventHubAsync(EventHubDescription)

Asynchronously creates an event hub.

public Task<EventHubDescription> CreateEventHubAsync(EventHubDescription description)Public Function CreateEventHubAsync(description As EventHubDescription) As Task(Of EventHubDescription)
Parameters
description
EventHubDescription EventHubDescription

An EventHubDescription object that describes the Event Hub to create.

Returns

The task that completes the asynchronous operation.

CreateEventHubAsync(String) CreateEventHubAsync(String)

Asynchronously creates an event hub.

public Task<EventHubDescription> CreateEventHubAsync(string path)Public Function CreateEventHubAsync(path As String) As Task(Of EventHubDescription)
Parameters
path
String String

The path to the Event Hub.

Returns

The task that completes the asynchronous operation.

CreateEventHubIfNotExists(EventHubDescription) CreateEventHubIfNotExists(EventHubDescription)

Creates an Event Hub if it does not exist.

public EventHubDescription CreateEventHubIfNotExists(EventHubDescription description)Public Function CreateEventHubIfNotExists(description As EventHubDescription) As EventHubDescription
Parameters
description
EventHubDescription EventHubDescription

An EventHubDescription object that describes the Event Hub to create.

Returns

CreateEventHubIfNotExists(String) CreateEventHubIfNotExists(String)

Creates an Event Hub if it does not exist.

public EventHubDescription CreateEventHubIfNotExists(string path)Public Function CreateEventHubIfNotExists(path As String) As EventHubDescription
Parameters
path
String String

The path to the Event Hub.

Returns

CreateEventHubIfNotExistsAsync(EventHubDescription) CreateEventHubIfNotExistsAsync(EventHubDescription)

Asynchronously creates an Event Hub if it does not exist.

public Task<EventHubDescription> CreateEventHubIfNotExistsAsync(EventHubDescription description)Public Function CreateEventHubIfNotExistsAsync(description As EventHubDescription) As Task(Of EventHubDescription)
Parameters
description
EventHubDescription EventHubDescription

The event hub description.

Returns

The task that completes the asynchronous operation.

CreateEventHubIfNotExistsAsync(String) CreateEventHubIfNotExistsAsync(String)

Asynchronously creates an Event Hub if it does not exist.

public Task<EventHubDescription> CreateEventHubIfNotExistsAsync(string path)Public Function CreateEventHubIfNotExistsAsync(path As String) As Task(Of EventHubDescription)
Parameters
path
String String

The path of the event hub.

Returns

The task that completes the asynchronous operation.

CreateFromConnectionString(String) CreateFromConnectionString(String)

Creates a new instance of NamespaceManager using a specified connection string.

public static NamespaceManager CreateFromConnectionString(string connectionString)Public Shared Function CreateFromConnectionString(connectionString As String) As NamespaceManager
Parameters
connectionString
String String

The connection sting used.

Returns

CreateQueue(QueueDescription) CreateQueue(QueueDescription)

Creates a new queue in the service namespace with the specified queue description.

public QueueDescription CreateQueue(QueueDescription description)Public Function CreateQueue(description As QueueDescription) As QueueDescription
Parameters
description
QueueDescription QueueDescription

A QueueDescription object describing the attributes with which the new queue will be created.

Returns

The QueueDescription of the newly created queue.

CreateQueue(String) CreateQueue(String)

Creates a new queue in the service namespace with the given path.

public QueueDescription CreateQueue(string path)Public Function CreateQueue(path As String) As QueueDescription
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

The QueueDescription of the newly created queue.

Exceptions

path is null or empty.

The length of path is greater than 290 characters.

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

A queue or a topic with the same name and path exists under the same service namespace.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

Either the specified size in the description is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size.

An internal error or unexpected exception occurs.

The server is overloaded with logical operations. You can consider any of the following actions:Wait and retry calling this function.Remove entities before retry (for example, receive messages before sending any more).

CreateQueueAsync(QueueDescription) CreateQueueAsync(QueueDescription)

Asynchronously creates a new queue in the service namespace with the specified queue description.

public Task<QueueDescription> CreateQueueAsync(QueueDescription description)Public Function CreateQueueAsync(description As QueueDescription) As Task(Of QueueDescription)
Parameters
description
QueueDescription QueueDescription

A QueueDescription object describing the attributes with which the new queue will be created.

Returns

The QueueDescription of the newly created queue.

CreateQueueAsync(String) CreateQueueAsync(String)

Asynchronously creates a new queue in the service namespace with the given path.

public Task<QueueDescription> CreateQueueAsync(string path)Public Function CreateQueueAsync(path As String) As Task(Of QueueDescription)
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

The QueueDescription of the newly created queue.

CreateRelay(RelayDescription) CreateRelay(RelayDescription)

public RelayDescription CreateRelay(RelayDescription description)Public Function CreateRelay(description As RelayDescription) As RelayDescription
Parameters
Returns

CreateRelay(String, RelayType) CreateRelay(String, RelayType)

public RelayDescription CreateRelay(string path, RelayType type)Public Function CreateRelay(path As String, type As RelayType) As RelayDescription
Parameters
path
String String
Returns

CreateRelayAsync(RelayDescription) CreateRelayAsync(RelayDescription)

Asynchronously creates a new relay in the service namespace with the specified queue description.

public Task<RelayDescription> CreateRelayAsync(RelayDescription description)Public Function CreateRelayAsync(description As RelayDescription) As Task(Of RelayDescription)
Parameters
description
RelayDescription RelayDescription

The description object describing the attributes with which the new relay will be created.

Returns

The RelayDescription object for the newly created relay.

CreateRelayAsync(String, RelayType) CreateRelayAsync(String, RelayType)

Asynchronously creates a new relay in the service namespace with the given path and type.

public Task<RelayDescription> CreateRelayAsync(string path, RelayType type)Public Function CreateRelayAsync(path As String, type As RelayType) As Task(Of RelayDescription)
Parameters
path
String String

The path of the queue relative to the service namespace base address.

type
RelayType RelayType

The relay type.

Returns

The RelayDescription object for the newly created relay.

CreateSubscription(SubscriptionDescription) CreateSubscription(SubscriptionDescription)

Creates a new subscription in the service namespace with the specified subscription description.

public SubscriptionDescription CreateSubscription(SubscriptionDescription description)Public Function CreateSubscription(description As SubscriptionDescription) As SubscriptionDescription
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

Returns

Remarks

Be default, A "pass-through" filter is created for this subscription, which means it will allow all message to go to this subscription. The name of the filter is DefaultRuleName.

CreateSubscription(SubscriptionDescription, Filter) CreateSubscription(SubscriptionDescription, Filter)

Creates a new subscription in the service namespace with the specified subscription description and filter expression.

public SubscriptionDescription CreateSubscription(SubscriptionDescription description, Filter filter)Public Function CreateSubscription(description As SubscriptionDescription, filter As Filter) As SubscriptionDescription
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

filter
Filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

Remarks

A default rule will be created using data from filter and named as DefaultRuleName.

CreateSubscription(SubscriptionDescription, RuleDescription) CreateSubscription(SubscriptionDescription, RuleDescription)

Creates a new subscription in the service namespace with the specified subscription description and rule description.

public SubscriptionDescription CreateSubscription(SubscriptionDescription description, RuleDescription ruleDescription)Public Function CreateSubscription(description As SubscriptionDescription, ruleDescription As RuleDescription) As SubscriptionDescription
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

ruleDescription
RuleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

Remarks

A default rule will be created using data from ruleDescription. If Name is null or white space, then the name of the rule created will be DefaultRuleName.

CreateSubscription(String, String) CreateSubscription(String, String)

Creates a new subscription in the service namespace with the specified topic path and subscription name.

public SubscriptionDescription CreateSubscription(string topicPath, string name)Public Function CreateSubscription(topicPath As String, name As String) As SubscriptionDescription
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription.

Returns

Remarks

Be default, A "pass-through" filter is created for this subscription, which means it will allow all message to go to this subscription. The name of the filter is DefaultRuleName.

CreateSubscription(String, String, Filter) CreateSubscription(String, String, Filter)

Creates a new subscription in the service namespace with the specified topic path, subscription name, and filter expression.

public SubscriptionDescription CreateSubscription(string topicPath, string name, Filter filter)Public Function CreateSubscription(topicPath As String, name As String, filter As Filter) As SubscriptionDescription
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription.

filter
Filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

Remarks

A default rule will be created using data from filter and named as DefaultRuleName.

CreateSubscription(String, String, RuleDescription) CreateSubscription(String, String, RuleDescription)

Creates a new subscription in the service namespace with the specified topic path, subscription name, and rule description.

public SubscriptionDescription CreateSubscription(string topicPath, string name, RuleDescription ruleDescription)Public Function CreateSubscription(topicPath As String, name As String, ruleDescription As RuleDescription) As SubscriptionDescription
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription.

ruleDescription
RuleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

Remarks

A default rule will be created using data from ruleDescription. If Name is null or white space, then the name of the rule created will be DefaultRuleName.

CreateSubscriptionAsync(SubscriptionDescription) CreateSubscriptionAsync(SubscriptionDescription)

Asynchronously creates a new subscription in the service namespace with the specified subscription description.

public Task<SubscriptionDescription> CreateSubscriptionAsync(SubscriptionDescription description)Public Function CreateSubscriptionAsync(description As SubscriptionDescription) As Task(Of SubscriptionDescription)
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

Returns

The asynchronously created subscription.

CreateSubscriptionAsync(SubscriptionDescription, Filter) CreateSubscriptionAsync(SubscriptionDescription, Filter)

Asynchronously creates a new subscription in the service namespace with the specified subscription description and filter expression.

public Task<SubscriptionDescription> CreateSubscriptionAsync(SubscriptionDescription description, Filter filter)Public Function CreateSubscriptionAsync(description As SubscriptionDescription, filter As Filter) As Task(Of SubscriptionDescription)
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

filter
Filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

The asynchronously created subscription.

CreateSubscriptionAsync(SubscriptionDescription, RuleDescription) CreateSubscriptionAsync(SubscriptionDescription, RuleDescription)

Asynchronously creates a new subscription in the service namespace with the specified subscription description and rule description.

public Task<SubscriptionDescription> CreateSubscriptionAsync(SubscriptionDescription description, RuleDescription ruleDescription)Public Function CreateSubscriptionAsync(description As SubscriptionDescription, ruleDescription As RuleDescription) As Task(Of SubscriptionDescription)
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

ruleDescription
RuleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

The asynchronously created subscription.

CreateSubscriptionAsync(String, String) CreateSubscriptionAsync(String, String)

Asynchronously creates a new subscription in the service namespace with the specified topic path and subscription name.

public Task<SubscriptionDescription> CreateSubscriptionAsync(string topicPath, string name)Public Function CreateSubscriptionAsync(topicPath As String, name As String) As Task(Of SubscriptionDescription)
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription.

Returns

The asynchronously created subscription.

CreateSubscriptionAsync(String, String, Filter) CreateSubscriptionAsync(String, String, Filter)

Asynchronously creates a new subscription in the service namespace with the specified topic path, subscription name, and filter expression.

public Task<SubscriptionDescription> CreateSubscriptionAsync(string topicPath, string name, Filter filter)Public Function CreateSubscriptionAsync(topicPath As String, name As String, filter As Filter) As Task(Of SubscriptionDescription)
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription.

filter
Filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

The asynchronously created subscription.

CreateSubscriptionAsync(String, String, RuleDescription) CreateSubscriptionAsync(String, String, RuleDescription)

Asynchronously creates a new subscription in the service namespace with the specified topic path, subscription name, and rule description.

public Task<SubscriptionDescription> CreateSubscriptionAsync(string topicPath, string name, RuleDescription ruleDescription)Public Function CreateSubscriptionAsync(topicPath As String, name As String, ruleDescription As RuleDescription) As Task(Of SubscriptionDescription)
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription.

ruleDescription
RuleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

The asynchronously created subscription.

CreateTopic(TopicDescription) CreateTopic(TopicDescription)

Creates a new topic inside the service namespace with the specified topic description.

public TopicDescription CreateTopic(TopicDescription description)Public Function CreateTopic(description As TopicDescription) As TopicDescription
Parameters
description
TopicDescription TopicDescription

A TopicDescription object describing the attributes with which the new topic will be created.

Returns

The TopicDescription of the newly created topic.

CreateTopic(String) CreateTopic(String)

Creates a new topic inside the service namespace with the given service namespace path.

public TopicDescription CreateTopic(string path)Public Function CreateTopic(path As String) As TopicDescription
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

The TopicDescription of the newly created topic.

Exceptions

path is null or empty, or path begins or ends with “/”.

Length of path is greater than Microsoft.ServiceBus.Messaging.Constants.QueueNameMaximumLength.

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

A queue or a topic with the same name and path exists under the same service namespace.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

Either the specified size in the description is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size.

An internal error or unexpected exception occurs.

CreateTopicAsync(TopicDescription) CreateTopicAsync(TopicDescription)

Asynchronously creates a new topic inside the service namespace with the specified topic description.

public Task<TopicDescription> CreateTopicAsync(TopicDescription description)Public Function CreateTopicAsync(description As TopicDescription) As Task(Of TopicDescription)
Parameters
description
TopicDescription TopicDescription

A TopicDescription object describing the attributes with which the new topic will be created.

Returns

The asynchronous operation.

CreateTopicAsync(String) CreateTopicAsync(String)

Asynchronously creates a new topic inside the service namespace with the given service namespace path.

public Task<TopicDescription> CreateTopicAsync(string path)Public Function CreateTopicAsync(path As String) As Task(Of TopicDescription)
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

The asynchronous operation.

DeleteConsumerGroup(String, String) DeleteConsumerGroup(String, String)

Deletes a consumer group.

public void DeleteConsumerGroup(string eventHubPath, string name)Public Sub DeleteConsumerGroup(eventHubPath As String, name As String)
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group to delete.

DeleteConsumerGroupAsync(String, String) DeleteConsumerGroupAsync(String, String)

Asynchronously deletes a consumer group.

public Task DeleteConsumerGroupAsync(string eventHubPath, string name)Public Function DeleteConsumerGroupAsync(eventHubPath As String, name As String) As Task
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group to delete.

Returns

The task that represents the asynchronous operation.

DeleteEventHub(String) DeleteEventHub(String)

Deletes an Event Hub.

public void DeleteEventHub(string path)Public Sub DeleteEventHub(path As String)
Parameters
path
String String

The path to the Event Hub.

DeleteEventHubAsync(String) DeleteEventHubAsync(String)

Asynchronously deletes an Event Hub.

public Task DeleteEventHubAsync(string path)Public Function DeleteEventHubAsync(path As String) As Task
Parameters
path
String String

The path to the Event Hub.

Returns

The task that represents the asynchronous operation.

DeleteQueue(String) DeleteQueue(String)

Deletes the queue described by the path relative to the service namespace base address.

public void DeleteQueue(string path)Public Sub DeleteQueue(path As String)
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Exceptions

path is empty or null, or path starts or ends with "/".

The length of path is greater than Microsoft.ServiceBus.Messaging.Constants.QueueNameMaximumLength.

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

An internal error or unexpected exception occurs.

DeleteQueueAsync(String) DeleteQueueAsync(String)

Asynchronously deletes the queue described by the path relative to the service namespace base address.

public Task DeleteQueueAsync(string path)Public Function DeleteQueueAsync(path As String) As Task
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

The asynchronous delete queue operation.

DeleteRelay(String) DeleteRelay(String)

public void DeleteRelay(string path)Public Sub DeleteRelay(path As String)
Parameters
path
String String

DeleteRelayAsync(String) DeleteRelayAsync(String)

Asynchronously deletes the relay described by the path relative to the service namespace base address.

public Task DeleteRelayAsync(string path)Public Function DeleteRelayAsync(path As String) As Task
Parameters
path
String String

The path of the relay relative to the service namespace base address.

Returns

The asynchronous delete relay operation.

DeleteSubscription(String, String) DeleteSubscription(String, String)

Deletes the subscription with the specified topic path and subscription name.

public void DeleteSubscription(string topicPath, string name)Public Sub DeleteSubscription(topicPath As String, name As String)
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription to delete.

DeleteSubscriptionAsync(String, String) DeleteSubscriptionAsync(String, String)

Asynchronously deletes the subscription with the specified topic path and subscription name.

public Task DeleteSubscriptionAsync(string topicPath, string name)Public Function DeleteSubscriptionAsync(topicPath As String, name As String) As Task
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

name
String String

The name of the subscription to delete.

Returns

The asynchronous delete subscription operation.

DeleteTopic(String) DeleteTopic(String)

Deletes the topic described by path relative to the service namespace base address.

public void DeleteTopic(string path)Public Sub DeleteTopic(path As String)
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Exceptions

path is null or empty, or path starts or ends with "/".

DeleteTopicAsync(String) DeleteTopicAsync(String)

Asynchronously deletes the topic described by path relative to the service namespace base address.

public Task DeleteTopicAsync(string path)Public Function DeleteTopicAsync(path As String) As Task
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

The asynchronous deleted topic operation.

EventHubExists(String) EventHubExists(String)

Indicates whether or not an Event Hub exists.

public bool EventHubExists(string path)Public Function EventHubExists(path As String) As Boolean
Parameters
path
String String

The path to the Event Hub.

Returns

Returns true if the Event Hub exists; otherwise, false.

EventHubExistsAsync(String) EventHubExistsAsync(String)

Asynchronously determines whether the event hub exists from the service namespace.

public Task<bool> EventHubExistsAsync(string path)Public Function EventHubExistsAsync(path As String) As Task(Of Boolean)
Parameters
path
String String

The path of the event hub.

Returns

The task representing the asynchronous operation.

GetConsumerGroup(String, String) GetConsumerGroup(String, String)

Gets an Event Hubs consumer group.

public ConsumerGroupDescription GetConsumerGroup(string eventHubPath, string name)Public Function GetConsumerGroup(eventHubPath As String, name As String) As ConsumerGroupDescription
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group.

Returns

GetConsumerGroupAsync(String, String) GetConsumerGroupAsync(String, String)

Asynchronously gets a consumer group.

public Task<ConsumerGroupDescription> GetConsumerGroupAsync(string eventHubPath, string name)Public Function GetConsumerGroupAsync(eventHubPath As String, name As String) As Task(Of ConsumerGroupDescription)
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The name of the consumer group.

Returns

The task representing the asynchronous operation.

GetConsumerGroups(String) GetConsumerGroups(String)

Gets a collection representing a set of consumer groups.

public IEnumerable<ConsumerGroupDescription> GetConsumerGroups(string eventHubPath)Public Function GetConsumerGroups(eventHubPath As String) As IEnumerable(Of ConsumerGroupDescription)
Parameters
eventHubPath
String String

The path to the Event Hub.

Returns

Returns an IEnumerable<T> object representing the set of consumer groups.

GetConsumerGroupsAsync(String) GetConsumerGroupsAsync(String)

Asynchronously gets a set of consumer groups.

public Task<IEnumerable<ConsumerGroupDescription>> GetConsumerGroupsAsync(string eventHubPath)Public Function GetConsumerGroupsAsync(eventHubPath As String) As Task(Of IEnumerable(Of ConsumerGroupDescription))
Parameters
eventHubPath
String String

The path to the Event Hub.

Returns

The task representing the asynchronous operation.

GetEventHub(String) GetEventHub(String)

Gets information about an Event Hub.

public EventHubDescription GetEventHub(string path)Public Function GetEventHub(path As String) As EventHubDescription
Parameters
path
String String

The path to the Event Hub.

Returns

Returns an EventHubDescription object that contains the Event Hub description.

GetEventHubAsync(String) GetEventHubAsync(String)

Asynchronously gets information about an Event Hub.

public Task<EventHubDescription> GetEventHubAsync(string path)Public Function GetEventHubAsync(path As String) As Task(Of EventHubDescription)
Parameters
path
String String

The path to the Event Hub.

Returns

The task representing the asynchronous operation.

GetEventHubPartition(String, String) GetEventHubPartition(String, String)

Returns information about the specified Event Hub partition. This method assumes that you want partition information for the partition specified by the name parameter that belongs to the default consumer group pointed to by eventHubPath.

public PartitionDescription GetEventHubPartition(string eventHubPath, string name)Public Function GetEventHubPartition(eventHubPath As String, name As String) As PartitionDescription
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The ID of the Event Hub partition.

Returns

GetEventHubPartition(String, String, String) GetEventHubPartition(String, String, String)

public PartitionDescription GetEventHubPartition(string eventHubPath, string consumerGroupName, string name)Public Function GetEventHubPartition(eventHubPath As String, consumerGroupName As String, name As String) As PartitionDescription
Parameters
eventHubPath
String String
consumerGroupName
String String
name
String String
Returns

GetEventHubPartitionAsync(String, String) GetEventHubPartitionAsync(String, String)

Asynchronous version of GetEventHubPartition(String, String).

public Task<PartitionDescription> GetEventHubPartitionAsync(string eventHubPath, string name)Public Function GetEventHubPartitionAsync(eventHubPath As String, name As String) As Task(Of PartitionDescription)
Parameters
eventHubPath
String String

The path to the Event Hub.

name
String String

The ID of the Event Hub partition.

Returns

GetEventHubPartitionAsync(String, String, String) GetEventHubPartitionAsync(String, String, String)

Asynchronous version of GetEventHubPartition(String, String).

public Task<PartitionDescription> GetEventHubPartitionAsync(string eventHubPath, string consumerGroupName, string name)Public Function GetEventHubPartitionAsync(eventHubPath As String, consumerGroupName As String, name As String) As Task(Of PartitionDescription)
Parameters
eventHubPath
String String

The path to the Event Hub.

consumerGroupName
String String

The name of the Event Hubs consumer group.

name
String String

The ID of the Event Hubs partition.

Returns

GetEventHubs() GetEventHubs()

Gets a collection representing a set of Event Hubs.

public IEnumerable<EventHubDescription> GetEventHubs()Public Function GetEventHubs As IEnumerable(Of EventHubDescription)
Returns

Returns an IEnumerable<T> object representing the set of Event Hubs.

GetEventHubsAsync() GetEventHubsAsync()

Asynchronously gets a list of Event Hubs.

public Task<IEnumerable<EventHubDescription>> GetEventHubsAsync()Public Function GetEventHubsAsync As Task(Of IEnumerable(Of EventHubDescription))
Returns

The task representing the asynchronous operation.

GetQueue(String) GetQueue(String)

Retrieves a queue from the service namespace.

public QueueDescription GetQueue(string path)Public Function GetQueue(path As String) As QueueDescription
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

A QueueDescription handle to the queue, or a MessagingEntityNotFoundException exception if the queue does not exist in the service namespace.

Exceptions

path is empty or null, or path starts or ends with "/".

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

The queue does not exist in the service namespace.

An internal error or unexpected exception occurs.

GetQueueAsync(String) GetQueueAsync(String)

Asynchronously retrieves a queue from the service namespace.

public Task<QueueDescription> GetQueueAsync(string path)Public Function GetQueueAsync(path As String) As Task(Of QueueDescription)
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

The asynchronous operation.

GetQueues() GetQueues()

Retrieves an enumerable collection of all queues in the service namespace.

public IEnumerable<QueueDescription> GetQueues()Public Function GetQueues As IEnumerable(Of QueueDescription)
Returns

An IEnumerable<T> object that represents the collection of all queues in the service namespace or returns an empty collection if no queue exists.

Exceptions

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

An internal error or unexpected exception occurs.

GetQueues(String) GetQueues(String)

Retrieves an enumerable collection of all queues in the service namespace with the specified filter. You can filter by a combination of entity name (including starts with), entity length (Gt or Lt), created, updated, and accessed time (Gt or Lt).

public IEnumerable<QueueDescription> GetQueues(string filter)Public Function GetQueues(filter As String) As IEnumerable(Of QueueDescription)
Parameters
filter
String String

A string used to filter the queues to be retrieved.

Returns

An IEnumerable<T> object that represents the collection of all queues in the service namespace or returns an empty collection if no queue exists.

GetQueuesAsync() GetQueuesAsync()

Asynchronously retrieves an enumerable collection of all queues in the service namespace.

public Task<IEnumerable<QueueDescription>> GetQueuesAsync()Public Function GetQueuesAsync As Task(Of IEnumerable(Of QueueDescription))
Returns

The asynchronous operation.

GetQueuesAsync(String) GetQueuesAsync(String)

Asynchronously retrieves an enumerable collection of all queues in the service namespace with specified filter.

public Task<IEnumerable<QueueDescription>> GetQueuesAsync(string filter)Public Function GetQueuesAsync(filter As String) As Task(Of IEnumerable(Of QueueDescription))
Parameters
filter
String String

The string used to filter the queues to be retrieved.

Returns

The asynchronous operation.

GetRelay(String) GetRelay(String)

public RelayDescription GetRelay(string path)Public Function GetRelay(path As String) As RelayDescription
Parameters
path
String String
Returns

GetRelayAsync(String) GetRelayAsync(String)

Asynchronously retrieves an enumerable collection of all relays in the service namespace with specified path.

public Task<RelayDescription> GetRelayAsync(string path)Public Function GetRelayAsync(path As String) As Task(Of RelayDescription)
Parameters
path
String String

The relay path.

Returns

The asynchronous operation.

GetRelays() GetRelays()

public IEnumerable<RelayDescription> GetRelays()Public Function GetRelays As IEnumerable(Of RelayDescription)
Returns

GetRelaysAsync() GetRelaysAsync()

Asynchronously retrieves an enumerable collection of all relays in the service namespace.

public Task<IEnumerable<RelayDescription>> GetRelaysAsync()Public Function GetRelaysAsync As Task(Of IEnumerable(Of RelayDescription))
Returns

The asynchronous operation.

GetRevokedPublishers(String) GetRevokedPublishers(String)

Returns all revoked publishers in an Event Hub.

public IEnumerable<RevokedPublisherDescription> GetRevokedPublishers(string entityPath)Public Function GetRevokedPublishers(entityPath As String) As IEnumerable(Of RevokedPublisherDescription)
Parameters
entityPath
String String

Path to the Event Hub. See Path.

Returns

Returns an IEnumerable<T> collection containing the revoked publishers.

GetRevokedPublishersAsync(String) GetRevokedPublishersAsync(String)

Asynchronous version of GetRevokedPublishers(String).

public Task<IEnumerable<RevokedPublisherDescription>> GetRevokedPublishersAsync(string entityPath)Public Function GetRevokedPublishersAsync(entityPath As String) As Task(Of IEnumerable(Of RevokedPublisherDescription))
Parameters
entityPath
String String

Path to the Event Hub. See Path.

Returns

GetRules(String, String) GetRules(String, String)

Retrieves an enumerable collection of all rules in the service namespace.

public IEnumerable<RuleDescription> GetRules(string topicPath, string subscriptionName)Public Function GetRules(topicPath As String, subscriptionName As String) As IEnumerable(Of RuleDescription)
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

subscriptionName
String String

The name of the subscription.

Returns

An IEnumerable<T> object that represents the collection of all rules in the service namespace or returns an empty collection if no rule exists.

GetRules(String, String, String) GetRules(String, String, String)

Retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.

public IEnumerable<RuleDescription> GetRules(string topicPath, string subscriptionName, string filter)Public Function GetRules(topicPath As String, subscriptionName As String, filter As String) As IEnumerable(Of RuleDescription)
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

subscriptionName
String String

The name of the subscription.

filter
String String

The string used to filter the rules to be retrieved.

Returns

An IEnumerable<T> object that represents the collection of all rules in the service namespace or returns an empty collection if no rule exists.

GetRulesAsync(String, String) GetRulesAsync(String, String)

Asynchronously retrieves an enumerable collection of all rules in the service namespace.

public Task<IEnumerable<RuleDescription>> GetRulesAsync(string topicPath, string subscriptionName)Public Function GetRulesAsync(topicPath As String, subscriptionName As String) As Task(Of IEnumerable(Of RuleDescription))
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

subscriptionName
String String

The name of the subscription.

Returns

The asynchronous operation.

GetRulesAsync(String, String, String) GetRulesAsync(String, String, String)

Asynchronously retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.

public Task<IEnumerable<RuleDescription>> GetRulesAsync(string topicPath, string subscriptionName, string filter)Public Function GetRulesAsync(topicPath As String, subscriptionName As String, filter As String) As Task(Of IEnumerable(Of RuleDescription))
Parameters
topicPath
String String

The topic path relative to the service namespace base address.

subscriptionName
String String

The name of the subscription.

filter
String String

The string used to filter the rules to be retrieved.

Returns

The asynchronous operation.

GetSubscription(String, String) GetSubscription(String, String)

Retrieves the topic from the service namespace.

public SubscriptionDescription GetSubscription(string topicPath, string name)Public Function GetSubscription(topicPath As String, name As String) As SubscriptionDescription
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

name
String String

The name of the subscription.

Returns

A SubscriptionDescription handle to the subscription, or a MessagingEntityNotFoundException exception if the subscription does not exist in the service namespace.

Exceptions

The subscription does not exist in the service namespace.

GetSubscriptionAsync(String, String) GetSubscriptionAsync(String, String)

Asynchronously retrieves the topic from the service namespace.

public Task<SubscriptionDescription> GetSubscriptionAsync(string topicPath, string name)Public Function GetSubscriptionAsync(topicPath As String, name As String) As Task(Of SubscriptionDescription)
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

name
String String

The name of the subscription.

Returns

The asynchronous operation.

GetSubscriptions(String) GetSubscriptions(String)

Retrieves an enumerable collection of all subscriptions in the service namespace.

public IEnumerable<SubscriptionDescription> GetSubscriptions(string topicPath)Public Function GetSubscriptions(topicPath As String) As IEnumerable(Of SubscriptionDescription)
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

Returns

An IEnumerable<T> object that represents the collection of all subscriptions in the service namespace or returns an empty collection if no subscription exists.

GetSubscriptions(String, String) GetSubscriptions(String, String)

Retrieves an enumerable collection of all subscriptions in the service namespace with specified topic path and filter.

public IEnumerable<SubscriptionDescription> GetSubscriptions(string topicPath, string filter)Public Function GetSubscriptions(topicPath As String, filter As String) As IEnumerable(Of SubscriptionDescription)
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

filter
String String

The string used to filter the subscriptions to be retrieved.

Returns

An IEnumerable<T> object that represents the collection of all subscriptions in the service namespace or returns an empty collection if no subscription exists.

GetSubscriptionsAsync(String) GetSubscriptionsAsync(String)

Asynchronously retrieves an enumerable collection of all subscriptions in the service namespace.

public Task<IEnumerable<SubscriptionDescription>> GetSubscriptionsAsync(string topicPath)Public Function GetSubscriptionsAsync(topicPath As String) As Task(Of IEnumerable(Of SubscriptionDescription))
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

Returns

GetSubscriptionsAsync(String, String) GetSubscriptionsAsync(String, String)

Asynchronously retrieves an enumerable collection of all subscriptions in the service namespace.

public Task<IEnumerable<SubscriptionDescription>> GetSubscriptionsAsync(string topicPath, string filter)Public Function GetSubscriptionsAsync(topicPath As String, filter As String) As Task(Of IEnumerable(Of SubscriptionDescription))
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

filter
String String

The string used to filter the subscriptions to be retrieved.

Returns

GetTopic(String) GetTopic(String)

Retrieves the topic from the service namespace.

public TopicDescription GetTopic(string path)Public Function GetTopic(path As String) As TopicDescription
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

A TopicDescription reference to the topic, or a MessagingEntityNotFoundException exception if the topic does not exist in the service namespace.

Exceptions

path is empty or null.

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

The topic does not exist in the service namespace.

An internal error or unexpected exception occurs.

GetTopicAsync(String) GetTopicAsync(String)

Asynchronously retrieves the topic from the service namespace.

public Task<TopicDescription> GetTopicAsync(string path)Public Function GetTopicAsync(path As String) As Task(Of TopicDescription)
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

The asynchronous operation.

GetTopics() GetTopics()

Retrieves a collection of topics in a service namespace.

public IEnumerable<TopicDescription> GetTopics()Public Function GetTopics As IEnumerable(Of TopicDescription)
Returns

An IEnumerable<T> object that represents the collection of topics under the current namespace, or returns an empty collection if no topic exists.

Exceptions

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

An internal error or unexpected exception occurs.

GetTopics(String) GetTopics(String)

Retrieves a collection of topics in a service namespace with the specified filter. You can filter by a combination of entity name (including starts with), entity length (Gt or Lt), created, updated, and accessed time (Gt or Lt).

public IEnumerable<TopicDescription> GetTopics(string filter)Public Function GetTopics(filter As String) As IEnumerable(Of TopicDescription)
Parameters
filter
String String

The string used to filter the topics to be retrieved.

Returns

An IEnumerable<T> object that represents the collection of topics under the current namespace, or returns an empty collection if no topic exists.

GetTopicsAsync() GetTopicsAsync()

Asynchronously retrieves a collection of topics in a service namespace.

public Task<IEnumerable<TopicDescription>> GetTopicsAsync()Public Function GetTopicsAsync As Task(Of IEnumerable(Of TopicDescription))
Returns

The asynchronous operation.

GetTopicsAsync(String) GetTopicsAsync(String)

Asynchronously retrieves a collection of topics in a service namespace.

public Task<IEnumerable<TopicDescription>> GetTopicsAsync(string filter)Public Function GetTopicsAsync(filter As String) As Task(Of IEnumerable(Of TopicDescription))
Parameters
filter
String String

The string used to filter the topics to be retrieved.

Returns

The asynchronous operation.

GetVersionInfo() GetVersionInfo()

Retrieves a string of the format "YYYY-MM" that indicates the maximum supported protocol version that the server or service can handle.

public string GetVersionInfo()Public Function GetVersionInfo As String
Returns

A string that indicates the maximum supported protocol version that the server or service can handle.

GetVersionInfoAsync() GetVersionInfoAsync()

Asynchronously retrieves a string of the format "YYYY-MM" that indicates the maximum supported protocol version that the server or service can handle.

public Task<string> GetVersionInfoAsync()Public Function GetVersionInfoAsync As Task(Of String)
Returns

The asynchronous operation.

QueueExists(String) QueueExists(String)

Determines whether a queue exists in the service namespace.

public bool QueueExists(string path)Public Function QueueExists(path As String) As Boolean
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

true if a queue exists in the service namespace; otherwise, false.

QueueExistsAsync(String) QueueExistsAsync(String)

Asynchronously determines whether a queue exists in the service namespace.

public Task<bool> QueueExistsAsync(string path)Public Function QueueExistsAsync(path As String) As Task(Of Boolean)
Parameters
path
String String

The path of the queue relative to the service namespace base address.

Returns

The asynchronous operation.

RelayExists(String) RelayExists(String)

public bool RelayExists(string path)Public Function RelayExists(path As String) As Boolean
Parameters
path
String String
Returns

RelayExistsAsync(String) RelayExistsAsync(String)

Asynchronously determines whether a relay exists in the service namespace.

public Task<bool> RelayExistsAsync(string path)Public Function RelayExistsAsync(path As String) As Task(Of Boolean)
Parameters
path
String String

The path of the relay relative to the service namespace base address.

Returns

The asynchronous operation.

RenameQueue(String, String) RenameQueue(String, String)

Renames a queue inside a namespace.

public QueueDescription RenameQueue(string path, string newPath)Public Function RenameQueue(path As String, newPath As String) As QueueDescription
Parameters
path
String String

The path to an existing queue.

newPath
String String

The new path to the renamed queue.

Returns
Exceptions

Thrown when path is null or empty.

Thrown when the length of path is more than 290 characters.

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

Thrown when the source queue with the specified path does not exist.

Thrown when the target queue with the same path exists within the same namespace.

Thrown when the client does not have credentials to perform the operation.

Thrown when an internal error or unexpected exception occurs.

RenameQueueAsync(String, String) RenameQueueAsync(String, String)

Asynchronous version of RenameQueue(String, String).

public Task<QueueDescription> RenameQueueAsync(string path, string newPath)Public Function RenameQueueAsync(path As String, newPath As String) As Task(Of QueueDescription)
Parameters
path
String String

The path to an existing queue.

newPath
String String

The new path to the renamed queue.

Returns
Exceptions

Thrown when path is null or empty.

Thrown when the length of path is more than 290 characters.

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

Thrown when the source queue with the specified path does not exist.

Thrown when the target queue with the same path exists within the same namespace.

Thrown when the client does not have credentials to perform the operation.

Thrown when an internal error or unexpected exception occurs.

RenameTopic(String, String) RenameTopic(String, String)

Renames a topic inside a namespace.

public TopicDescription RenameTopic(string path, string newPath)Public Function RenameTopic(path As String, newPath As String) As TopicDescription
Parameters
path
String String

The path to an existing topic.

newPath
String String

The new path to the renamed topic.

Returns
Exceptions

Thrown when path is null or empty.

Thrown when the length of path is more than 290 characters.

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

Thrown when the source topic with the specified path does not exist.

Thrown when the target topic with the same path exists within the same namespace.

Thrown when the client does not have credentials to perform the operation.

Thrown when an internal error or unexpected exception occurs.

RenameTopicAsync(String, String) RenameTopicAsync(String, String)

Asynchronous version of RenameTopic(String, String).

public Task<TopicDescription> RenameTopicAsync(string path, string newPath)Public Function RenameTopicAsync(path As String, newPath As String) As Task(Of TopicDescription)
Parameters
path
String String

The path to an existing topic.

newPath
String String

The new path to the renamed topic.

Returns
Exceptions

Thrown when path is null or empty.

Thrown when the length of path is more than 290 characters.

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

Thrown when the source topic with the specified path does not exist.

Thrown when the target topic with the same path exists within the same namespace.

Thrown when the client does not have credentials to perform the operation.

Thrown when an internal error or unexpected exception occurs.

RestorePublisher(String, String) RestorePublisher(String, String)

Removes the publisher from the Event Hubs revocation list.

public void RestorePublisher(string entityPath, string publisher)Public Sub RestorePublisher(entityPath As String, publisher As String)
Parameters
entityPath
String String

Event Hub path under which the publisher was revoked and must be restored. See EventHubDescription.

publisher
String String

The revoked publisher.

RestorePublisherAsync(String, String) RestorePublisherAsync(String, String)

Asynchronous version of RestorePublisher(String, String).

public Task RestorePublisherAsync(string entityPath, string publisher)Public Function RestorePublisherAsync(entityPath As String, publisher As String) As Task
Parameters
entityPath
String String

Event Hub path under which the publisher was revoked and must be restored. See EventHubDescription.

publisher
String String

The revoked publisher.

Returns

Returns Task.

RevokePublisher(String, String) RevokePublisher(String, String)

Adds the publisher to the Event Hubs revocation list.

public RevokedPublisherDescription RevokePublisher(string entityPath, string publisher)Public Function RevokePublisher(entityPath As String, publisher As String) As RevokedPublisherDescription
Parameters
entityPath
String String

Event Hub path under which the publisher must be revoked. See EventHubDescription.

publisher
String String

The publisher to revoke.

Returns

RevokePublisherAsync(String, String) RevokePublisherAsync(String, String)

Asynchronous version of RevokePublisher(String, String).

public Task<RevokedPublisherDescription> RevokePublisherAsync(string entityPath, string publisher)Public Function RevokePublisherAsync(entityPath As String, publisher As String) As Task(Of RevokedPublisherDescription)
Parameters
entityPath
String String

Event Hub path under which the publisher must be revoked. See EventHubDescription.

publisher
String String

The publisher to revoke.

Returns

SubscriptionExists(String, String) SubscriptionExists(String, String)

Determines whether a subscription exists in the service namespace.

public bool SubscriptionExists(string topicPath, string name)Public Function SubscriptionExists(topicPath As String, name As String) As Boolean
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

name
String String

The name of the subscription.

Returns

true if a subscription exists in the service namespace; otherwise, false.

SubscriptionExistsAsync(String, String) SubscriptionExistsAsync(String, String)

Asynchronously determines whether a subscription exists in the service namespace.

public Task<bool> SubscriptionExistsAsync(string topicPath, string name)Public Function SubscriptionExistsAsync(topicPath As String, name As String) As Task(Of Boolean)
Parameters
topicPath
String String

The path of the topic relative to the service namespace base address.

name
String String

The name of the subscription.

Returns

The asynchronous operation.

TopicExists(String) TopicExists(String)

Determines whether a topic exists in the service namespace.

public bool TopicExists(string path)Public Function TopicExists(path As String) As Boolean
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

true if a topic exists in the service namespace; otherwise, false.

TopicExistsAsync(String) TopicExistsAsync(String)

Asynchronously determines whether a topic exists in the service namespace.

public Task<bool> TopicExistsAsync(string path)Public Function TopicExistsAsync(path As String) As Task(Of Boolean)
Parameters
path
String String

The path of the topic relative to the service namespace base address.

Returns

The asynchronous operation.

UpdateConsumerGroup(ConsumerGroupDescription) UpdateConsumerGroup(ConsumerGroupDescription)

Updates an Event Hubs consumer group.

public ConsumerGroupDescription UpdateConsumerGroup(ConsumerGroupDescription description)Public Function UpdateConsumerGroup(description As ConsumerGroupDescription) As ConsumerGroupDescription
Parameters
description
ConsumerGroupDescription ConsumerGroupDescription

A ConsumerGroupDescription object containing the updated information.

Returns

UpdateConsumerGroupAsync(ConsumerGroupDescription) UpdateConsumerGroupAsync(ConsumerGroupDescription)

Asynchronously updates the consumer group.

public Task<ConsumerGroupDescription> UpdateConsumerGroupAsync(ConsumerGroupDescription description)Public Function UpdateConsumerGroupAsync(description As ConsumerGroupDescription) As Task(Of ConsumerGroupDescription)
Parameters
description
ConsumerGroupDescription ConsumerGroupDescription

The consumer group description.

Returns

The task representing the asynchronous operation.

UpdateEventHub(EventHubDescription) UpdateEventHub(EventHubDescription)

Updates an Event Hub.

public EventHubDescription UpdateEventHub(EventHubDescription description)Public Function UpdateEventHub(description As EventHubDescription) As EventHubDescription
Parameters
description
EventHubDescription EventHubDescription

An EventHubDescription object containing the updated information.

Returns

UpdateEventHubAsync(EventHubDescription) UpdateEventHubAsync(EventHubDescription)

Asynchronously updates the event hub.

public Task<EventHubDescription> UpdateEventHubAsync(EventHubDescription description)Public Function UpdateEventHubAsync(description As EventHubDescription) As Task(Of EventHubDescription)
Parameters
description
EventHubDescription EventHubDescription

The event hub description.

Returns

The task representing the asynchronous operation.

UpdateQueue(QueueDescription) UpdateQueue(QueueDescription)

Enables you to update the queue.

public QueueDescription UpdateQueue(QueueDescription description)Public Function UpdateQueue(description As QueueDescription) As QueueDescription
Parameters
description
QueueDescription QueueDescription

A QueueDescription object describing the queue to be updated.

Returns

UpdateQueueAsync(QueueDescription) UpdateQueueAsync(QueueDescription)

Asynchronously enables you to update the queue.

public Task<QueueDescription> UpdateQueueAsync(QueueDescription description)Public Function UpdateQueueAsync(description As QueueDescription) As Task(Of QueueDescription)
Parameters
description
QueueDescription QueueDescription

A QueueDescription object describing the queue to be updated.

Returns

The asynchronous operation.

UpdateRelay(RelayDescription) UpdateRelay(RelayDescription)

public RelayDescription UpdateRelay(RelayDescription description)Public Function UpdateRelay(description As RelayDescription) As RelayDescription
Parameters
Returns

UpdateRelayAsync(RelayDescription) UpdateRelayAsync(RelayDescription)

Asynchronously enables you to update the relay.

public Task<RelayDescription> UpdateRelayAsync(RelayDescription description)Public Function UpdateRelayAsync(description As RelayDescription) As Task(Of RelayDescription)
Parameters
description
RelayDescription RelayDescription

A RelayDescription object describing the relay to be updated.

Returns

The asynchronous operation.

UpdateSubscription(SubscriptionDescription) UpdateSubscription(SubscriptionDescription)

Enables you to update the subscription.

public SubscriptionDescription UpdateSubscription(SubscriptionDescription description)Public Function UpdateSubscription(description As SubscriptionDescription) As SubscriptionDescription
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the subscription to be updated.

Returns

UpdateSubscriptionAsync(SubscriptionDescription) UpdateSubscriptionAsync(SubscriptionDescription)

Asynchronously enables you to update the subscription.

public Task<SubscriptionDescription> UpdateSubscriptionAsync(SubscriptionDescription description)Public Function UpdateSubscriptionAsync(description As SubscriptionDescription) As Task(Of SubscriptionDescription)
Parameters
description
SubscriptionDescription SubscriptionDescription

A SubscriptionDescription object describing the subscription to be updated.

Returns

The asynchronous operation.

UpdateTopic(TopicDescription) UpdateTopic(TopicDescription)

Enables you to update the topic.

public TopicDescription UpdateTopic(TopicDescription description)Public Function UpdateTopic(description As TopicDescription) As TopicDescription
Parameters
description
TopicDescription TopicDescription

A TopicDescription object describing the topic to be updated.

Returns

UpdateTopicAsync(TopicDescription) UpdateTopicAsync(TopicDescription)

Asynchronously enables you to update the topic.

public Task<TopicDescription> UpdateTopicAsync(TopicDescription description)Public Function UpdateTopicAsync(description As TopicDescription) As Task(Of TopicDescription)
Parameters
description
TopicDescription TopicDescription

A TopicDescription object describing the topic to be updated.

Returns

The asynchronous operation.