public final class ServiceBusAdministrationClient extends Object
Create a queue
QueueProperties queue = client.createQueue("my-new-queue");
System.out.printf("Queue created. Name: %s. Lock Duration: %s.%n",
queue.getName(), queue.getLockDuration());
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.
SubscriptionProperties subscription = client.getSubscription("my-topic", "my-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.
SubscriptionProperties updated = client.updateSubscription(subscription);
System.out.printf("Subscription updated. Name: %s. Delivery count: %s.%n",
updated.getSubscriptionName(), updated.getMaxDeliveryCount());
List all queues
client.listQueues().forEach(queue -> {
System.out.printf("Queue [%s]. Lock Duration: %s.%n",
queue.getName(), queue.getLockDuration());
});
| Modifier and Type | Method and Description |
|---|---|
QueueProperties |
createQueue(String queueName)
Creates a queue with the given name.
|
QueueProperties |
createQueue(String queueName,
CreateQueueOptions queueOptions)
Creates a queue with the
CreateQueueOptions. |
com.azure.core.http.rest.Response<QueueProperties> |
createQueueWithResponse(String queueName,
CreateQueueOptions queueOptions,
com.azure.core.util.Context context)
Creates a queue and returns the created queue in addition to the HTTP response.
|
RuleProperties |
createRule(String topicName,
String subscriptionName,
String ruleName)
Creates a rule under the given topic and subscription
|
RuleProperties |
createRule(String topicName,
String ruleName,
String subscriptionName,
CreateRuleOptions ruleOptions)
Creates a rule with the
CreateRuleOptions. |
com.azure.core.http.rest.Response<RuleProperties> |
createRuleWithResponse(String topicName,
String subscriptionName,
String ruleName,
CreateRuleOptions ruleOptions,
com.azure.core.util.Context context)
Creates a rule and returns the created rule in addition to the HTTP response.
|
SubscriptionProperties |
createSubscription(String topicName,
String subscriptionName)
Creates a subscription with the given topic and subscription names.
|
SubscriptionProperties |
createSubscription(String topicName,
String subscriptionName,
CreateSubscriptionOptions subscriptionOptions)
Creates a subscription with the
SubscriptionProperties. |
com.azure.core.http.rest.Response<SubscriptionProperties> |
createSubscriptionWithResponse(String topicName,
String subscriptionName,
CreateSubscriptionOptions subscriptionOptions,
com.azure.core.util.Context context)
Creates a queue and returns the created queue in addition to the HTTP response.
|
TopicProperties |
createTopic(String topicName)
Creates a topic with the given name.
|
TopicProperties |
createTopic(String topicName,
CreateTopicOptions topicOptions)
Creates a topic with the
CreateTopicOptions. |
com.azure.core.http.rest.Response<TopicProperties> |
createTopicWithResponse(String topicName,
CreateTopicOptions topicOptions,
com.azure.core.util.Context context)
Creates a topic and returns the created topic in addition to the HTTP response.
|
void |
deleteQueue(String queueName)
Deletes a queue the matching
queueName. |
com.azure.core.http.rest.Response<Void> |
deleteQueueWithResponse(String queueName,
com.azure.core.util.Context context)
Deletes a queue the matching
queueName and returns the HTTP response. |
void |
deleteRule(String topicName,
String subscriptionName,
String ruleName)
Deletes a rule the matching
ruleName. |
com.azure.core.http.rest.Response<Void> |
deleteRuleWithResponse(String topicName,
String subscriptionName,
String ruleName,
com.azure.core.util.Context context)
Deletes a rule the matching
ruleName and returns the HTTP response. |
void |
deleteSubscription(String topicName,
String subscriptionName)
Deletes a subscription matching the
subscriptionName in topic topicName. |
com.azure.core.http.rest.Response<Void> |
deleteSubscriptionWithResponse(String topicName,
String subscriptionName,
com.azure.core.util.Context context)
Deletes a subscription the matching
subscriptionName and returns the HTTP response. |
void |
deleteTopic(String topicName)
Deletes a topic the matching
topicName. |
com.azure.core.http.rest.Response<Void> |
deleteTopicWithResponse(String topicName,
com.azure.core.util.Context context)
Deletes a topic the matching
topicName and returns the HTTP response. |
NamespaceProperties |
getNamespaceProperties()
Gets information about the Service Bus namespace.
|
com.azure.core.http.rest.Response<NamespaceProperties> |
getNamespacePropertiesWithResponse(com.azure.core.util.Context context)
Gets information about the Service Bus namespace along with its HTTP response.
|
QueueProperties |
getQueue(String queueName)
Gets information about the queue.
|
boolean |
getQueueExists(String queueName)
Gets whether or not a queue with
queueName exists in the Service Bus namespace. |
com.azure.core.http.rest.Response<Boolean> |
getQueueExistsWithResponse(String queueName,
com.azure.core.util.Context context)
Gets whether or not a queue with
queueName exists in the Service Bus namespace. |
QueueRuntimeProperties |
getQueueRuntimeProperties(String queueName)
Gets runtime properties about the queue.
|
com.azure.core.http.rest.Response<QueueRuntimeProperties> |
getQueueRuntimePropertiesWithResponse(String queueName,
com.azure.core.util.Context context)
Gets runtime properties about the queue along with its HTTP response.
|
com.azure.core.http.rest.Response<QueueProperties> |
getQueueWithResponse(String queueName,
com.azure.core.util.Context context)
Gets information about the queue along with its HTTP response.
|
RuleProperties |
getRule(String topicName,
String subscriptionName,
String ruleName)
Gets a rule from the service namespace.
|
com.azure.core.http.rest.Response<RuleProperties> |
getRuleWithResponse(String topicName,
String subscriptionName,
String ruleName,
com.azure.core.util.Context context)
Gets a rule from the service namespace.
|
SubscriptionProperties |
getSubscription(String topicName,
String subscriptionName)
Gets information about the queue.
|
boolean |
getSubscriptionExists(String topicName,
String subscriptionName)
Gets whether or not a subscription within a topic exists.
|
com.azure.core.http.rest.Response<Boolean> |
getSubscriptionExistsWithResponse(String topicName,
String subscriptionName,
com.azure.core.util.Context context)
Gets whether or not a subscription within a topic exists.
|
SubscriptionRuntimeProperties |
getSubscriptionRuntimeProperties(String topicName,
String subscriptionName)
Gets runtime properties about the subscription.
|
com.azure.core.http.rest.Response<SubscriptionRuntimeProperties> |
getSubscriptionRuntimePropertiesWithResponse(String topicName,
String subscriptionName,
com.azure.core.util.Context context)
Gets runtime properties about the subscription.
|
com.azure.core.http.rest.Response<SubscriptionProperties> |
getSubscriptionWithResponse(String topicName,
String subscriptionName,
com.azure.core.util.Context context)
Gets information about the subscription along with its HTTP response.
|
TopicProperties |
getTopic(String topicName)
Gets information about the topic.
|
boolean |
getTopicExists(String topicName)
Gets whether or not a topic with
topicName exists in the Service Bus namespace. |
com.azure.core.http.rest.Response<Boolean> |
getTopicExistsWithResponse(String topicName,
com.azure.core.util.Context context)
Gets whether or not a topic with
topicName exists in the Service Bus namespace. |
TopicRuntimeProperties |
getTopicRuntimeProperties(String topicName)
Gets runtime properties about the topic.
|
com.azure.core.http.rest.Response<TopicRuntimeProperties> |
getTopicRuntimePropertiesWithResponse(String topicName,
com.azure.core.util.Context context)
Gets runtime properties about the topic with its HTTP response.
|
com.azure.core.http.rest.Response<TopicProperties> |
getTopicWithResponse(String topicName,
com.azure.core.util.Context context)
Gets information about the topic along with its HTTP response.
|
com.azure.core.http.rest.PagedIterable<QueueProperties> |
listQueues()
Fetches all the queues in the Service Bus namespace.
|
com.azure.core.http.rest.PagedIterable<QueueProperties> |
listQueues(com.azure.core.util.Context context)
Fetches all the queues in the Service Bus namespace.
|
com.azure.core.http.rest.PagedIterable<RuleProperties> |
listRules(String topicName,
String subscriptionName)
Fetches all the rules for a topic and subscription.
|
com.azure.core.http.rest.PagedIterable<SubscriptionProperties> |
listSubscriptions(String topicName)
Fetches all the subscriptions for a topic.
|
com.azure.core.http.rest.PagedIterable<SubscriptionProperties> |
listSubscriptions(String topicName,
com.azure.core.util.Context context)
Fetches all the subscriptions for a topic.
|
com.azure.core.http.rest.PagedIterable<TopicProperties> |
listTopics()
Fetches all the topics in the Service Bus namespace.
|
com.azure.core.http.rest.PagedIterable<TopicProperties> |
listTopics(com.azure.core.util.Context context)
Fetches all the topics in the Service Bus namespace.
|
QueueProperties |
updateQueue(QueueProperties queue)
Updates a queue with the given
QueueProperties. |
com.azure.core.http.rest.Response<QueueProperties> |
updateQueueWithResponse(QueueProperties queue,
com.azure.core.util.Context context)
Updates a queue with the given
QueueProperties. |
RuleProperties |
updateRule(String topicName,
String subscriptionName,
RuleProperties rule)
Updates a rule with the given
RuleProperties. |
com.azure.core.http.rest.Response<RuleProperties> |
updateRuleWithResponse(String topicName,
String subscriptionName,
RuleProperties rule,
com.azure.core.util.Context context)
Updates a rule with the given
RuleProperties. |
SubscriptionProperties |
updateSubscription(SubscriptionProperties subscription)
Updates a subscription with the given
SubscriptionProperties. |
com.azure.core.http.rest.Response<SubscriptionProperties> |
updateSubscriptionWithResponse(SubscriptionProperties subscription,
com.azure.core.util.Context context)
Updates a subscription with the given
SubscriptionProperties. |
TopicProperties |
updateTopic(TopicProperties topic)
Updates a topic with the given
TopicProperties. |
com.azure.core.http.rest.Response<TopicProperties> |
updateTopicWithResponse(TopicProperties topic,
com.azure.core.util.Context context)
Updates a topic with the given
TopicProperties. |
public QueueProperties createQueue(String queueName)
queueName - Name of the queue to create.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 - if queueName is null.IllegalArgumentException - if queueName is an empty string.com.azure.core.exception.ResourceExistsException - if a queue exists with the same queueName.public QueueProperties createQueue(String queueName, CreateQueueOptions queueOptions)
CreateQueueOptions.queueName - Name of the queue to create.queueOptions - Information about the queue to create.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 - if queue is null.com.azure.core.exception.ResourceExistsException - if a queue exists with the same queueName.public com.azure.core.http.rest.Response<QueueProperties> createQueueWithResponse(String queueName, CreateQueueOptions queueOptions, com.azure.core.util.Context context)
queueName - Name of the queue to create.queueOptions - Information about the queue to create.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if queue is null.com.azure.core.exception.ResourceExistsException - if a queue exists with the same queueName.public RuleProperties createRule(String topicName, String subscriptionName, String ruleName)
topicName - Name of the topic associated with rule.subscriptionName - Name of the subscription associated with the rule.ruleName - Name of the rule.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 - if topicName or ruleName are are empty strings.NullPointerException - if topicName or ruleName are are null.com.azure.core.exception.ResourceExistsException - if a rule exists with the same topic, subscription, and rule name.public RuleProperties createRule(String topicName, String ruleName, String subscriptionName, CreateRuleOptions ruleOptions)
CreateRuleOptions.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.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 - if topicName or ruleName are are empty strings.NullPointerException - if topicName, ruleName, or ruleOptions are are null.com.azure.core.exception.ResourceExistsException - if a rule exists with the same topic and rule name.public com.azure.core.http.rest.Response<RuleProperties> createRuleWithResponse(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions, com.azure.core.util.Context context)
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.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName or ruleName are are empty strings.NullPointerException - if topicName, ruleName, or ruleOptions are are null.com.azure.core.exception.ResourceExistsException - if a rule exists with the same topic and rule name.public SubscriptionProperties createSubscription(String topicName, String subscriptionName)
topicName - Name of the topic associated with subscription.subscriptionName - Name of the subscription.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.NullPointerException - if topicName or subscriptionName are are empty strings.IllegalArgumentException - if topicName or subscriptionName are are null.com.azure.core.exception.ResourceExistsException - if a subscription exists with the same topic and subscription name.public SubscriptionProperties createSubscription(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions)
SubscriptionProperties.topicName - Name of the topic associated with subscription.subscriptionName - Name of the subscription.subscriptionOptions - Information about the subscription to create.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 - if topicName or subscriptionName are are empty strings.NullPointerException - if topicName, subscriptionName, or subscriptionOptions
are are null.com.azure.core.exception.ResourceExistsException - if a subscription exists with the same topic and subscription name.public com.azure.core.http.rest.Response<SubscriptionProperties> createSubscriptionWithResponse(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions, com.azure.core.util.Context context)
topicName - Name of the topic associated with subscription.subscriptionName - Name of the subscription.subscriptionOptions - Information about the subscription to create.context - Additional context that is passed through the HTTP pipeline during the service call.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.NullPointerException - if subscription is null.com.azure.core.exception.ResourceExistsException - if a subscription exists with the same topic and subscription name.public TopicProperties createTopic(String topicName)
topicName - Name of the topic to create.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 - if topicName is null.IllegalArgumentException - if topicName is an empty string.com.azure.core.exception.ResourceExistsException - if a topic exists with the same topicName.public TopicProperties createTopic(String topicName, CreateTopicOptions topicOptions)
CreateTopicOptions.topicName - Name of the topic to create.topicOptions - Information about the topic to create.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 topicOptions quota is exceeded, or an
error occurred processing the request.IllegalArgumentException - if topicName is an empty string.NullPointerException - if topicName or topicOptions is null.com.azure.core.exception.ResourceExistsException - if a topic exists with the same topicName.public com.azure.core.http.rest.Response<TopicProperties> createTopicWithResponse(String topicName, CreateTopicOptions topicOptions, com.azure.core.util.Context context)
topicName - Name of the topic to create.topicOptions - Information about the topic to create.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName is an empty string.NullPointerException - if topicName or topicOptions is null.com.azure.core.exception.ResourceExistsException - if a topic exists with the same topicName.public void deleteQueue(String queueName)
queueName.queueName - Name of queue to delete.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 - if queueName is an empty string.NullPointerException - if queueName is null.com.azure.core.exception.ResourceNotFoundException - if the queueName does not exist.public com.azure.core.http.rest.Response<Void> deleteQueueWithResponse(String queueName, com.azure.core.util.Context context)
queueName and returns the HTTP response.queueName - Name of queue to delete.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if queueName is an empty string.NullPointerException - if queueName is null.com.azure.core.exception.ResourceNotFoundException - if the queueName does not exist.public void deleteRule(String topicName, String subscriptionName, String ruleName)
ruleName.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.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 - if topicName or ruleName is an empty string.NullPointerException - if topicName or ruleName is null.com.azure.core.exception.ResourceNotFoundException - if the ruleName does not exist.public com.azure.core.http.rest.Response<Void> deleteRuleWithResponse(String topicName, String subscriptionName, String ruleName, com.azure.core.util.Context context)
ruleName and returns the HTTP response.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.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName, subscriptionName, or ruleName is an
empty string.NullPointerException - if topicName, subscriptionName, or ruleName is null.com.azure.core.exception.ResourceNotFoundException - if the ruleName does not exist.public void deleteSubscription(String topicName, String subscriptionName)
subscriptionName in topic topicName.topicName - Name of topic associated with subscription to delete.subscriptionName - Name of subscription to delete.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 - if topicName or subscriptionName is an empty string.NullPointerException - if topicName or subscriptionName is null.com.azure.core.exception.ResourceNotFoundException - if the subscriptionName does not exist.public com.azure.core.http.rest.Response<Void> deleteSubscriptionWithResponse(String topicName, String subscriptionName, com.azure.core.util.Context context)
subscriptionName and returns the HTTP response.topicName - Name of topic associated with subscription to delete.subscriptionName - Name of subscription to delete.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName or subscriptionName is an empty string.NullPointerException - if topicName or subscriptionName is null.com.azure.core.exception.ResourceNotFoundException - if the subscriptionName does not exist.public void deleteTopic(String topicName)
topicName.topicName - Name of topic to delete.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 - if topicName is an empty string.NullPointerException - if topicName is null.com.azure.core.exception.ResourceNotFoundException - if the topicName does not exist.public com.azure.core.http.rest.Response<Void> deleteTopicWithResponse(String topicName, com.azure.core.util.Context context)
topicName and returns the HTTP response.topicName - Name of topic to delete.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName is an empty string.NullPointerException - if topicName is null.com.azure.core.exception.ResourceNotFoundException - if the topicName does not exist.public QueueProperties getQueue(String queueName)
queueName - Name of queue to get information about.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 - if queueName is an empty string.NullPointerException - if queueName is null.com.azure.core.exception.ResourceNotFoundException - if the queueName does not exist.public com.azure.core.http.rest.Response<QueueProperties> getQueueWithResponse(String queueName, com.azure.core.util.Context context)
queueName - Name of queue to get information about.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if queueName is an empty string.NullPointerException - if queueName is null.com.azure.core.exception.ResourceNotFoundException - if the queueName does not exist.public boolean getQueueExists(String queueName)
queueName exists in the Service Bus namespace.queueName - Name of the queue.true if the queue exists; otherwise false.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 - if queueName is an empty string.NullPointerException - if queueName is null.public com.azure.core.http.rest.Response<Boolean> getQueueExistsWithResponse(String queueName, com.azure.core.util.Context context)
queueName exists in the Service Bus namespace.queueName - Name of the queue.context - Additional context that is passed through the HTTP pipeline during the service call.true if the queue exists; otherwise false.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 - if queueName is an empty string.NullPointerException - if queueName is null.public QueueRuntimeProperties getQueueRuntimeProperties(String queueName)
queueName - Name of queue to get information about.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 - if queueName is an empty string.NullPointerException - if queueName is null.com.azure.core.exception.ResourceNotFoundException - if the queueName does not exist.public com.azure.core.http.rest.Response<QueueRuntimeProperties> getQueueRuntimePropertiesWithResponse(String queueName, com.azure.core.util.Context context)
queueName - Name of queue to get information about.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if queueName is an empty string.NullPointerException - if queueName is null.com.azure.core.exception.ResourceNotFoundException - if the queueName does not exist.public NamespaceProperties getNamespaceProperties()
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.public com.azure.core.http.rest.Response<NamespaceProperties> getNamespacePropertiesWithResponse(com.azure.core.util.Context context)
context - Additional context that is passed through the HTTP pipeline during the service call.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.public RuleProperties getRule(String topicName, String subscriptionName, String ruleName)
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.public com.azure.core.http.rest.Response<RuleProperties> getRuleWithResponse(String topicName, String subscriptionName, String ruleName, com.azure.core.util.Context context)
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.context - Additional context that is passed through the HTTP pipeline during the service call.public SubscriptionProperties getSubscription(String topicName, String subscriptionName)
topicName - Name of topic associated with subscription.subscriptionName - Name of subscription to get information about.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 - if topicName or subscriptionName are empty strings.NullPointerException - if topicName or subscriptionName are null.com.azure.core.exception.ResourceNotFoundException - if the subscriptionName does not exist in the topicName.public com.azure.core.http.rest.Response<SubscriptionProperties> getSubscriptionWithResponse(String topicName, String subscriptionName, com.azure.core.util.Context context)
topicName - Name of topic associated with subscription.subscriptionName - Name of subscription to get information about.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName or subscriptionName are empty strings.NullPointerException - if topicName or subscriptionName are null.com.azure.core.exception.ResourceNotFoundException - if the subscriptionName does not exist.public boolean getSubscriptionExists(String topicName, String subscriptionName)
topicName - Name of topic associated with subscription.subscriptionName - Name of the subscription.true if the subscription exists.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 - if subscriptionName is an empty string.NullPointerException - if subscriptionName is null.public com.azure.core.http.rest.Response<Boolean> getSubscriptionExistsWithResponse(String topicName, String subscriptionName, com.azure.core.util.Context context)
topicName - Name of topic associated with subscription.subscriptionName - Name of the subscription.context - Additional context that is passed through the HTTP pipeline during the service call.true if the subscription exists; otherwise false.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 - if subscriptionName is an empty string.NullPointerException - if subscriptionName is null.public SubscriptionRuntimeProperties getSubscriptionRuntimeProperties(String topicName, String subscriptionName)
topicName - Name of topic associated with subscription.subscriptionName - Name of subscription to get information about.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 - if subscriptionName is an empty string.NullPointerException - if subscriptionName is null.com.azure.core.exception.ResourceNotFoundException - if the subscriptionName does not exist.public com.azure.core.http.rest.Response<SubscriptionRuntimeProperties> getSubscriptionRuntimePropertiesWithResponse(String topicName, String subscriptionName, com.azure.core.util.Context context)
topicName - Name of topic associated with subscription.subscriptionName - Name of subscription to get information about.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if subscriptionName is an empty string.NullPointerException - if subscriptionName is null.com.azure.core.exception.ResourceNotFoundException - if the subscriptionName does not exist.public TopicProperties getTopic(String topicName)
topicName - Name of topic to get information about.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 - if topicName is an empty string.NullPointerException - if topicName is null.com.azure.core.exception.ResourceNotFoundException - if the topicName does not exist.public com.azure.core.http.rest.Response<TopicProperties> getTopicWithResponse(String topicName, com.azure.core.util.Context context)
topicName - Name of topic to get information about.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName is an empty string.NullPointerException - if topicName is null.com.azure.core.exception.ResourceNotFoundException - if the topicName does not exist.public boolean getTopicExists(String topicName)
topicName exists in the Service Bus namespace.topicName - Name of the topic.true if the topic exists.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 - if topicName is an empty string.NullPointerException - if topicName is null.public com.azure.core.http.rest.Response<Boolean> getTopicExistsWithResponse(String topicName, com.azure.core.util.Context context)
topicName exists in the Service Bus namespace.topicName - Name of the topic.context - Additional context that is passed through the HTTP pipeline during the service call.true if the topic exists; otherwise false.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 - if topicName is an empty string.NullPointerException - if topicName is null.public TopicRuntimeProperties getTopicRuntimeProperties(String topicName)
topicName - Name of topic to get information about.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 - if topicName is an empty string.NullPointerException - if topicName is null.com.azure.core.exception.ResourceNotFoundException - if the topicName does not exist.public com.azure.core.http.rest.Response<TopicRuntimeProperties> getTopicRuntimePropertiesWithResponse(String topicName, com.azure.core.util.Context context)
topicName - Name of topic to get information about.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topicName is an empty string.NullPointerException - if topicName is null.com.azure.core.exception.ResourceNotFoundException - if the topicName does not exist.public com.azure.core.http.rest.PagedIterable<QueueProperties> listQueues()
queues in the Service Bus namespace.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.public com.azure.core.http.rest.PagedIterable<QueueProperties> listQueues(com.azure.core.util.Context context)
context - Additional context that is passed through the HTTP pipeline during the service call.queues in the Service Bus namespace.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.public com.azure.core.http.rest.PagedIterable<RuleProperties> listRules(String topicName, String subscriptionName)
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.rules for the topicName and subscriptionName.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.NullPointerException - if topicName or subscriptionName is null.IllegalArgumentException - if topicName or subscriptionName is an empty string.public com.azure.core.http.rest.PagedIterable<SubscriptionProperties> listSubscriptions(String topicName)
topicName - The topic name under which all the subscriptions need to be retrieved.subscriptions for the topicName.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.NullPointerException - if topicName is null.IllegalArgumentException - if topicName is an empty string.public com.azure.core.http.rest.PagedIterable<SubscriptionProperties> listSubscriptions(String topicName, com.azure.core.util.Context context)
topicName - The topic name under which all the subscriptions need to be retrieved.context - Additional context that is passed through the HTTP pipeline during the service call.subscriptions for the topicName.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.NullPointerException - if topicName is null.IllegalArgumentException - if topicName is an empty string.public com.azure.core.http.rest.PagedIterable<TopicProperties> listTopics()
topics in the Service Bus namespace.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.public com.azure.core.http.rest.PagedIterable<TopicProperties> listTopics(com.azure.core.util.Context context)
context - Additional context that is passed through the HTTP pipeline during the service call.topics in the Service Bus namespace.com.azure.core.exception.ClientAuthenticationException - if the client's credentials do not have access to modify the
namespace.public QueueProperties updateQueue(QueueProperties queue)
QueueProperties. The QueueProperties 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.There are a subset of properties that can be updated. More information can be found in the links below. They are:
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.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 - if queue is null.public com.azure.core.http.rest.Response<QueueProperties> updateQueueWithResponse(QueueProperties queue, com.azure.core.util.Context context)
QueueProperties. The QueueProperties 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.There are a subset of properties that can be updated. More information can be found in the links below. They are:
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.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if queue is null.public RuleProperties updateRule(String topicName, String subscriptionName, RuleProperties rule)
RuleProperties. The RuleProperties 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.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.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 - if RuleProperties.getName() is null or an empty string.NullPointerException - if rule is null.public com.azure.core.http.rest.Response<RuleProperties> updateRuleWithResponse(String topicName, String subscriptionName, RuleProperties rule, com.azure.core.util.Context context)
RuleProperties. The RuleProperties 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.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.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if RuleProperties.getName() is null or an empty string.NullPointerException - if rule is null.public SubscriptionProperties updateSubscription(SubscriptionProperties subscription)
SubscriptionProperties. The SubscriptionProperties 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.There are a subset of properties that can be updated. More information can be found in the links below. They are:
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.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 - if SubscriptionProperties.getTopicName() or SubscriptionProperties.getSubscriptionName() is null or an empty string.NullPointerException - if subscription is null.public com.azure.core.http.rest.Response<SubscriptionProperties> updateSubscriptionWithResponse(SubscriptionProperties subscription, com.azure.core.util.Context context)
SubscriptionProperties. The SubscriptionProperties 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.There are a subset of properties that can be updated. More information can be found in the links below. They are:
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.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if SubscriptionProperties.getTopicName() or SubscriptionProperties.getSubscriptionName() is null or an empty string.NullPointerException - if subscription is null.public TopicProperties updateTopic(TopicProperties topic)
TopicProperties. The TopicProperties 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.There are a subset of properties that can be updated. More information can be found in the links below. They are:
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.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 - if topic.getName() is null or an empty
string.NullPointerException - if topic is null.public com.azure.core.http.rest.Response<TopicProperties> updateTopicWithResponse(TopicProperties topic, com.azure.core.util.Context context)
TopicProperties. The TopicProperties 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.There are a subset of properties that can be updated. More information can be found in the links below. They are:
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.context - Additional context that is passed through the HTTP pipeline during the service call.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 - if topic.getName() is null or an empty
string.NullPointerException - if topic is null.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.