azure.servicebus.management package

class azure.servicebus.management.AccessRights(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Access rights of an authorization.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

LISTEN = 'Listen'
MANAGE = 'Manage'
SEND = 'Send'
class azure.servicebus.management.ApiVersion(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

V2017_04 = '2017-04'
V2021_05 = '2021-05'
class azure.servicebus.management.AuthorizationRule(*, type: str | None = None, claim_type: str | None = None, claim_value: str | None = None, rights: List[str | AccessRights] | None = None, created_at_utc: datetime | None = None, modified_at_utc: datetime | None = None, key_name: str | None = None, primary_key: str | None = None, secondary_key: str | None = None)[source]

Authorization rule of an entity.

Keyword Arguments:
  • type (str) – The authorization type.

  • claim_type (str) – The claim type.

  • claim_value (str) – The claim value.

  • rights (list[AccessRights]) – Access rights of the entity. Values are ‘Send’, ‘Listen’, or ‘Manage’.

  • created_at_utc (datetime) – The date and time when the authorization rule was created.

  • modified_at_utc (datetime) – The date and time when the authorization rule was modified.

  • key_name (str) – The authorization rule key name.

  • primary_key (str) – The primary key of the authorization rule.

  • secondary_key (str) – The primary key of the authorization rule.

class azure.servicebus.management.CorrelationRuleFilter(*, correlation_id: str | None = None, message_id: str | None = None, to: str | None = None, reply_to: str | None = None, label: str | None = None, session_id: str | None = None, reply_to_session_id: str | None = None, content_type: str | None = None, properties: Dict[str, str | int | float | bool | datetime | timedelta] | None = None)[source]

Represents the correlation filter expression.

Keyword Arguments:
  • correlation_id (str or None) – Identifier of the correlation.

  • message_id (str or None) – Identifier of the message.

  • to (str or None) – Address to send to.

  • reply_to (str or None) – Address of the queue to reply to.

  • label (str or None) – Application specific label.

  • session_id (str or None) – Session identifier.

  • reply_to_session_id (str or None) – Session identifier to reply to.

  • content_type (str or None) – Content type of the message.

  • properties (dict[str, Union[str, int, float, bool, datetime, timedelta]] or None) – dictionary object for custom filters

class azure.servicebus.management.EntityAvailabilityStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Availability status of the entity.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AVAILABLE = 'Available'
LIMITED = 'Limited'
RENAMING = 'Renaming'
RESTORING = 'Restoring'
UNKNOWN = 'Unknown'
class azure.servicebus.management.EntityStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Status of a Service Bus resource.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ACTIVE = 'Active'
CREATING = 'Creating'
DELETING = 'Deleting'
DISABLED = 'Disabled'
RECEIVE_DISABLED = 'ReceiveDisabled'
RENAMING = 'Renaming'
RESTORING = 'Restoring'
SEND_DISABLED = 'SendDisabled'
UNKNOWN = 'Unknown'
class azure.servicebus.management.FalseRuleFilter[source]

A sql filter with a sql expression that is always True

class azure.servicebus.management.MessageCountDetails(*, active_message_count: int | None = None, dead_letter_message_count: int | None = None, scheduled_message_count: int | None = None, transfer_dead_letter_message_count: int | None = None, transfer_message_count: int | None = None, **kwargs: Any)[source]

Details about the message counts in entity.

Variables:
  • active_message_count (int) – Number of active messages in the queue, topic, or subscription.

  • dead_letter_message_count (int) – Number of messages that are dead lettered.

  • scheduled_message_count (int) – Number of scheduled messages.

  • transfer_dead_letter_message_count (int) – Number of messages transferred into dead letters.

  • transfer_message_count (int) – Number of messages transferred to another queue, topic, or subscription.

Keyword Arguments:
  • active_message_count (int) – Number of active messages in the queue, topic, or subscription.

  • dead_letter_message_count (int) – Number of messages that are dead lettered.

  • scheduled_message_count (int) – Number of scheduled messages.

  • transfer_dead_letter_message_count (int) – Number of messages transferred into dead letters.

  • transfer_message_count (int) – Number of messages transferred to another queue, topic, or subscription.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.servicebus.management.MessagingSku(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The SKU for the messaging entity.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

BASIC = 'Basic'
PREMIUM = 'Premium'
STANDARD = 'Standard'
class azure.servicebus.management.NamespaceProperties(name: str, *, alias: str | None, created_at_utc: datetime | None, messaging_sku: str | MessagingSku | None, messaging_units: int | None, modified_at_utc: datetime | None, namespace_type: str | NamespaceType | None)[source]

The metadata related to a Service Bus namespace.

Please use the `get_namespace_properties` on the ServiceBusAdministrationClient to get a `NamespaceProperties` instance instead of instantiating a `NamespaceProperties` object directly.

Parameters:

name (str) – Name of the namespace.

Keyword Arguments:
  • alias (str) – Alias for the geo-disaster recovery Service Bus namespace.

  • created_at_utc (datetime) – The exact time the namespace was created.

  • messaging_sku (str or MessagingSku) – The SKU for the messaging entity. Possible values include: “Basic”, “Standard”, “Premium”.

  • messaging_units (int) – The number of messaging units allocated to the namespace.

  • modified_at_utc (datetime) – The exact time the namespace was last modified.

  • namespace_type (str or NamespaceType) – The type of entities the namespace can contain. Known values are: “Messaging”, “NotificationHub”, “Mixed”, “EventHub”, and “Relay”.

Variables:
  • alias (str) – Alias for the geo-disaster recovery Service Bus namespace.

  • created_at_utc (datetime) – The exact time the namespace was created.

  • messaging_sku (str or MessagingSku) – The SKU for the messaging entity. Possible values include: “Basic”, “Standard”, “Premium”.

  • messaging_units (int) – The number of messaging units allocated to the namespace.

  • modified_at_utc (datetime) – The exact time the namespace was last modified.

  • name (str) – Name of the namespace.

  • namespace_type (str or NamespaceType) – The type of entities the namespace can contain. Known values are: “Messaging”, “NotificationHub”, “Mixed”, “EventHub”, and “Relay”.

get(key: str, default: Any | None = None) Any
has_key(k: str) bool
items() List[Tuple[str, Any]]
keys() List[str]
update(*args: Any, **kwargs: Any) None
values() List[Any]
class azure.servicebus.management.NamespaceType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The type of entities the namespace can contain.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

EVENT_HUB = 'EventHub'
MESSAGING = 'Messaging'
MIXED = 'Mixed'
NOTIFICATION_HUB = 'NotificationHub'
RELAY = 'Relay'
class azure.servicebus.management.QueueProperties(name: str, *, authorization_rules: List[AuthorizationRule] | None, auto_delete_on_idle: timedelta | str | None, dead_lettering_on_message_expiration: bool | None, default_message_time_to_live: timedelta | str | None, duplicate_detection_history_time_window: timedelta | str | None, availability_status: str | EntityAvailabilityStatus | None, enable_batched_operations: bool | None, enable_express: bool | None, enable_partitioning: bool | None, lock_duration: timedelta | str | None, max_delivery_count: int | None, max_size_in_megabytes: int | None, requires_duplicate_detection: bool | None, requires_session: bool | None, status: str | EntityStatus | None, forward_to: str | None, user_metadata: str | None, forward_dead_lettered_messages_to: str | None, max_message_size_in_kilobytes: int | None)[source]

Properties of a Service Bus queue resource.

Please use `get_queue`, `create_queue`, or `list_queues` on the ServiceBusAdministrationClient to get a `QueueProperties` instance instead of instantiating a `QueueProperties` object directly.

Parameters:

name (str) – Name of the queue.

Keyword Arguments:
  • authorization_rules (list[AuthorizationRule] or None) – Authorization rules for resource.

  • auto_delete_on_idle (timedelta or str or None) – ISO 8601 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.

  • dead_lettering_on_message_expiration (bool or None) – A value that indicates whether this queue has dead letter support when a message expires.

  • default_message_time_to_live (timedelta or str or None) – 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.

  • duplicate_detection_history_time_window (timedelta or str or None) – ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.

  • availability_status (str or None or EntityAvailabilityStatus) – Availibility status of the entity. Possible values include: “Available”, “Limited”, “Renaming”, “Restoring”, “Unknown”.

  • enable_batched_operations (bool or None) – Value that indicates whether server-side batched operations are enabled.

  • enable_express (bool or None) – A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.

  • enable_partitioning (bool or None) – A value that indicates whether the queue is to be partitioned across multiple message brokers.

  • lock_duration (timedelt or Nonea) – 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.

  • max_delivery_count (int or None) – The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.

  • max_size_in_megabytes (int or None) – The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.

  • requires_duplicate_detection (bool or None) – A value indicating if this queue requires duplicate detection.

  • requires_session (bool or None) – A value that indicates whether the queue supports the concept of sessions.

  • status (str or EntityStatus) – 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 queue are forwarded to.

  • user_metadata (str or None) – Custom metdata that user can associate with the description. Max length is 1024 chars.

  • forward_dead_lettered_messages_to (str or None) – The name of the recipient entity to which all the dead-lettered messages of this subscription are forwarded to.

  • max_message_size_in_kilobytes (int or None) – The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace and Service Bus API version “2021-05” or higher.

Variables:
  • name (str or None) – Name of the queue.

  • authorization_rules (list[AuthorizationRule]) – Authorization rules for resource.

  • auto_delete_on_idle (timedelta or str or None) – ISO 8601 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.

  • dead_lettering_on_message_expiration (bool or None) – A value that indicates whether this queue has dead letter support when a message expires.

  • default_message_time_to_live (timedelta or str or None) – 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.

  • duplicate_detection_history_time_window (timedelta or str or None) – ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.

  • availability_status (str or None or EntityAvailabilityStatus) – Availibility status of the entity. Possible values include: “Available”, “Limited”, “Renaming”, “Restoring”, “Unknown”.

  • enable_batched_operations (bool or None) – Value that indicates whether server-side batched operations are enabled.

  • enable_express (bool or None) – A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.

  • enable_partitioning (bool or None) – A value that indicates whether the queue is to be partitioned across multiple message brokers.

  • lock_duration (timedelta or str or None) – 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.

  • max_delivery_count (int or None) – The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.

  • max_size_in_megabytes (int or None) – The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.

  • requires_duplicate_detection (bool or None) – A value indicating if this queue requires duplicate detection.

  • requires_session (bool or None) – A value that indicates whether the queue supports the concept of sessions.

  • status (str or EntityStatus or None) – 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 queue are forwarded to.

  • user_metadata (str or None) – Custom metdata that user can associate with the description. Max length is 1024 chars.

  • forward_dead_lettered_messages_to (str or None) – The name of the recipient entity to which all the dead-lettered messages of this subscription are forwarded to.

  • max_message_size_in_kilobytes (int or None) – The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace and Service Bus API version “2021-05” or higher.

get(key: str, default: Any | None = None) Any
has_key(k: str) bool
items() List[Tuple[str, Any]]
keys() List[str]
update(*args: Any, **kwargs: Any) None
values() List[Any]
class azure.servicebus.management.QueueRuntimeProperties[source]

Service Bus queue runtime properties.

property accessed_at_utc: datetime | None

Last time a message was sent, or the last time there was a receive request to this queue.

Return type:

datetime or None

property active_message_count: int | None

Number of active messages in the queue, topic, or subscription.

Return type:

int or None

property created_at_utc: datetime | None

The exact time the queue was created.

Return type:

datetime or None

property dead_letter_message_count: int | None

Number of messages that are dead lettered.

Return type:

int or None

property name: str

Name of the queue.

Return type:

str

property scheduled_message_count: int | None

Number of scheduled messages.

Return type:

int or None

property size_in_bytes: int | None

The size of the queue, in bytes.

Return type:

int or None

property total_message_count: int | None

Total number of messages.

Return type:

int or None

property transfer_dead_letter_message_count: int | None

Number of messages transferred into dead letters.

Return type:

int or None

property transfer_message_count: int | None

Number of messages transferred to another queue, topic, or subscription.

Return type:

int or None

property updated_at_utc: datetime | None

The exact the entity was updated.

Return type:

datetime or None

class azure.servicebus.management.RuleProperties(name: str, *, filter: CorrelationRuleFilter | SqlRuleFilter | None, action: SqlRuleAction | None, created_at_utc: datetime | None)[source]

Properties of a topic subscription rule.

Please use `get_rule`, `create_rule`, or `list_rules` on the ServiceBusAdministrationClient to get a `RuleProperties` instance instead of instantiating a `RuleProperties` object directly.

Parameters:

name (str) – Name of the rule.

Keyword Arguments:
Variables:
get(key: str, default: Any | None = None) Any
has_key(k: str) bool
items() List[Tuple[str, Any]]
keys() List[str]
update(*args: Any, **kwargs: Any) None
values() List[Any]
class azure.servicebus.management.ServiceBusAdministrationClient(fully_qualified_namespace: str, credential: TokenCredential, *, api_version: str | ApiVersion = ApiVersion.V2021_05, **kwargs: Any)[source]

Use this client to create, update, list, and delete resources of a ServiceBus namespace.

Parameters:
  • fully_qualified_namespace (str) – The fully qualified host name for the Service Bus namespace.

  • credential (TokenCredential) – To authenticate to manage the entities of the ServiceBus namespace.

Keyword Arguments:

api_version (str or ApiVersion) – The Service Bus API version to use for requests. Default value is the most recent service version that is compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.

close() None[source]
create_queue(queue_name: str, *, authorization_rules: List[AuthorizationRule] | None = None, auto_delete_on_idle: timedelta | str | None = None, dead_lettering_on_message_expiration: bool | None = None, default_message_time_to_live: timedelta | str | None = None, duplicate_detection_history_time_window: timedelta | str | None = None, enable_batched_operations: bool | None = None, enable_express: bool | None = None, enable_partitioning: bool | None = None, lock_duration: timedelta | str | None = None, max_delivery_count: int | None = None, max_size_in_megabytes: int | None = None, requires_duplicate_detection: bool | None = None, requires_session: bool | None = None, forward_to: str | None = None, user_metadata: str | None = None, forward_dead_lettered_messages_to: str | None = None, max_message_size_in_kilobytes: int | None = None, **kwargs: Any) QueueProperties[source]

Create a queue.

Parameters:

queue_name (str) – Name of the queue.

Keyword Arguments:
  • authorization_rules (list[AuthorizationRule] or None) – Authorization rules for resource.

  • auto_delete_on_idle (timedelta or str or one) – ISO 8601 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • dead_lettering_on_message_expiration (bool) – A value that indicates whether this queue has dead letter support when a message expires.

  • default_message_time_to_live (timedelta or str or None) – 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. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • duplicate_detection_history_time_window (timedelta or str or None) – ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • enable_batched_operations (bool) – Value that indicates whether server-side batched operations are enabled.

  • enable_express (bool) – A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.

  • enable_partitioning (bool) – A value that indicates whether the queue is to be partitioned across multiple message brokers.

  • lock_duration (timedelta or str or None) – 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. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • max_delivery_count (int) – The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.

  • max_size_in_megabytes (int) – The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.

  • requires_duplicate_detection (bool) – A value indicating if this queue requires duplicate detection.

  • requires_session (bool) – A value that indicates whether the queue supports the concept of sessions.

  • forward_to (str) – The name of the recipient entity to which all the messages sent to the queue are forwarded to.

  • user_metadata (str) – Custom metdata that user can associate with the description. Max length is 1024 chars.

  • forward_dead_lettered_messages_to (str) – The name of the recipient entity to which all the dead-lettered messages of this subscription are forwarded to.

  • max_message_size_in_kilobytes (int) – The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace and Service Bus API version “2021-05” or higher. The minimum allowed value is 1024 while the maximum allowed value is 102400. Default value is 1024.

Return type:

QueueProperties

create_rule(topic_name: str, subscription_name: str, rule_name: str, *, filter: ~azure.servicebus.management._models.CorrelationRuleFilter | ~azure.servicebus.management._models.SqlRuleFilter = <azure.servicebus.management._models.TrueRuleFilter object>, action: ~azure.servicebus.management._models.SqlRuleAction | None = None, **kwargs: ~typing.Any) RuleProperties[source]

Create a rule for a topic subscription.

Parameters:
  • topic_name (str) – The topic that will own the to-be-created subscription rule.

  • subscription_name (str) – The subscription that will own the to-be-created rule.

  • rule_name (str) – Name of the rule.

Keyword Arguments:
Return type:

RuleProperties

create_subscription(topic_name: str, subscription_name: str, *, lock_duration: timedelta | str | None = None, requires_session: bool | None = None, default_message_time_to_live: timedelta | str | None = None, dead_lettering_on_message_expiration: bool | None = None, dead_lettering_on_filter_evaluation_exceptions: bool | None = None, max_delivery_count: int | None = None, enable_batched_operations: bool | None = None, forward_to: str | None = None, user_metadata: str | None = None, forward_dead_lettered_messages_to: str | None = None, auto_delete_on_idle: timedelta | str | None = None, **kwargs: Any) SubscriptionProperties[source]

Create a topic subscription.

Parameters:
  • topic_name (str) – The topic that will own the to-be-created subscription.

  • subscription_name (str) – Name of the subscription.

Keyword Arguments:
  • lock_duration (Union[timedelta, str]) – 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. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • requires_session (bool) – A value that indicates whether the queue supports the concept of sessions.

  • default_message_time_to_live (Union[timedelta, str]) – 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. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • dead_lettering_on_message_expiration (bool) – A value that indicates whether this subscription has dead letter support when a message expires.

  • dead_lettering_on_filter_evaluation_exceptions (bool) – A value that indicates whether this subscription has dead letter support when a message expires.

  • max_delivery_count (int) – The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.

  • enable_batched_operations (bool) – Value that indicates whether server-side batched operations are enabled.

  • forward_to (str) – The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

  • user_metadata (str) – Metadata associated with the subscription. Maximum number of characters is 1024.

  • forward_dead_lettered_messages_to (str) – The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

  • auto_delete_on_idle (Union[timedelta, str]) – ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

Return type:

SubscriptionProperties

create_topic(topic_name: str, *, default_message_time_to_live: timedelta | str | None = None, max_size_in_megabytes: int | None = None, requires_duplicate_detection: bool | None = None, duplicate_detection_history_time_window: timedelta | str | None = None, enable_batched_operations: bool | None = None, size_in_bytes: int | None = None, filtering_messages_before_publishing: bool | None = None, authorization_rules: List[AuthorizationRule] | None = None, support_ordering: bool | None = None, auto_delete_on_idle: timedelta | str | None = None, enable_partitioning: bool | None = None, enable_express: bool | None = None, user_metadata: str | None = None, max_message_size_in_kilobytes: int | None = None, **kwargs: Any) TopicProperties[source]

Create a topic.

Parameters:

topic_name (str) – Name of the topic.

Keyword Arguments:
  • default_message_time_to_live (Union[timedelta, str]) – 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. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • max_size_in_megabytes (int) – The maximum size of the topic in megabytes, which is the size of memory allocated for the topic.

  • requires_duplicate_detection (bool) – A value indicating if this topic requires duplicate detection.

  • duplicate_detection_history_time_window (Union[timedelta, str]) – ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • enable_batched_operations (bool) – Value that indicates whether server-side batched operations are enabled.

  • size_in_bytes (int) – The size of the topic, in bytes.

  • filtering_messages_before_publishing (bool) – Filter messages before publishing.

  • authorization_rules (list[AuthorizationRule]) – Authorization rules for resource.

  • support_ordering (bool) – A value that indicates whether the topic supports ordering.

  • auto_delete_on_idle (Union[timedelta, str]) – ISO 8601 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.

  • enable_partitioning (bool) – A value that indicates whether the topic is to be partitioned across multiple message brokers.

  • enable_express (bool) – A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.

  • user_metadata (str) – Metadata associated with the topic.

  • max_message_size_in_kilobytes (int) – The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace and Service Bus API version “2021-05” or higher. The minimum allowed value is 1024 while the maximum allowed value is 102400. Default value is 1024.

Return type:

TopicProperties

delete_queue(queue_name: str, **kwargs: Any) None[source]

Delete a queue.

Parameters:

queue_name (str) – The name of the queue or a QueueProperties with name.

Return type:

None

delete_rule(topic_name: str, subscription_name: str, rule_name: str, **kwargs: Any) None[source]

Delete a topic subscription rule.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – The subscription that owns the topic.

  • rule_name (str) – The to-be-deleted rule.

Return type:

None

delete_subscription(topic_name: str, subscription_name: str, **kwargs: Any) None[source]

Delete a topic subscription.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – The subscription to be deleted.

Return type:

None

delete_topic(topic_name: str, **kwargs: Any) None[source]

Delete a topic.

Parameters:

topic_name (str) – The topic to be deleted.

Return type:

None

classmethod from_connection_string(conn_str: str, *, api_version: str | ApiVersion = ApiVersion.V2021_05, **kwargs: Any) ServiceBusAdministrationClient[source]

Create a client from connection string.

Parameters:

conn_str (str) – The connection string of the Service Bus Namespace.

Keyword Arguments:

api_version (str or ApiVersion) – The Service Bus API version to use for requests. Default value is the most recent service version that is compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.

Return type:

ServiceBusAdministrationClient

get_namespace_properties(**kwargs: Any) NamespaceProperties[source]

Get the namespace properties

Returns:

The namespace properties.

Return type:

NamespaceProperties

get_queue(queue_name: str, **kwargs: Any) QueueProperties[source]

Get the properties of a queue.

Parameters:

queue_name (str) – The name of the queue.

Returns:

The properties of the queue.

Return type:

QueueProperties

get_queue_runtime_properties(queue_name: str, **kwargs: Any) QueueRuntimeProperties[source]

Get the runtime information of a queue.

Parameters:

queue_name (str) – The name of the queue.

Returns:

The runtime information of the queue.

Return type:

QueueRuntimeProperties

get_rule(topic_name: str, subscription_name: str, rule_name: str, **kwargs: Any) RuleProperties[source]

Get the properties of a topic subscription rule.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – The subscription that owns the rule.

  • rule_name (str) – Name of the rule.

Returns:

The properties of the specified rule.

Return type:

RuleProperties

get_subscription(topic_name: str, subscription_name: str, **kwargs: Any) SubscriptionProperties[source]

Get the properties of a topic subscription.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – name of the subscription.

Returns:

An instance of SubscriptionProperties

Return type:

SubscriptionProperties

get_subscription_runtime_properties(topic_name: str, subscription_name: str, **kwargs: Any) SubscriptionRuntimeProperties[source]

Get a topic subscription runtime info.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – name of the subscription.

Returns:

An instance of SubscriptionRuntimeProperties

Return type:

SubscriptionRuntimeProperties

get_topic(topic_name: str, **kwargs: Any) TopicProperties[source]

Get the properties of a topic.

Parameters:

topic_name (str) – The name of the topic.

Returns:

The properties of the topic.

Return type:

TopicProperties

get_topic_runtime_properties(topic_name: str, **kwargs: Any) TopicRuntimeProperties[source]

Get a the runtime information of a topic.

Parameters:

topic_name (str) – The name of the topic.

Returns:

The runtime info of the topic.

Return type:

TopicRuntimeProperties

list_queues(**kwargs: Any) ItemPaged[QueueProperties][source]

List the queues of a ServiceBus namespace.

Returns:

An iterable (auto-paging) response of QueueProperties.

Return type:

ItemPaged[QueueProperties]

list_queues_runtime_properties(**kwargs: Any) ItemPaged[QueueRuntimeProperties][source]

List the runtime information of the queues in a ServiceBus namespace.

Returns:

An iterable (auto-paging) response of QueueRuntimeProperties.

Return type:

ItemPaged[QueueRuntimeProperties]

list_rules(topic_name: str, subscription_name: str, **kwargs: Any) ItemPaged[RuleProperties][source]

List the rules of a topic subscription.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – The subscription that owns the rules.

Returns:

An iterable (auto-paging) response of RuleProperties.

Return type:

ItemPaged[RuleProperties]

list_subscriptions(topic_name: str, **kwargs: Any) ItemPaged[SubscriptionProperties][source]

List the subscriptions of a ServiceBus Topic.

Parameters:

topic_name (str) – The topic that owns the subscription.

Returns:

An iterable (auto-paging) response of SubscriptionProperties.

Return type:

ItemPaged[SubscriptionProperties]

list_subscriptions_runtime_properties(topic_name: str, **kwargs: Any) ItemPaged[SubscriptionRuntimeProperties][source]

List the subscriptions runtime information of a ServiceBus Topic.

Parameters:

topic_name (str) – The topic that owns the subscription.

Returns:

An iterable (auto-paging) response of SubscriptionRuntimeProperties.

Return type:

ItemPaged[SubscriptionRuntimeProperties]

list_topics(**kwargs: Any) ItemPaged[TopicProperties][source]

List the topics of a ServiceBus namespace.

Returns:

An iterable (auto-paging) response of TopicProperties.

Return type:

ItemPaged[TopicProperties]

list_topics_runtime_properties(**kwargs: Any) ItemPaged[TopicRuntimeProperties][source]

List the topics runtime information of a ServiceBus namespace.

Returns:

An iterable (auto-paging) response of TopicRuntimeProperties.

Return type:

ItemPaged[TopicRuntimeProperties]

update_queue(queue: QueueProperties | Mapping[str, Any], **kwargs: Any) None[source]

Update a queue.

Before calling this method, you should use get_queue, create_queue or list_queues to get a QueueProperties instance, then update the properties. Only a portion of properties can be updated. Refer to https://docs.microsoft.com/en-us/rest/api/servicebus/update-queue. You could also pass keyword arguments for updating properties in the form of <property_name>=<property_value> which will override whatever was specified in the QueueProperties instance. Refer to ~azure.servicebus.management.QueueProperties for names of properties.

Parameters:

queue (QueueProperties) – The queue that is returned from get_queue, create_queue or list_queues and has the updated properties.

Return type:

None

update_rule(topic_name: str, subscription_name: str, rule: RuleProperties | Mapping[str, Any], **kwargs: Any) None[source]

Update a rule.

Before calling this method, you should use get_rule, create_rule or list_rules to get a RuleProperties instance, then update the properties. You could also pass keyword arguments for updating properties in the form of <property_name>=<property_value> which will override whatever was specified in the RuleProperties instance. Refer to ~azure.servicebus.management.RuleProperties for names of properties.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription_name (str) – The subscription that owns this rule.

  • rule (RuleProperties) – The rule that is returned from get_rule, create_rule, or list_rules and has the updated properties.

Return type:

None

update_subscription(topic_name: str, subscription: SubscriptionProperties | Mapping[str, Any], **kwargs: Any) None[source]

Update a subscription.

Before calling this method, you should use get_subscription, update_subscription or list_subscription to get a SubscriptionProperties instance, then update the properties. You could also pass keyword arguments for updating properties in the form of <property_name>=<property_value> which will override whatever was specified in the SubscriptionProperties instance. Refer to ~azure.servicebus.management.SubscriptionProperties for names of properties.

Parameters:
  • topic_name (str) – The topic that owns the subscription.

  • subscription (SubscriptionProperties) – The subscription that is returned from get_subscription, update_subscription or list_subscription and has the updated properties.

Return type:

None

update_topic(topic: TopicProperties | Mapping[str, Any], **kwargs: Any) None[source]

Update a topic.

Before calling this method, you should use get_topic, create_topic or list_topics to get a TopicProperties instance, then update the properties. Only a portion of properties can be updated. Refer to https://docs.microsoft.com/en-us/rest/api/servicebus/update-topic. You could also pass keyword arguments for updating properties in the form of <property_name>=<property_value> which will override whatever was specified in the TopicProperties instance. Refer to ~azure.servicebus.management.TopicProperties for names of properties.

Parameters:

topic (TopicProperties) – The topic that is returned from get_topic, create_topic, or list_topics and has the updated properties.

Return type:

None

class azure.servicebus.management.SqlRuleAction(sql_expression: str | None = None, parameters: Dict[str, str | int | float | bool | datetime | timedelta] | None = None)[source]

Represents set of actions written in SQL language-based syntax that is performed against a ServiceBus.Messaging.BrokeredMessage .

Parameters:
  • sql_expression (str) – SQL expression. e.g. MyProperty=’ABC’

  • parameters (Dict[str, Union[str, int, float, bool, datetime, timedelta]]) – Sets the value of the sql expression parameters if any.

class azure.servicebus.management.SqlRuleFilter(sql_expression: str | None = None, parameters: Dict[str, str | int | float | bool | datetime | timedelta] | None = None)[source]

Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline.

Example:

Create SqlRuleFilter.
sql_filter = SqlRuleFilter("property1 = 'value'")
sql_filter_parametrized = SqlRuleFilter(
    "property1 = @param1 AND property2 = @param2",
    parameters={
        "@param1": "value",
        "@param2" : 1
    }
)
Parameters:
  • sql_expression (str) – The SQL expression. e.g. MyProperty=’ABC’

  • parameters (Dict[str, Union[str, int, float, bool, datetime, timedelta]]) – Sets the value of the sql expression parameters if any.

class azure.servicebus.management.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)[source]

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.

Parameters:

name (str) – Name of the subscription.

Keyword Arguments:
  • lock_duration (timedelta or str or None) – 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 (timedelta or str or None) – 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 (str or EntityStatus or None) – 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 (timedelta or str or None) – ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes.

  • availability_status (str or None or EntityAvailabilityStatus) – Availability status of the entity. Possible values include: “Available”, “Limited”, “Renaming”, “Restoring”, “Unknown”.

Variables:
  • name (str) – Name of the subscription.

  • lock_duration (timedelta or str or None) – 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 (timedelta or str or None) – 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 (str or EntityStatus or None) – 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 (timedelta or str or None) – ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes.

  • availability_status (str or None or EntityAvailabilityStatus) – Availability status of the entity. Possible values include: “Available”, “Limited”, “Renaming”, “Restoring”, “Unknown”.

get(key: str, default: Any | None = None) Any
has_key(k: str) bool
items() List[Tuple[str, Any]]
keys() List[str]
update(*args: Any, **kwargs: Any) None
values() List[Any]
class azure.servicebus.management.SubscriptionRuntimeProperties[source]

Runtime properties of a Service Bus topic subscription resource.

property accessed_at_utc: datetime | None

Last time a message was sent, or the last time there was a receive request

Return type:

datetime or None

property active_message_count: int | None

Number of active messages in the subscription.

Return type:

int or None

property created_at_utc: datetime | None

The exact time the subscription was created.

Return type:

datetime or None

property dead_letter_message_count: int | None

Number of messages that are dead lettered.

Return type:

int or None

property name: str

Name of subscription

Return type:

str

property total_message_count: int | None

The number of messages in the subscription.

Return type:

int or None

property transfer_dead_letter_message_count: int | None

Number of messages transferred into dead letters.

Return type:

int or None

property transfer_message_count: int | None

Number of messages transferred to another queue, topic, or subscription.

Return type:

int or None

property updated_at_utc: datetime | None

The exact time the entity is updated.

Return type:

datetime or None

class azure.servicebus.management.TopicProperties(name: str, *, default_message_time_to_live: timedelta | str | None, max_size_in_megabytes: int | None, requires_duplicate_detection: bool | None, duplicate_detection_history_time_window: timedelta | str | None, enable_batched_operations: bool | None, size_in_bytes: int | None, filtering_messages_before_publishing: bool | None, authorization_rules: List[AuthorizationRule] | None, status: str | EntityStatus | None, support_ordering: bool | None, auto_delete_on_idle: timedelta | str | None, enable_partitioning: bool | None, availability_status: str | EntityAvailabilityStatus | None, enable_express: bool | None, user_metadata: str | None, max_message_size_in_kilobytes: int | None)[source]

Properties of a Service Bus topic resource.

Please use `get_topic`, `create_topic`, or `list_topics` on the ServiceBusAdministrationClient to get a `TopicProperties` instance instead of instantiating a `TopicProperties` object directly.

Variables:
  • name – Name of the topic.

  • 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.

  • max_size_in_megabytes – The maximum size of the topic in megabytes, which is the size of memory allocated for the topic.

  • requires_duplicate_detection – A value indicating if this topic requires duplicate detection.

  • duplicate_detection_history_time_window – ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.

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

  • size_in_bytes – The size of the topic, in bytes.

  • filtering_messages_before_publishing – Filter messages before publishing.

  • authorization_rules – Authorization rules for resource.

  • status – Status of a Service Bus resource. Possible values include: “Active”, “Creating”, “Deleting”, “Disabled”, “ReceiveDisabled”, “Renaming”, “Restoring”, “SendDisabled”, “Unknown”.

  • support_ordering – A value that indicates whether the topic supports ordering.

  • auto_delete_on_idle – ISO 8601 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.

  • enable_partitioning – A value that indicates whether the topic is to be partitioned across multiple message brokers.

  • availability_status – Availability status of the entity. Possible values include: “Available”, “Limited”, “Renaming”, “Restoring”, “Unknown”.

  • enable_express – A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.

  • user_metadata – Metadata associated with the topic.

  • max_message_size_in_kilobytes – The maximum size in kilobytes of message payload that can be accepted by the topic. This feature is only available when using a Premium namespace and Service Bus API version “2021-05” or higher.

get(key: str, default: Any | None = None) Any
has_key(k: str) bool
items() List[Tuple[str, Any]]
keys() List[str]
update(*args: Any, **kwargs: Any) None
values() List[Any]
class azure.servicebus.management.TopicRuntimeProperties[source]

Runtime properties of a Service Bus topic resource.

property accessed_at_utc: datetime | None

Last time a message was sent, or the last time there was a receive request

Return type:

datetime or None

property created_at_utc: datetime | None

The exact time the queue was created.

Return type:

datetime or None

property name: str

The name of the topic.

Return type:

str

property scheduled_message_count: int | None

Number of scheduled messages.

Return type:

int or None

property size_in_bytes: int | None

The current size of the entity in bytes.

Return type:

int or None

property subscription_count: int | None

The number of subscriptions in the topic.

Return type:

int or None

property updated_at_utc: datetime | None

The exact time the entity was updated.

Return type:

datetime or None

class azure.servicebus.management.TrueRuleFilter[source]

A sql filter with a sql expression that is always True