1. Packages
  2. Azure Native
  3. API Docs
  4. servicebus
  5. getSubscription
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.servicebus.getSubscription

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

Returns a subscription description for the specified topic.

Uses Azure REST API version 2024-01-01.

Other available API versions: 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview, 2022-10-01-preview, 2023-01-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native servicebus [ApiVersion]. See the version guide for details.

Using getSubscription

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSubscription(args: GetSubscriptionArgs, opts?: InvokeOptions): Promise<GetSubscriptionResult>
function getSubscriptionOutput(args: GetSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionResult>
Copy
def get_subscription(namespace_name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     subscription_name: Optional[str] = None,
                     topic_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetSubscriptionResult
def get_subscription_output(namespace_name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     subscription_name: Optional[pulumi.Input[str]] = None,
                     topic_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionResult]
Copy
func LookupSubscription(ctx *Context, args *LookupSubscriptionArgs, opts ...InvokeOption) (*LookupSubscriptionResult, error)
func LookupSubscriptionOutput(ctx *Context, args *LookupSubscriptionOutputArgs, opts ...InvokeOption) LookupSubscriptionResultOutput
Copy

> Note: This function is named LookupSubscription in the Go SDK.

public static class GetSubscription 
{
    public static Task<GetSubscriptionResult> InvokeAsync(GetSubscriptionArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscriptionResult> Invoke(GetSubscriptionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
public static Output<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:servicebus:getSubscription
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

NamespaceName
This property is required.
Changes to this property will trigger replacement.
string
The namespace name
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
SubscriptionName
This property is required.
Changes to this property will trigger replacement.
string
The subscription name.
TopicName
This property is required.
Changes to this property will trigger replacement.
string
The topic name.
NamespaceName
This property is required.
Changes to this property will trigger replacement.
string
The namespace name
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
SubscriptionName
This property is required.
Changes to this property will trigger replacement.
string
The subscription name.
TopicName
This property is required.
Changes to this property will trigger replacement.
string
The topic name.
namespaceName
This property is required.
Changes to this property will trigger replacement.
String
The namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
subscriptionName
This property is required.
Changes to this property will trigger replacement.
String
The subscription name.
topicName
This property is required.
Changes to this property will trigger replacement.
String
The topic name.
namespaceName
This property is required.
Changes to this property will trigger replacement.
string
The namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
subscriptionName
This property is required.
Changes to this property will trigger replacement.
string
The subscription name.
topicName
This property is required.
Changes to this property will trigger replacement.
string
The topic name.
namespace_name
This property is required.
Changes to this property will trigger replacement.
str
The namespace name
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
subscription_name
This property is required.
Changes to this property will trigger replacement.
str
The subscription name.
topic_name
This property is required.
Changes to this property will trigger replacement.
str
The topic name.
namespaceName
This property is required.
Changes to this property will trigger replacement.
String
The namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
subscriptionName
This property is required.
Changes to this property will trigger replacement.
String
The subscription name.
topicName
This property is required.
Changes to this property will trigger replacement.
String
The topic name.

getSubscription Result

The following output properties are available:

AccessedAt string
Last time there was a receive request to this subscription.
AzureApiVersion string
The Azure API version of the resource.
CountDetails Pulumi.AzureNative.ServiceBus.Outputs.MessageCountDetailsResponse
Message count details
CreatedAt string
Exact time the message was created.
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
MessageCount double
Number of messages.
Name string
The name of the resource
SystemData Pulumi.AzureNative.ServiceBus.Outputs.SystemDataResponse
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"
UpdatedAt string
The exact time the message was updated.
AutoDeleteOnIdle string
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
ClientAffineProperties Pulumi.AzureNative.ServiceBus.Outputs.SBClientAffinePropertiesResponse
Properties specific to client affine subscriptions.
DeadLetteringOnFilterEvaluationExceptions bool
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
DeadLetteringOnMessageExpiration bool
Value that indicates whether a subscription has dead letter support when a message expires.
DefaultMessageTimeToLive string
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.
DuplicateDetectionHistoryTimeWindow string
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
EnableBatchedOperations bool
Value that indicates whether server-side batched operations are enabled.
ForwardDeadLetteredMessagesTo string
Queue/Topic name to forward the Dead Letter message
ForwardTo string
Queue/Topic name to forward the messages
IsClientAffine bool
Value that indicates whether the subscription has an affinity to the client id.
LockDuration string
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
MaxDeliveryCount int
Number of maximum deliveries.
RequiresSession bool
Value indicating if a subscription supports the concept of sessions.
Status string
Enumerates the possible values for the status of a messaging entity.
AccessedAt string
Last time there was a receive request to this subscription.
AzureApiVersion string
The Azure API version of the resource.
CountDetails MessageCountDetailsResponse
Message count details
CreatedAt string
Exact time the message was created.
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
MessageCount float64
Number of messages.
Name string
The name of the resource
SystemData SystemDataResponse
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"
UpdatedAt string
The exact time the message was updated.
AutoDeleteOnIdle string
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
ClientAffineProperties SBClientAffinePropertiesResponse
Properties specific to client affine subscriptions.
DeadLetteringOnFilterEvaluationExceptions bool
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
DeadLetteringOnMessageExpiration bool
Value that indicates whether a subscription has dead letter support when a message expires.
DefaultMessageTimeToLive string
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.
DuplicateDetectionHistoryTimeWindow string
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
EnableBatchedOperations bool
Value that indicates whether server-side batched operations are enabled.
ForwardDeadLetteredMessagesTo string
Queue/Topic name to forward the Dead Letter message
ForwardTo string
Queue/Topic name to forward the messages
IsClientAffine bool
Value that indicates whether the subscription has an affinity to the client id.
LockDuration string
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
MaxDeliveryCount int
Number of maximum deliveries.
RequiresSession bool
Value indicating if a subscription supports the concept of sessions.
Status string
Enumerates the possible values for the status of a messaging entity.
accessedAt String
Last time there was a receive request to this subscription.
azureApiVersion String
The Azure API version of the resource.
countDetails MessageCountDetailsResponse
Message count details
createdAt String
Exact time the message was created.
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
messageCount Double
Number of messages.
name String
The name of the resource
systemData SystemDataResponse
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"
updatedAt String
The exact time the message was updated.
autoDeleteOnIdle String
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
clientAffineProperties SBClientAffinePropertiesResponse
Properties specific to client affine subscriptions.
deadLetteringOnFilterEvaluationExceptions Boolean
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
deadLetteringOnMessageExpiration Boolean
Value that indicates whether a subscription has dead letter support when a message expires.
defaultMessageTimeToLive String
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.
duplicateDetectionHistoryTimeWindow String
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
enableBatchedOperations Boolean
Value that indicates whether server-side batched operations are enabled.
forwardDeadLetteredMessagesTo String
Queue/Topic name to forward the Dead Letter message
forwardTo String
Queue/Topic name to forward the messages
isClientAffine Boolean
Value that indicates whether the subscription has an affinity to the client id.
lockDuration String
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
maxDeliveryCount Integer
Number of maximum deliveries.
requiresSession Boolean
Value indicating if a subscription supports the concept of sessions.
status String
Enumerates the possible values for the status of a messaging entity.
accessedAt string
Last time there was a receive request to this subscription.
azureApiVersion string
The Azure API version of the resource.
countDetails MessageCountDetailsResponse
Message count details
createdAt string
Exact time the message was created.
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
messageCount number
Number of messages.
name string
The name of the resource
systemData SystemDataResponse
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"
updatedAt string
The exact time the message was updated.
autoDeleteOnIdle string
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
clientAffineProperties SBClientAffinePropertiesResponse
Properties specific to client affine subscriptions.
deadLetteringOnFilterEvaluationExceptions boolean
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
deadLetteringOnMessageExpiration boolean
Value that indicates whether a subscription has dead letter support when a message expires.
defaultMessageTimeToLive string
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.
duplicateDetectionHistoryTimeWindow string
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
enableBatchedOperations boolean
Value that indicates whether server-side batched operations are enabled.
forwardDeadLetteredMessagesTo string
Queue/Topic name to forward the Dead Letter message
forwardTo string
Queue/Topic name to forward the messages
isClientAffine boolean
Value that indicates whether the subscription has an affinity to the client id.
lockDuration string
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
maxDeliveryCount number
Number of maximum deliveries.
requiresSession boolean
Value indicating if a subscription supports the concept of sessions.
status string
Enumerates the possible values for the status of a messaging entity.
accessed_at str
Last time there was a receive request to this subscription.
azure_api_version str
The Azure API version of the resource.
count_details MessageCountDetailsResponse
Message count details
created_at str
Exact time the message was created.
id str
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
location str
The geo-location where the resource lives
message_count float
Number of messages.
name str
The name of the resource
system_data SystemDataResponse
The system meta data relating to this resource.
type str
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
updated_at str
The exact time the message was updated.
auto_delete_on_idle str
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
client_affine_properties SBClientAffinePropertiesResponse
Properties specific to client affine subscriptions.
dead_lettering_on_filter_evaluation_exceptions bool
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
dead_lettering_on_message_expiration bool
Value that indicates whether a subscription has dead letter support when a message expires.
default_message_time_to_live str
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.
duplicate_detection_history_time_window str
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
enable_batched_operations bool
Value that indicates whether server-side batched operations are enabled.
forward_dead_lettered_messages_to str
Queue/Topic name to forward the Dead Letter message
forward_to str
Queue/Topic name to forward the messages
is_client_affine bool
Value that indicates whether the subscription has an affinity to the client id.
lock_duration str
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
max_delivery_count int
Number of maximum deliveries.
requires_session bool
Value indicating if a subscription supports the concept of sessions.
status str
Enumerates the possible values for the status of a messaging entity.
accessedAt String
Last time there was a receive request to this subscription.
azureApiVersion String
The Azure API version of the resource.
countDetails Property Map
Message count details
createdAt String
Exact time the message was created.
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
messageCount Number
Number of messages.
name String
The name of the resource
systemData Property Map
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"
updatedAt String
The exact time the message was updated.
autoDeleteOnIdle String
ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
clientAffineProperties Property Map
Properties specific to client affine subscriptions.
deadLetteringOnFilterEvaluationExceptions Boolean
Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
deadLetteringOnMessageExpiration Boolean
Value that indicates whether a subscription has dead letter support when a message expires.
defaultMessageTimeToLive String
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.
duplicateDetectionHistoryTimeWindow String
ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
enableBatchedOperations Boolean
Value that indicates whether server-side batched operations are enabled.
forwardDeadLetteredMessagesTo String
Queue/Topic name to forward the Dead Letter message
forwardTo String
Queue/Topic name to forward the messages
isClientAffine Boolean
Value that indicates whether the subscription has an affinity to the client id.
lockDuration String
ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
maxDeliveryCount Number
Number of maximum deliveries.
requiresSession Boolean
Value indicating if a subscription supports the concept of sessions.
status String
Enumerates the possible values for the status of a messaging entity.

Supporting Types

MessageCountDetailsResponse

ActiveMessageCount This property is required. double
Number of active messages in the queue, topic, or subscription.
DeadLetterMessageCount This property is required. double
Number of messages that are dead lettered.
ScheduledMessageCount This property is required. double
Number of scheduled messages.
TransferDeadLetterMessageCount This property is required. double
Number of messages transferred into dead letters.
TransferMessageCount This property is required. double
Number of messages transferred to another queue, topic, or subscription.
ActiveMessageCount This property is required. float64
Number of active messages in the queue, topic, or subscription.
DeadLetterMessageCount This property is required. float64
Number of messages that are dead lettered.
ScheduledMessageCount This property is required. float64
Number of scheduled messages.
TransferDeadLetterMessageCount This property is required. float64
Number of messages transferred into dead letters.
TransferMessageCount This property is required. float64
Number of messages transferred to another queue, topic, or subscription.
activeMessageCount This property is required. Double
Number of active messages in the queue, topic, or subscription.
deadLetterMessageCount This property is required. Double
Number of messages that are dead lettered.
scheduledMessageCount This property is required. Double
Number of scheduled messages.
transferDeadLetterMessageCount This property is required. Double
Number of messages transferred into dead letters.
transferMessageCount This property is required. Double
Number of messages transferred to another queue, topic, or subscription.
activeMessageCount This property is required. number
Number of active messages in the queue, topic, or subscription.
deadLetterMessageCount This property is required. number
Number of messages that are dead lettered.
scheduledMessageCount This property is required. number
Number of scheduled messages.
transferDeadLetterMessageCount This property is required. number
Number of messages transferred into dead letters.
transferMessageCount This property is required. number
Number of messages transferred to another queue, topic, or subscription.
active_message_count This property is required. float
Number of active messages in the queue, topic, or subscription.
dead_letter_message_count This property is required. float
Number of messages that are dead lettered.
scheduled_message_count This property is required. float
Number of scheduled messages.
transfer_dead_letter_message_count This property is required. float
Number of messages transferred into dead letters.
transfer_message_count This property is required. float
Number of messages transferred to another queue, topic, or subscription.
activeMessageCount This property is required. Number
Number of active messages in the queue, topic, or subscription.
deadLetterMessageCount This property is required. Number
Number of messages that are dead lettered.
scheduledMessageCount This property is required. Number
Number of scheduled messages.
transferDeadLetterMessageCount This property is required. Number
Number of messages transferred into dead letters.
transferMessageCount This property is required. Number
Number of messages transferred to another queue, topic, or subscription.

SBClientAffinePropertiesResponse

ClientId string
Indicates the Client ID of the application that created the client-affine subscription.
IsDurable bool
For client-affine subscriptions, this value indicates whether the subscription is durable or not.
IsShared bool
For client-affine subscriptions, this value indicates whether the subscription is shared or not.
ClientId string
Indicates the Client ID of the application that created the client-affine subscription.
IsDurable bool
For client-affine subscriptions, this value indicates whether the subscription is durable or not.
IsShared bool
For client-affine subscriptions, this value indicates whether the subscription is shared or not.
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.
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.
client_id str
Indicates the Client ID of the application that created the client-affine subscription.
is_durable bool
For client-affine subscriptions, this value indicates whether the subscription is durable or not.
is_shared bool
For client-affine subscriptions, this value indicates whether the subscription is shared or not.
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.

SystemDataResponse

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The type of identity that last modified the resource.
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The type of identity that last modified the resource.
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi