Class ServiceBusAdministrationAsyncClient
ServiceBusAdministrationClientBuilder
.
Create a queue
// `.subscribe()` is a non-blocking call. It'll move onto the next // instruction after setting up the `consumer` and `errorConsumer` callbacks. client.createQueue("my-new-queue").subscribe(queue -> { System.out.printf("Queue created. Name: %s. Lock Duration: %s.%n", queue.getName(), queue.getLockDuration()); }, error -> { System.err.println("Error creating queue: " + error); });
Edit an existing subscription
// To update the subscription we have to: // 1. Get the subscription info from the service. // 2. Update the SubscriptionProperties we want to change. // 3. Call the updateSubscription() with the updated object. // `.subscribe()` is a non-blocking call. It'll move onto the next // instruction after setting up the `consumer` and `errorConsumer` callbacks. client.getSubscription("my-topic", "my-subscription") .flatMap(subscription -> { System.out.println("Original delivery count: " + subscription.getMaxDeliveryCount()); // Updating it to a new value. subscription.setMaxDeliveryCount(5); // Persisting the updates to the subscription object. return client.updateSubscription(subscription); }) .subscribe(subscription -> { System.out.printf("Subscription updated. Name: %s. Delivery count: %s.%n", subscription.getSubscriptionName(), subscription.getMaxDeliveryCount()); }, error -> { System.err.println("Error updating subscription: " + error); });
List all queues
// `.subscribe()` is a non-blocking call. It'll move onto the next // instruction after setting up the `consumer` and `errorConsumer` callbacks. client.listQueues().subscribe(queue -> { System.out.printf("Queue [%s]. Lock Duration: %s.%n", queue.getName(), queue.getLockDuration()); }, error -> { System.err.println("Error fetching queues: " + error); });
-
Method Summary
Modifier and TypeMethodDescriptioncreateQueue
(String queueName) Creates a queue with the given name.createQueue
(String queueName, CreateQueueOptions queueOptions) Creates a queue with theCreateQueueOptions
and given queue name.Mono<com.azure.core.http.rest.Response<QueueProperties>>
createQueueWithResponse
(String queueName, CreateQueueOptions queueOptions) Creates a queue and returns the created queue in addition to the HTTP response.createRule
(String topicName, String subscriptionName, String ruleName) Creates a rule under the given topic and subscriptioncreateRule
(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions) Creates a rule with theCreateRuleOptions
.Mono<com.azure.core.http.rest.Response<RuleProperties>>
createRuleWithResponse
(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions) Creates a rule and returns the created rule in addition to the HTTP response.createSubscription
(String topicName, String subscriptionName) Creates a subscription with the given topic and subscription names.createSubscription
(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions) Creates a subscription with theCreateSubscriptionOptions
.Mono<com.azure.core.http.rest.Response<SubscriptionProperties>>
createSubscriptionWithResponse
(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions) Creates a subscription and returns the created subscription in addition to the HTTP response.createTopic
(String topicName) Creates a topic with the given name.createTopic
(String topicName, CreateTopicOptions topicOptions) Creates a topic with theCreateTopicOptions
.Mono<com.azure.core.http.rest.Response<TopicProperties>>
createTopicWithResponse
(String topicName, CreateTopicOptions topicOptions) Creates a topic and returns the created topic in addition to the HTTP response.deleteQueue
(String queueName) Deletes a queue the matchingqueueName
.deleteQueueWithResponse
(String queueName) Deletes a queue the matchingqueueName
and returns the HTTP response.deleteRule
(String topicName, String subscriptionName, String ruleName) Deletes a rule the matchingruleName
.deleteRuleWithResponse
(String topicName, String subscriptionName, String ruleName) Deletes a rule the matchingruleName
and returns the HTTP response.deleteSubscription
(String topicName, String subscriptionName) Deletes a subscription the matchingsubscriptionName
.deleteSubscriptionWithResponse
(String topicName, String subscriptionName) Deletes a subscription the matchingsubscriptionName
and returns the HTTP response.deleteTopic
(String topicName) Deletes a topic the matchingtopicName
.deleteTopicWithResponse
(String topicName) Deletes a topic the matchingtopicName
and returns the HTTP response.Gets information about the Service Bus namespace.Mono<com.azure.core.http.rest.Response<NamespaceProperties>>
Gets information about the Service Bus namespace along with its HTTP response.Gets information about the queue.getQueueExists
(String queueName) Gets whether or not a queue withqueueName
exists in the Service Bus namespace.getQueueExistsWithResponse
(String queueName) Gets whether or not a queue withqueueName
exists in the Service Bus namespace.getQueueRuntimeProperties
(String queueName) Gets runtime properties about the queue.Mono<com.azure.core.http.rest.Response<QueueRuntimeProperties>>
getQueueRuntimePropertiesWithResponse
(String queueName) Gets runtime properties about the queue along with its HTTP response.Mono<com.azure.core.http.rest.Response<QueueProperties>>
getQueueWithResponse
(String queueName) Gets information about the queue along with its HTTP response.Gets a rule from the service namespace.Mono<com.azure.core.http.rest.Response<RuleProperties>>
getRuleWithResponse
(String topicName, String subscriptionName, String ruleName) Gets a rule from the service namespace.getSubscription
(String topicName, String subscriptionName) Gets information about the queue.getSubscriptionExists
(String topicName, String subscriptionName) Gets whether or not a subscription within a topic exists.getSubscriptionExistsWithResponse
(String topicName, String subscriptionName) Gets whether or not a subscription within a topic exists.getSubscriptionRuntimeProperties
(String topicName, String subscriptionName) Gets runtime properties about the subscription.Mono<com.azure.core.http.rest.Response<SubscriptionRuntimeProperties>>
getSubscriptionRuntimePropertiesWithResponse
(String topicName, String subscriptionName) Gets runtime properties about the subscription.Mono<com.azure.core.http.rest.Response<SubscriptionProperties>>
getSubscriptionWithResponse
(String topicName, String subscriptionName) Gets information about the subscription along with its HTTP response.Gets information about the topic.getTopicExists
(String topicName) Gets whether or not a topic withtopicName
exists in the Service Bus namespace.getTopicExistsWithResponse
(String topicName) Gets whether or not a topic withtopicName
exists in the Service Bus namespace.getTopicRuntimeProperties
(String topicName) Gets runtime properties about the topic.Mono<com.azure.core.http.rest.Response<TopicRuntimeProperties>>
getTopicRuntimePropertiesWithResponse
(String topicName) Gets runtime properties about the topic with its HTTP response.Mono<com.azure.core.http.rest.Response<TopicProperties>>
getTopicWithResponse
(String topicName) Gets information about the topic along with its HTTP response.com.azure.core.http.rest.PagedFlux<QueueProperties>
Fetches all the queues in the Service Bus namespace.com.azure.core.http.rest.PagedFlux<RuleProperties>
Fetches all the rules for a topic and subscription.com.azure.core.http.rest.PagedFlux<SubscriptionProperties>
listSubscriptions
(String topicName) Fetches all the subscriptions for a topic.com.azure.core.http.rest.PagedFlux<TopicProperties>
Fetches all the topics in the Service Bus namespace.updateQueue
(QueueProperties queue) Updates a queue with the givenQueueProperties
.Mono<com.azure.core.http.rest.Response<QueueProperties>>
Updates a queue with the givenQueueProperties
.updateRule
(String topicName, String subscriptionName, RuleProperties rule) Updates a rule with the givenRuleProperties
.Mono<com.azure.core.http.rest.Response<RuleProperties>>
updateRuleWithResponse
(String topicName, String subscriptionName, RuleProperties rule) Updates a rule with the givenRuleProperties
.updateSubscription
(SubscriptionProperties subscription) Updates a subscription with the givenSubscriptionProperties
.Mono<com.azure.core.http.rest.Response<SubscriptionProperties>>
updateSubscriptionWithResponse
(SubscriptionProperties subscription) Updates a subscription with the givenSubscriptionProperties
.updateTopic
(TopicProperties topic) Updates a topic with the givenTopicProperties
.Mono<com.azure.core.http.rest.Response<TopicProperties>>
Updates a topic with the givenTopicProperties
.
-
Method Details
-
createQueue
Creates a queue with the given name.- Parameters:
queueName
- Name of the queue to create.- Returns:
- A Mono that completes with information about the created queue.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the queue quota is exceeded, or an error occurred processing the request.NullPointerException
- ifqueueName
is null.IllegalArgumentException
- ifqueueName
is an empty string.com.azure.core.exception.ResourceExistsException
- if a queue exists with the samequeueName
.- See Also:
-
createQueue
Creates a queue with theCreateQueueOptions
and given queue name.- Parameters:
queueName
- Name of the queue to create.queueOptions
- Options about the queue to create.- Returns:
- A Mono that completes with information about the created queue.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the queue quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
orqueueOptions
is null.com.azure.core.exception.ResourceExistsException
- if a queue exists with the samequeueName
.- See Also:
-
createQueueWithResponse
public Mono<com.azure.core.http.rest.Response<QueueProperties>> createQueueWithResponse(String queueName, CreateQueueOptions queueOptions) Creates a queue and returns the created queue in addition to the HTTP response.- Parameters:
queueName
- Name of the queue to create.queueOptions
- Options about the queue to create.- Returns:
- A Mono that returns the created queue in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the queue quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
orqueueOptions
is null.com.azure.core.exception.ResourceExistsException
- if a queue exists with the samequeueName
.- See Also:
-
createRule
Creates a rule under the given topic and subscription- Parameters:
topicName
- Name of the topic associated with rule.subscriptionName
- Name of the subscription associated with the rule.ruleName
- Name of the rule.- Returns:
- A Mono that completes with information about the created rule.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
orruleName
are are empty strings.NullPointerException
- iftopicName
orruleName
are are null.com.azure.core.exception.ResourceExistsException
- if a rule exists with the same topic, subscription, and rule name.
-
createRule
public Mono<RuleProperties> createRule(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions) Creates a rule with theCreateRuleOptions
.- Parameters:
topicName
- Name of the topic associated with rule.subscriptionName
- Name of the subscription associated with the rule.ruleName
- Name of the rule.ruleOptions
- Information about the rule to create.- Returns:
- A Mono that completes with information about the created rule.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
orruleName
are are empty strings.NullPointerException
- iftopicName
,ruleName
, orruleOptions
are are null.com.azure.core.exception.ResourceExistsException
- if a rule exists with the same topic and rule name.
-
createRuleWithResponse
public Mono<com.azure.core.http.rest.Response<RuleProperties>> createRuleWithResponse(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions) Creates a rule and returns the created rule in addition to the HTTP response.- Parameters:
topicName
- Name of the topic associated with rule.subscriptionName
- Name of the subscription associated with the rule.ruleName
- Name of the rule.ruleOptions
- Information about the rule to create.- Returns:
- A Mono that returns the created rule in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
orruleName
are are empty strings.NullPointerException
- iftopicName
,ruleName
, orruleOptions
are are null.com.azure.core.exception.ResourceExistsException
- if a rule exists with the same topic and rule name.
-
createSubscription
Creates a subscription with the given topic and subscription names.- Parameters:
topicName
- Name of the topic associated with subscription.subscriptionName
- Name of the subscription.- Returns:
- A Mono that completes with information about the created subscription.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
are are empty strings.NullPointerException
- iftopicName
orsubscriptionName
are are null.com.azure.core.exception.ResourceExistsException
- if a subscription exists with the same topic and subscription name.- See Also:
-
createSubscription
public Mono<SubscriptionProperties> createSubscription(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions) Creates a subscription with theCreateSubscriptionOptions
.- Parameters:
topicName
- Name of the topic associated with subscription.subscriptionName
- Name of the subscription.subscriptionOptions
- Information about the subscription to create.- Returns:
- A Mono that completes with information about the created subscription.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
are are empty strings.NullPointerException
- iftopicName
,subscriptionName
, orsubscriptionOptions
are are null.com.azure.core.exception.ResourceExistsException
- if a subscription exists with the same topic and subscription name.- See Also:
-
createSubscriptionWithResponse
public Mono<com.azure.core.http.rest.Response<SubscriptionProperties>> createSubscriptionWithResponse(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions) Creates a subscription and returns the created subscription in addition to the HTTP response.- Parameters:
topicName
- Name of the topic associated with subscription.subscriptionName
- Name of the subscription.subscriptionOptions
- Information about the subscription to create.- Returns:
- A Mono that returns the created subscription in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
are are empty strings.NullPointerException
- iftopicName
,subscriptionName
, orsubscriptionOptions
are are null.com.azure.core.exception.ResourceExistsException
- if a subscription exists with the same topic and subscription name.- See Also:
-
createTopic
Creates a topic with the given name.- Parameters:
topicName
- Name of the topic to create.- Returns:
- A Mono that completes with information about the created topic.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the topic quota is exceeded, or an error occurred processing the request.NullPointerException
- iftopicName
is null.IllegalArgumentException
- iftopicName
is an empty string.com.azure.core.exception.ResourceExistsException
- if a topic exists with the sametopicName
.- See Also:
-
createTopic
Creates a topic with theCreateTopicOptions
.- Parameters:
topicName
- Name of the topic to create.topicOptions
- The options used to create the topic.- Returns:
- A Mono that completes with information about the created topic.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the topic quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
ortopicOptions
is null.com.azure.core.exception.ResourceExistsException
- if a topic exists with the sametopicName
.- See Also:
-
createTopicWithResponse
public Mono<com.azure.core.http.rest.Response<TopicProperties>> createTopicWithResponse(String topicName, CreateTopicOptions topicOptions) Creates a topic and returns the created topic in addition to the HTTP response.- Parameters:
topicName
- Name of the topic to create.topicOptions
- The options used to create the topic.- Returns:
- A Mono that returns the created topic in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the topic quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopic.getName()
is null or an empty string.NullPointerException
- iftopicName
ortopicOptions
is null.com.azure.core.exception.ResourceExistsException
- if a topic exists with the sametopicName
.- See Also:
-
deleteQueue
Deletes a queue the matchingqueueName
.- Parameters:
queueName
- Name of queue to delete.- Returns:
- A Mono that completes when the queue is deleted.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.NullPointerException
- ifqueueName
is null.IllegalArgumentException
- ifqueueName
is an empty string.com.azure.core.exception.ResourceNotFoundException
- if thequeueName
does not exist.- See Also:
-
deleteQueueWithResponse
Deletes a queue the matchingqueueName
and returns the HTTP response.- Parameters:
queueName
- Name of queue to delete.- Returns:
- A Mono that completes when the queue is deleted and returns the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.NullPointerException
- ifqueueName
is null.IllegalArgumentException
- ifqueueName
is an empty string.com.azure.core.exception.ResourceNotFoundException
- if thequeueName
does not exist.- See Also:
-
deleteRule
Deletes a rule the matchingruleName
.- Parameters:
topicName
- Name of topic associated with rule to delete.subscriptionName
- Name of the subscription associated with the rule to delete.ruleName
- Name of rule to delete.- Returns:
- A Mono that completes when the rule is deleted.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
orruleName
is an empty string.NullPointerException
- iftopicName
orruleName
is null.com.azure.core.exception.ResourceNotFoundException
- if theruleName
does not exist.
-
deleteRuleWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> deleteRuleWithResponse(String topicName, String subscriptionName, String ruleName) Deletes a rule the matchingruleName
and returns the HTTP response.- Parameters:
topicName
- Name of topic associated with rule to delete.subscriptionName
- Name of the subscription associated with the rule to delete.ruleName
- Name of rule to delete.- Returns:
- A Mono that completes when the rule is deleted and returns the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
,subscriptionName
, orruleName
is an empty string.NullPointerException
- iftopicName
,subscriptionName
, orruleName
is null.com.azure.core.exception.ResourceNotFoundException
- if theruleName
does not exist.
-
deleteSubscription
Deletes a subscription the matchingsubscriptionName
.- Parameters:
topicName
- Name of topic associated with subscription to delete.subscriptionName
- Name of subscription to delete.- Returns:
- A Mono that completes when the subscription is deleted.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
is an empty string.NullPointerException
- iftopicName
orsubscriptionName
is null.com.azure.core.exception.ResourceNotFoundException
- if thesubscriptionName
does not exist.- See Also:
-
deleteSubscriptionWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> deleteSubscriptionWithResponse(String topicName, String subscriptionName) Deletes a subscription the matchingsubscriptionName
and returns the HTTP response.- Parameters:
topicName
- Name of topic associated with subscription to delete.subscriptionName
- Name of subscription to delete.- Returns:
- A Mono that completes when the subscription is deleted and returns the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
is an empty string.NullPointerException
- iftopicName
orsubscriptionName
is null.com.azure.core.exception.ResourceNotFoundException
- if thesubscriptionName
does not exist.- See Also:
-
deleteTopic
Deletes a topic the matchingtopicName
.- Parameters:
topicName
- Name of topic to delete.- Returns:
- A Mono that completes when the topic is deleted.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.com.azure.core.exception.ResourceNotFoundException
- if thetopicName
does not exist.- See Also:
-
deleteTopicWithResponse
Deletes a topic the matchingtopicName
and returns the HTTP response.- Parameters:
topicName
- Name of topic to delete.- Returns:
- A Mono that completes when the topic is deleted and returns the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.com.azure.core.exception.ResourceNotFoundException
- if thetopicName
does not exist.- See Also:
-
getQueue
Gets information about the queue.- Parameters:
queueName
- Name of queue to get information about.- Returns:
- A Mono that completes with information about the queue.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
is null.com.azure.core.exception.ResourceNotFoundException
- if thequeueName
does not exist.- See Also:
-
getQueueWithResponse
public Mono<com.azure.core.http.rest.Response<QueueProperties>> getQueueWithResponse(String queueName) Gets information about the queue along with its HTTP response.- Parameters:
queueName
- Name of queue to get information about.- Returns:
- A Mono that completes with information about the queue and the associated HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
is null.com.azure.core.exception.ResourceNotFoundException
- if thequeueName
does not exist.- See Also:
-
getQueueExists
Gets whether or not a queue withqueueName
exists in the Service Bus namespace.- Parameters:
queueName
- Name of the queue.- Returns:
- A Mono that completes indicating whether or not the queue exists.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
is null.
-
getQueueExistsWithResponse
public Mono<com.azure.core.http.rest.Response<Boolean>> getQueueExistsWithResponse(String queueName) Gets whether or not a queue withqueueName
exists in the Service Bus namespace.- Parameters:
queueName
- Name of the queue.- Returns:
- A Mono that completes indicating whether or not the queue exists along with its HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
is null.
-
getQueueRuntimeProperties
Gets runtime properties about the queue.- Parameters:
queueName
- Name of queue to get information about.- Returns:
- A Mono that completes with runtime properties about the queue.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
is null.com.azure.core.exception.ResourceNotFoundException
- if thequeueName
does not exist.- See Also:
-
getQueueRuntimePropertiesWithResponse
public Mono<com.azure.core.http.rest.Response<QueueRuntimeProperties>> getQueueRuntimePropertiesWithResponse(String queueName) Gets runtime properties about the queue along with its HTTP response.- Parameters:
queueName
- Name of queue to get information about.- Returns:
- A Mono that completes with runtime properties about the queue and the associated HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifqueueName
is an empty string.NullPointerException
- ifqueueName
is null.com.azure.core.exception.ResourceNotFoundException
- if thequeueName
does not exist.- See Also:
-
getNamespaceProperties
Gets information about the Service Bus namespace.- Returns:
- A Mono that completes with information about the Service Bus namespace.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.
-
getNamespacePropertiesWithResponse
public Mono<com.azure.core.http.rest.Response<NamespaceProperties>> getNamespacePropertiesWithResponse()Gets information about the Service Bus namespace along with its HTTP response.- Returns:
- A Mono that completes with information about the namespace and the associated HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.
-
getRule
Gets a rule from the service namespace. Only following data types are deserialized in Filters and Action parameters - string, int, long, boolean, double, and OffsetDateTime. Other data types would return its string value.- Parameters:
topicName
- The name of the topic relative to service bus namespace.subscriptionName
- The subscription name the rule belongs to.ruleName
- The name of the rule to retrieve.- Returns:
- The associated rule.
-
getRuleWithResponse
public Mono<com.azure.core.http.rest.Response<RuleProperties>> getRuleWithResponse(String topicName, String subscriptionName, String ruleName) Gets a rule from the service namespace. Only following data types are deserialized in Filters and Action parameters - string, int, long, bool, double, and OffsetDateTime. Other data types would return its string value.- Parameters:
topicName
- The name of the topic relative to service bus namespace.subscriptionName
- The subscription name the rule belongs to.ruleName
- The name of the rule to retrieve.- Returns:
- The associated rule with the corresponding HTTP response.
-
getSubscription
Gets information about the queue.- Parameters:
topicName
- Name of topic associated with subscription.subscriptionName
- Name of subscription to get information about.- Returns:
- A Mono that completes with information about the subscription.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
are empty strings.NullPointerException
- iftopicName
orsubscriptionName
are null.com.azure.core.exception.ResourceNotFoundException
- if thesubscriptionName
does not exist in thetopicName
.- See Also:
-
getSubscriptionWithResponse
public Mono<com.azure.core.http.rest.Response<SubscriptionProperties>> getSubscriptionWithResponse(String topicName, String subscriptionName) Gets information about the subscription along with its HTTP response.- Parameters:
topicName
- Name of topic associated with subscription.subscriptionName
- Name of subscription to get information about.- Returns:
- A Mono that completes with information about the subscription and the associated HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
are empty strings.NullPointerException
- iftopicName
orsubscriptionName
are null.com.azure.core.exception.ResourceNotFoundException
- if thesubscriptionName
does not exist.- See Also:
-
getSubscriptionExists
Gets whether or not a subscription within a topic exists.- Parameters:
topicName
- Name of topic associated with subscription.subscriptionName
- Name of the subscription.- Returns:
- A Mono that completes indicating whether or not the subscription exists.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifsubscriptionName
is an empty string.NullPointerException
- ifsubscriptionName
is null.
-
getSubscriptionExistsWithResponse
public Mono<com.azure.core.http.rest.Response<Boolean>> getSubscriptionExistsWithResponse(String topicName, String subscriptionName) Gets whether or not a subscription within a topic exists.- Parameters:
topicName
- Name of topic associated with subscription.subscriptionName
- Name of the subscription.- Returns:
- A Mono that completes indicating whether or not the subscription exists along with its HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifsubscriptionName
is an empty string.NullPointerException
- ifsubscriptionName
is null.
-
getSubscriptionRuntimeProperties
public Mono<SubscriptionRuntimeProperties> getSubscriptionRuntimeProperties(String topicName, String subscriptionName) Gets runtime properties about the subscription.- Parameters:
topicName
- Name of topic associated with subscription.subscriptionName
- Name of subscription to get information about.- Returns:
- A Mono that completes with runtime properties about the subscription.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
orsubscriptionName
are empty strings.NullPointerException
- iftopicName
orsubscriptionName
are null.com.azure.core.exception.ResourceNotFoundException
- if thesubscriptionName
does not exist.- See Also:
-
getSubscriptionRuntimePropertiesWithResponse
public Mono<com.azure.core.http.rest.Response<SubscriptionRuntimeProperties>> getSubscriptionRuntimePropertiesWithResponse(String topicName, String subscriptionName) Gets runtime properties about the subscription.- Parameters:
topicName
- Name of topic associated with subscription.subscriptionName
- Name of subscription to get information about.- Returns:
- A Mono that completes with runtime properties about the subscription.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- ifsubscriptionName
is an empty string.NullPointerException
- ifsubscriptionName
is null.com.azure.core.exception.ResourceNotFoundException
- if thesubscriptionName
does not exist.- See Also:
-
getTopic
Gets information about the topic.- Parameters:
topicName
- Name of topic to get information about.- Returns:
- A Mono that completes with information about the topic.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.com.azure.core.exception.ResourceNotFoundException
- if thetopicName
does not exist.- See Also:
-
getTopicWithResponse
public Mono<com.azure.core.http.rest.Response<TopicProperties>> getTopicWithResponse(String topicName) Gets information about the topic along with its HTTP response.- Parameters:
topicName
- Name of topic to get information about.- Returns:
- A Mono that completes with information about the topic and the associated HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.com.azure.core.exception.ResourceNotFoundException
- if thetopicName
does not exist.- See Also:
-
getTopicExists
Gets whether or not a topic withtopicName
exists in the Service Bus namespace.- Parameters:
topicName
- Name of the topic.- Returns:
- A Mono that completes indicating whether or not the topic exists.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.
-
getTopicExistsWithResponse
public Mono<com.azure.core.http.rest.Response<Boolean>> getTopicExistsWithResponse(String topicName) Gets whether or not a topic withtopicName
exists in the Service Bus namespace.- Parameters:
topicName
- Name of the topic.- Returns:
- A Mono that completes indicating whether or not the topic exists along with its HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.
-
getTopicRuntimeProperties
Gets runtime properties about the topic.- Parameters:
topicName
- Name of topic to get information about.- Returns:
- A Mono that completes with runtime properties about the topic.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.com.azure.core.exception.ResourceNotFoundException
- if thetopicName
does not exist.- See Also:
-
getTopicRuntimePropertiesWithResponse
public Mono<com.azure.core.http.rest.Response<TopicRuntimeProperties>> getTopicRuntimePropertiesWithResponse(String topicName) Gets runtime properties about the topic with its HTTP response.- Parameters:
topicName
- Name of topic to get information about.- Returns:
- A Mono that completes with runtime properties about the topic and the associated HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If error occurred processing the request.IllegalArgumentException
- iftopicName
is an empty string.NullPointerException
- iftopicName
is null.com.azure.core.exception.ResourceNotFoundException
- if thetopicName
does not exist.- See Also:
-
listQueues
Fetches all the queues in the Service Bus namespace.- Returns:
- A Flux of
queues
in the Service Bus namespace. - Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.- See Also:
-
listRules
public com.azure.core.http.rest.PagedFlux<RuleProperties> listRules(String topicName, String subscriptionName) Fetches all the rules for a topic and subscription.- Parameters:
topicName
- The topic name under which all the rules need to be retrieved.subscriptionName
- The name of the subscription for which all rules need to be retrieved.- Returns:
- A Flux of
rules
for thetopicName
andsubscriptionName
. - Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.NullPointerException
- iftopicName
orsubscriptionName
is null.IllegalArgumentException
- iftopicName
orsubscriptionName
is an empty string.- See Also:
-
listSubscriptions
public com.azure.core.http.rest.PagedFlux<SubscriptionProperties> listSubscriptions(String topicName) Fetches all the subscriptions for a topic.- Parameters:
topicName
- The topic name under which all the subscriptions need to be retrieved.- Returns:
- A Flux of
subscriptions
for thetopicName
. - Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.NullPointerException
- iftopicName
is null.IllegalArgumentException
- iftopicName
is an empty string.- See Also:
-
listTopics
Fetches all the topics in the Service Bus namespace.- Returns:
- A Flux of
topics
in the Service Bus namespace. - Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.- See Also:
-
updateQueue
Updates a queue with the givenQueueProperties
. TheQueueProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get queue description.
- Update the required elements.
- Pass the updated description into this method.
There are a subset of properties that can be updated. More information can be found in the links below. They are:
- Parameters:
queue
- Information about the queue to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that completes with the updated queue.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the queue quota is exceeded, or an error occurred processing the request.NullPointerException
- ifqueue
is null.- See Also:
-
updateQueueWithResponse
public Mono<com.azure.core.http.rest.Response<QueueProperties>> updateQueueWithResponse(QueueProperties queue) Updates a queue with the givenQueueProperties
. TheQueueProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get queue description.
- Update the required elements.
- Pass the updated description into this method.
There are a subset of properties that can be updated. More information can be found in the links below. They are:
- Parameters:
queue
- Information about the queue to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that returns the updated queue in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the queue quota is exceeded, or an error occurred processing the request.NullPointerException
- ifqueue
is null.- See Also:
-
updateRule
public Mono<RuleProperties> updateRule(String topicName, String subscriptionName, RuleProperties rule) Updates a rule with the givenRuleProperties
. TheRuleProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get rule description.
- Update the required elements.
- Pass the updated description into this method.
- Parameters:
topicName
- The topic name under which the rule is updated.subscriptionName
- The name of the subscription for which the rule is updated.rule
- Information about the rule to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that returns the updated rule.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the rule quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- ifRuleProperties.getName()
is null or an empty string.NullPointerException
- ifrule
is null.
-
updateRuleWithResponse
public Mono<com.azure.core.http.rest.Response<RuleProperties>> updateRuleWithResponse(String topicName, String subscriptionName, RuleProperties rule) Updates a rule with the givenRuleProperties
. TheRuleProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get rule description.
- Update the required elements.
- Pass the updated description into this method.
- Parameters:
topicName
- The topic name under which the rule is updated.subscriptionName
- The name of the subscription for which the rule is updated.rule
- Information about the rule to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that returns the updated rule in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the rule quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- ifRuleProperties.getName()
is null or an empty string.NullPointerException
- ifrule
is null.- See Also:
-
updateSubscription
Updates a subscription with the givenSubscriptionProperties
. TheSubscriptionProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get subscription description.
- Update the required elements.
- Pass the updated description into this method.
There are a subset of properties that can be updated. More information can be found in the links below. They are:
- Parameters:
subscription
- Information about the subscription to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that returns the updated subscription.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the subscription quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- ifSubscriptionProperties.getTopicName()
orSubscriptionProperties.getSubscriptionName()
is null or an empty string.NullPointerException
- ifsubscription
is null.- See Also:
-
updateSubscriptionWithResponse
public Mono<com.azure.core.http.rest.Response<SubscriptionProperties>> updateSubscriptionWithResponse(SubscriptionProperties subscription) Updates a subscription with the givenSubscriptionProperties
. TheSubscriptionProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get subscription description.
- Update the required elements.
- Pass the updated description into this method.
There are a subset of properties that can be updated. More information can be found in the links below. They are:
- Parameters:
subscription
- Information about the subscription to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that returns the updated subscription in addition to the HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the subscription quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- ifSubscriptionProperties.getTopicName()
orSubscriptionProperties.getSubscriptionName()
is null or an empty string.NullPointerException
- ifsubscription
is null.- See Also:
-
updateTopic
Updates a topic with the givenTopicProperties
. TheTopicProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get topic description.
- Update the required elements.
- Pass the updated description into this method.
There are a subset of properties that can be updated. More information can be found in the links below. They are:
- Parameters:
topic
- Information about the topic to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that completes with the updated topic.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the topic quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopic.getName()
is null or an empty string.NullPointerException
- iftopic
is null.- See Also:
-
updateTopicWithResponse
public Mono<com.azure.core.http.rest.Response<TopicProperties>> updateTopicWithResponse(TopicProperties topic) Updates a topic with the givenTopicProperties
. TheTopicProperties
must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:Get topic description.
- Update the required elements.
- Pass the updated description into this method.
There are a subset of properties that can be updated. More information can be found in the links below. They are:
- Parameters:
topic
- Information about the topic to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.- Returns:
- A Mono that completes with the updated topic and its HTTP response.
- Throws:
com.azure.core.exception.ClientAuthenticationException
- if the client's credentials do not have access to modify the namespace.com.azure.core.exception.HttpResponseException
- If the request body was invalid, the topic quota is exceeded, or an error occurred processing the request.IllegalArgumentException
- iftopic.getName()
is null or an empty string.NullPointerException
- iftopic
is null.- See Also:
-