azure.mgmt.notificationhubs.operations module

class azure.mgmt.notificationhubs.operations.NamespacesOperations(client, config, serializer, deserializer)[source]

Bases: object

NamespacesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_delete(resource_group_name: str, namespace_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[None][source]

Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

Keyword Arguments
  • cls (callable) – A custom type or function that will be passed the direct response

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

LROPoller[None]

Raises

~azure.core.exceptions.HttpResponseError

check_availability(parameters: azure.mgmt.notificationhubs.models._models_py3.CheckAvailabilityParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.CheckAvailabilityResult[source]

Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name.

Parameters

parameters (CheckAvailabilityParameters) – The namespace name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

CheckAvailabilityResult, or the result of cls(response)

Return type

CheckAvailabilityResult

Raises

~azure.core.exceptions.HttpResponseError

create_or_update(resource_group_name: str, namespace_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.NamespaceCreateOrUpdateParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.NamespaceResource[source]

Creates/Updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • parameters (NamespaceCreateOrUpdateParameters) – Parameters supplied to create a Namespace Resource.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

NamespaceResource, or the result of cls(response)

Return type

NamespaceResource

Raises

~azure.core.exceptions.HttpResponseError

create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, authorization_rule_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleCreateOrUpdateParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleResource[source]

Creates an authorization rule for a namespace.

Parameters
Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SharedAccessAuthorizationRuleResource, or the result of cls(response)

Return type

SharedAccessAuthorizationRuleResource

Raises

~azure.core.exceptions.HttpResponseError

delete_authorization_rule(resource_group_name: str, namespace_name: str, authorization_rule_name: str, **kwargs: Any)None[source]

Deletes a namespace authorization rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • authorization_rule_name (str) – Authorization Rule Name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, namespace_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.NamespaceResource[source]

Returns the description for the specified namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

NamespaceResource, or the result of cls(response)

Return type

NamespaceResource

Raises

~azure.core.exceptions.HttpResponseError

get_authorization_rule(resource_group_name: str, namespace_name: str, authorization_rule_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleResource[source]

Gets an authorization rule for a namespace by name.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • authorization_rule_name (str) – Authorization rule name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SharedAccessAuthorizationRuleResource, or the result of cls(response)

Return type

SharedAccessAuthorizationRuleResource

Raises

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.NamespaceListResult][source]

Lists the available namespaces within a resourceGroup.

Parameters

resource_group_name (str) – The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either NamespaceListResult or the result of cls(response)

Return type

ItemPaged[NamespaceListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_all(**kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.NamespaceListResult][source]

Lists all the available namespaces within the subscription irrespective of the resourceGroups.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either NamespaceListResult or the result of cls(response)

Return type

ItemPaged[NamespaceListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_authorization_rules(resource_group_name: str, namespace_name: str, **kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleListResult][source]

Gets the authorization rules for a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either SharedAccessAuthorizationRuleListResult or the result of cls(response)

Return type

ItemPaged[SharedAccessAuthorizationRuleListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_keys(resource_group_name: str, namespace_name: str, authorization_rule_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.ResourceListKeys[source]

Gets the Primary and Secondary ConnectionStrings to the namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • authorization_rule_name (str) – The connection string of the namespace for the specified authorizationRule.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceListKeys, or the result of cls(response)

Return type

ResourceListKeys

Raises

~azure.core.exceptions.HttpResponseError

patch(resource_group_name: str, namespace_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.NamespacePatchParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.NamespaceResource[source]

Patches the existing namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • parameters (NamespacePatchParameters) – Parameters supplied to patch a Namespace Resource.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

NamespaceResource, or the result of cls(response)

Return type

NamespaceResource

Raises

~azure.core.exceptions.HttpResponseError

regenerate_keys(resource_group_name: str, namespace_name: str, authorization_rule_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.PolicykeyResource, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.ResourceListKeys[source]

Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • authorization_rule_name (str) – The connection string of the namespace for the specified authorizationRule.

  • parameters (PolicykeyResource) – Parameters supplied to regenerate the Namespace Authorization Rule Key.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceListKeys, or the result of cls(response)

Return type

ResourceListKeys

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.notificationhubs.models' from '/mnt/vss/_work/1/s/sdk/notificationhubs/azure-mgmt-notificationhubs/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/notificationhubs/models/__init__.py'>
class azure.mgmt.notificationhubs.operations.NotificationHubsOperations(client, config, serializer, deserializer)[source]

Bases: object

NotificationHubsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

check_notification_hub_availability(resource_group_name: str, namespace_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.CheckAvailabilityParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.CheckAvailabilityResult[source]

Checks the availability of the given notificationHub in a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • parameters (CheckAvailabilityParameters) – The notificationHub name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

CheckAvailabilityResult, or the result of cls(response)

Return type

CheckAvailabilityResult

Raises

~azure.core.exceptions.HttpResponseError

create_or_update(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.NotificationHubCreateOrUpdateParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.NotificationHubResource[source]

Creates/Update a NotificationHub in a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • parameters (NotificationHubCreateOrUpdateParameters) – Parameters supplied to the create/update a NotificationHub Resource.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

NotificationHubResource, or the result of cls(response)

Return type

NotificationHubResource

Raises

~azure.core.exceptions.HttpResponseError

create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleCreateOrUpdateParameters, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleResource[source]

Creates/Updates an authorization rule for a NotificationHub.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • authorization_rule_name (str) – Authorization Rule Name.

  • parameters (SharedAccessAuthorizationRuleCreateOrUpdateParameters) – The shared access authorization rule.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SharedAccessAuthorizationRuleResource, or the result of cls(response)

Return type

SharedAccessAuthorizationRuleResource

Raises

~azure.core.exceptions.HttpResponseError

debug_send(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: Any = None, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.DebugSendResponse[source]

test send a push notification.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • parameters (any) – Debug send parameters.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DebugSendResponse, or the result of cls(response)

Return type

DebugSendResponse

Raises

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, namespace_name: str, notification_hub_name: str, **kwargs: Any)None[source]

Deletes a notification hub associated with a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

delete_authorization_rule(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, **kwargs: Any)None[source]

Deletes a notificationHub authorization rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • authorization_rule_name (str) – Authorization Rule Name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, namespace_name: str, notification_hub_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.NotificationHubResource[source]

Lists the notification hubs associated with a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

NotificationHubResource, or the result of cls(response)

Return type

NotificationHubResource

Raises

~azure.core.exceptions.HttpResponseError

get_authorization_rule(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleResource[source]

Gets an authorization rule for a NotificationHub by name.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • authorization_rule_name (str) – authorization rule name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SharedAccessAuthorizationRuleResource, or the result of cls(response)

Return type

SharedAccessAuthorizationRuleResource

Raises

~azure.core.exceptions.HttpResponseError

get_pns_credentials(resource_group_name: str, namespace_name: str, notification_hub_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.PnsCredentialsResource[source]

Lists the PNS Credentials associated with a notification hub .

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

PnsCredentialsResource, or the result of cls(response)

Return type

PnsCredentialsResource

Raises

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, namespace_name: str, **kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.NotificationHubListResult][source]

Lists the notification hubs associated with a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either NotificationHubListResult or the result of cls(response)

Return type

ItemPaged[NotificationHubListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_authorization_rules(resource_group_name: str, namespace_name: str, notification_hub_name: str, **kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.SharedAccessAuthorizationRuleListResult][source]

Gets the authorization rules for a NotificationHub.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either SharedAccessAuthorizationRuleListResult or the result of cls(response)

Return type

ItemPaged[SharedAccessAuthorizationRuleListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_keys(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.ResourceListKeys[source]

Gets the Primary and Secondary ConnectionStrings to the NotificationHub.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • authorization_rule_name (str) – The connection string of the NotificationHub for the specified authorizationRule.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceListKeys, or the result of cls(response)

Return type

ResourceListKeys

Raises

~azure.core.exceptions.HttpResponseError

patch(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: Optional[azure.mgmt.notificationhubs.models._models_py3.NotificationHubPatchParameters] = None, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.NotificationHubResource[source]

Patch a NotificationHub in a namespace.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • parameters (NotificationHubPatchParameters) – Parameters supplied to patch a NotificationHub Resource.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

NotificationHubResource, or the result of cls(response)

Return type

NotificationHubResource

Raises

~azure.core.exceptions.HttpResponseError

regenerate_keys(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, parameters: azure.mgmt.notificationhubs.models._models_py3.PolicykeyResource, **kwargs: Any)azure.mgmt.notificationhubs.models._models_py3.ResourceListKeys[source]

Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • namespace_name (str) – The namespace name.

  • notification_hub_name (str) – The notification hub name.

  • authorization_rule_name (str) – The connection string of the NotificationHub for the specified authorizationRule.

  • parameters (PolicykeyResource) – Parameters supplied to regenerate the NotificationHub Authorization Rule Key.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ResourceListKeys, or the result of cls(response)

Return type

ResourceListKeys

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.notificationhubs.models' from '/mnt/vss/_work/1/s/sdk/notificationhubs/azure-mgmt-notificationhubs/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/notificationhubs/models/__init__.py'>
class azure.mgmt.notificationhubs.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list(**kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.OperationListResult][source]

Lists all of the available NotificationHubs REST API operations.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either OperationListResult or the result of cls(response)

Return type

ItemPaged[OperationListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.notificationhubs.models' from '/mnt/vss/_work/1/s/sdk/notificationhubs/azure-mgmt-notificationhubs/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/notificationhubs/models/__init__.py'>