Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServiceBusAdministrationClient

Package version

All operations return promises that resolve to an object that has the relevant output. These objects also have a property called _response that you can use if you want to access the direct response from the service.

Hierarchy

  • any
    • ServiceBusAdministrationClient

Index

Constructors

constructor

Methods

createQueue

  • Creates a queue with given name, configured using the given options

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityAlreadyExistsError when requested messaging entity already exists,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code QuotaExceededError when requested operation fails due to quote limits exceeding from service side,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • queueName: string
    • Optional options: CreateQueueOptions

      Options to configure the Queue being created(For example, you can configure a queue to support partitions or sessions) and the operation options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<QueueProperties>>

createRule

  • Creates a rule with given name, configured using the given options.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityAlreadyExistsError when requested messaging entity already exists,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code QuotaExceededError when requested operation fails due to quote limits exceeding from service side,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • ruleName: string
    • ruleFilter: SqlRuleFilter | CorrelationRuleFilter

      Defines the filter expression that the rule evaluates.

    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<RuleProperties>>

  • Creates a rule with given name, configured using the given options.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityAlreadyExistsError when requested messaging entity already exists,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code QuotaExceededError when requested operation fails due to quote limits exceeding from service side,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • ruleName: string
    • ruleFilter: SqlRuleFilter | CorrelationRuleFilter

      Defines the filter expression that the rule evaluates.

    • ruleAction: SqlRuleAction

      The SQL like expression that can be executed on the message should the associated filter apply.

    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<RuleProperties>>

createSubscription

  • Creates a subscription with given name, configured using the given options

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityAlreadyExistsError when requested messaging entity already exists,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code QuotaExceededError when requested operation fails due to quote limits exceeding from service side,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • Optional options: CreateSubscriptionOptions

      Options to configure the Subscription being created(For example, you can configure a Subscription to support partitions or sessions) and the operation options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<SubscriptionProperties>>

createTopic

  • Creates a topic with given name, configured using the given options

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityAlreadyExistsError when requested messaging entity already exists,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code QuotaExceededError when requested operation fails due to quote limits exceeding from service side,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • Optional options: CreateTopicOptions

      Options to configure the Topic being created(For example, you can configure a topic to support partitions) and the operation options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<TopicProperties>>

deleteQueue

  • deleteQueue(queueName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>
  • Deletes a queue.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • queueName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<{}>>

deleteRule

  • deleteRule(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>
  • Deletes a rule.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • ruleName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<{}>>

deleteSubscription

  • deleteSubscription(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>
  • Deletes a subscription.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<{}>>

deleteTopic

  • deleteTopic(topicName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>
  • Deletes a topic.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<{}>>

getNamespaceProperties

getQueue

  • Returns an object representing the Queue and its properties. If you want to get the Queue runtime info like message count details, use getQueueRuntimeProperties API.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • queueName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<QueueProperties>>

getQueueRuntimeProperties

  • Returns an object representing the Queue runtime info like message count details.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • queueName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<QueueRuntimeProperties>>

getRule

  • getRule(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<WithResponse<RuleProperties>>
  • Returns an object representing the Rule with the given name along with all its properties.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • ruleName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<RuleProperties>>

getSubscription

  • Returns an object representing the Subscription and its properties. If you want to get the Subscription runtime info like message count details, use getSubscriptionRuntimeProperties API.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<SubscriptionProperties>>

getSubscriptionRuntimeProperties

  • Returns an object representing the Subscription runtime info like message count details.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<SubscriptionRuntimeProperties>>

getTopic

  • Returns an object representing the Topic and its properties. If you want to get the Topic runtime info like subscription count details, use getTopicRuntimeProperties API.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<TopicProperties>>

getTopicRuntimeProperties

  • Returns an object representing the Topic runtime info like subscription count.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<TopicRuntimeProperties>>

listQueues

listQueuesRuntimeProperties

listRules

listSubscriptions

listSubscriptionsRuntimeProperties

listTopics

listTopicsRuntimeProperties

queueExists

  • queueExists(queueName: string, operationOptions?: OperationOptions): Promise<boolean>

ruleExists

  • ruleExists(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<boolean>

subscriptionExists

  • subscriptionExists(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<boolean>

topicExists

  • topicExists(topicName: string, operationOptions?: OperationOptions): Promise<boolean>

updateQueue

  • Updates the queue based on the queue properties provided. All queue properties must be set even though only a subset of them are actually updatable. Therefore, the suggested flow is to use the output from getQueue(), update the desired properties in it, and then pass the modified object to updateQueue().

    The properties that cannot be updated are marked as readonly in the QueueProperties interface.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • queue: WithResponse<QueueProperties>

      Object representing the properties of the queue and the raw response. requiresSession, requiresDuplicateDetection, enablePartitioning, and name can't be updated after creating the queue.

    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<QueueProperties>>

updateRule

  • Updates properties on the Rule by the given name based on the given options. All rule properties must be set even if one of them is being updated. Therefore, the suggested flow is to use the output from getRule(), update the desired properties in it, and then pass the modified object to updateRule().

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topicName: string
    • subscriptionName: string
    • rule: WithResponse<RuleProperties>

      Options to configure the Rule being updated and the raw response. For example, you can configure the filter to apply on associated Topic/Subscription.

    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<RuleProperties>>

updateSubscription

  • Updates the subscription based on the subscription properties provided. All subscription properties must be set even though only a subset of them are actually updatable. Therefore, the suggested flow is to use the output from getSubscription(), update the desired properties in it, and then pass the modified object to updateSubscription().

    The properties that cannot be updated are marked as readonly in the SubscriptionProperties interface.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • subscription: WithResponse<SubscriptionProperties>

      Object representing the properties of the subscription and the raw response. subscriptionName, topicName, and requiresSession can't be updated after creating the subscription.

    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<SubscriptionProperties>>

updateTopic

  • Updates the topic based on the topic properties provided. All topic properties must be set even though only a subset of them are actually updatable. Therefore, the suggested flow is to use the output from getTopic(), update the desired properties in it, and then pass the modified object to updateTopic().

    The properties that cannot be updated are marked as readonly in the TopicProperties interface.

    throws

    RestError with code UnauthorizedRequestError when given request fails due to authorization problems,

    throws

    RestError with code MessageEntityNotFoundError when requested messaging entity does not exist,

    throws

    RestError with code InvalidOperationError when requested operation is invalid and we encounter a 403 HTTP status code,

    throws

    RestError with code ServerBusyError when the request fails due to server being busy,

    throws

    RestError with code ServiceError when receiving unrecognized HTTP status or for a scenarios such as bad requests or requests resulting in conflicting operation on the server,

    throws

    RestError with code and statusCode representing the standard set of REST API errors.

    Parameters

    • topic: WithResponse<TopicProperties>

      Object representing the properties of the topic and the raw response. requiresDuplicateDetection, enablePartitioning, and name can't be updated after creating the topic.

    • Optional operationOptions: OperationOptions

      The options that can be used to abort, trace and control other configurations on the HTTP request.

      Following are errors that can be expected from this operation

    Returns Promise<WithResponse<TopicProperties>>

Generated using TypeDoc