SubscriptionProperties Class

Properties of a Service Bus topic subscription resource.

Please use get_subscription, create_subscription, or list_subscriptions on the ServiceBusAdministrationClient to get a SubscriptionProperties instance instead of instantiating a SubscriptionProperties object directly.

Inheritance
azure.servicebus.management._models.DictMixin
SubscriptionProperties

Constructor

SubscriptionProperties(name: str, *, lock_duration: timedelta | str | None, requires_session: bool | None, default_message_time_to_live: timedelta | str | None, dead_lettering_on_message_expiration: bool | None, dead_lettering_on_filter_evaluation_exceptions: bool | None, max_delivery_count: int | None, enable_batched_operations: bool | None, status: str | EntityStatus | None, forward_to: str | None, user_metadata: str | None, forward_dead_lettered_messages_to: str | None, auto_delete_on_idle: timedelta | str | None, availability_status: str | EntityAvailabilityStatus | None)

Parameters

Name Description
name
Required
str

Name of the subscription.

Keyword-Only Parameters

Name Description
lock_duration

ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.

requires_session
bool or None

A value that indicates whether the queue supports the concept of sessions.

default_message_time_to_live

ISO 8601 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.

dead_lettering_on_message_expiration
bool or None

A value that indicates whether this subscription has dead letter support when a message expires.

dead_lettering_on_filter_evaluation_exceptions
bool or None

A value that indicates whether this subscription has dead letter support when a message expires.

max_delivery_count
int or None

The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.

enable_batched_operations
bool or None

Value that indicates whether server-side batched operations are enabled.

status

Status of a Service Bus resource. Possible values include: "Active", "Creating", "Deleting", "Disabled", "ReceiveDisabled", "Renaming", "Restoring", "SendDisabled", "Unknown".

forward_to
str or None

The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

user_metadata
str or None

Metadata associated with the subscription. Maximum number of characters is 1024.

forward_dead_lettered_messages_to
str or None

The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

auto_delete_on_idle

ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes.

availability_status

Availability status of the entity. Possible values include: "Available", "Limited", "Renaming", "Restoring", "Unknown".

Variables

Name Description
name
str

Name of the subscription.

lock_duration

ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.

requires_session
bool or None

A value that indicates whether the queue supports the concept of sessions.

default_message_time_to_live

ISO 8601 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.

dead_lettering_on_message_expiration
bool or None

A value that indicates whether this subscription has dead letter support when a message expires.

dead_lettering_on_filter_evaluation_exceptions
bool or None

A value that indicates whether this subscription has dead letter support when a message expires.

max_delivery_count
int or None

The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.

enable_batched_operations
bool or None

Value that indicates whether server-side batched operations are enabled.

status

Status of a Service Bus resource. Possible values include: "Active", "Creating", "Deleting", "Disabled", "ReceiveDisabled", "Renaming", "Restoring", "SendDisabled", "Unknown".

forward_to
str or None

The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

user_metadata
str or None

Metadata associated with the subscription. Maximum number of characters is 1024.

forward_dead_lettered_messages_to
str or None

The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

auto_delete_on_idle

ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes.

availability_status

Availability status of the entity. Possible values include: "Available", "Limited", "Renaming", "Restoring", "Unknown".

Methods

get
has_key
items
keys
update
values

get

get(key: str, default: Any | None = None) -> Any

Parameters

Name Description
key
Required
default
Default value: None

has_key

has_key(k: str) -> bool

Parameters

Name Description
k
Required

items

items() -> List[Tuple[str, Any]]

keys

keys() -> List[str]

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> List[Any]