Subscriptions - Get
Returns a subscription description for the specified topic.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}?api-version=2024-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
namespace
|
path | True |
string minLength: 6maxLength: 50 |
The namespace name |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
subscription
|
path | True |
string minLength: 1maxLength: 50 |
The subscription name. |
topic
|
path | True |
string minLength: 1 |
The topic name. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved subscription description. |
|
Other Status Codes |
ServiceBus error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
SubscriptionGet
Sample request
Sample response
{
"id": "/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178",
"name": "sdk-Subscriptions-2178",
"type": "Microsoft.ServiceBus/Namespaces/Topics/Subscriptions",
"properties": {
"lockDuration": "PT1M",
"requiresSession": false,
"defaultMessageTimeToLive": "P10675199DT2H48M5.4775807S",
"deadLetteringOnMessageExpiration": true,
"deadLetteringOnFilterEvaluationExceptions": true,
"messageCount": 0,
"maxDeliveryCount": 10,
"status": "Active",
"enableBatchedOperations": true,
"createdAt": "2021-01-04T18:02:20.5992764Z",
"updatedAt": "2021-01-04T18:02:20.5992764Z",
"accessedAt": "2021-01-04T18:02:20.5992764Z",
"countDetails": {
"activeMessageCount": 0,
"deadLetterMessageCount": 0,
"scheduledMessageCount": 0,
"transferMessageCount": 0,
"transferDeadLetterMessageCount": 0
},
"autoDeleteOnIdle": "P10675199DT2H48M5.4775807S",
"forwardTo": "sdk-Topics-3065",
"forwardDeadLetteredMessagesTo": "sdk-Topics-3065"
}
}
Definitions
Name | Description |
---|---|
created |
The type of identity that created the resource. |
Entity |
Entity status. |
Error |
The error object. |
Error |
The resource management error additional info. |
Error |
The resource management error response. |
Message |
Message Count Details. |
SBClient |
Properties specific to client affine subscriptions. |
SBSubscription |
Description of subscription resource. |
system |
Metadata pertaining to creation and last modification of the resource. |
createdByType
The type of identity that created the resource.
Value | Description |
---|---|
User | |
Application | |
ManagedIdentity | |
Key |
EntityStatus
Entity status.
Value | Description |
---|---|
Active | |
Disabled | |
Restoring | |
SendDisabled | |
ReceiveDisabled | |
Creating | |
Deleting | |
Renaming | |
Unknown |
Error
The error object.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorResponse
The resource management error response.
Name | Type | Description |
---|---|---|
error |
The error object. |
MessageCountDetails
Message Count Details.
Name | Type | Description |
---|---|---|
activeMessageCount |
integer (int64) |
Number of active messages in the queue, topic, or subscription. |
deadLetterMessageCount |
integer (int64) |
Number of messages that are dead lettered. |
scheduledMessageCount |
integer (int64) |
Number of scheduled messages. |
transferDeadLetterMessageCount |
integer (int64) |
Number of messages transferred into dead letters. |
transferMessageCount |
integer (int64) |
Number of messages transferred to another queue, topic, or subscription. |
SBClientAffineProperties
Properties specific to client affine subscriptions.
Name | Type | Description |
---|---|---|
clientId |
string |
Indicates the Client ID of the application that created the client-affine subscription. |
isDurable |
boolean |
For client-affine subscriptions, this value indicates whether the subscription is durable or not. |
isShared |
boolean |
For client-affine subscriptions, this value indicates whether the subscription is shared or not. |
SBSubscription
Description of subscription resource.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.accessedAt |
string (date-time) |
Last time there was a receive request to this subscription. |
properties.autoDeleteOnIdle |
string (duration) |
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. |
properties.clientAffineProperties |
Properties specific to client affine subscriptions. |
|
properties.countDetails |
Message count details |
|
properties.createdAt |
string (date-time) |
Exact time the message was created. |
properties.deadLetteringOnFilterEvaluationExceptions |
boolean |
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. |
properties.deadLetteringOnMessageExpiration |
boolean |
Value that indicates whether a subscription has dead letter support when a message expires. |
properties.defaultMessageTimeToLive |
string (duration) |
ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. |
properties.duplicateDetectionHistoryTimeWindow |
string (duration) |
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. |
properties.enableBatchedOperations |
boolean |
Value that indicates whether server-side batched operations are enabled. |
properties.forwardDeadLetteredMessagesTo |
string |
Queue/Topic name to forward the Dead Letter message |
properties.forwardTo |
string |
Queue/Topic name to forward the messages |
properties.isClientAffine |
boolean |
Value that indicates whether the subscription has an affinity to the client id. |
properties.lockDuration |
string (duration) |
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. |
properties.maxDeliveryCount |
integer (int32) |
Number of maximum deliveries. |
properties.messageCount |
integer (int64) |
Number of messages. |
properties.requiresSession |
boolean |
Value indicating if a subscription supports the concept of sessions. |
properties.status |
Enumerates the possible values for the status of a messaging entity. |
|
properties.updatedAt |
string (date-time) |
The exact time the message was updated. |
systemData |
The system meta data relating to this resource. |
|
type |
string |
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string (date-time) |
The type of identity that last modified the resource. |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |