azure.mgmt.notificationhubs.operations module

class azure.mgmt.notificationhubs.operations.NamespacesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through NotificationHubsManagementClient’s namespaces attribute.

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

  • namespace_name (str) – The namespace name. Required.

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

HttpResponseError

check_availability(parameters: _models.CheckAvailabilityParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.CheckAvailabilityResult[source]
check_availability(parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.CheckAvailabilityResult

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 or IO) – The namespace name. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

create_or_update(resource_group_name: str, namespace_name: str, parameters: _models.NamespaceCreateOrUpdateParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.NamespaceResource[source]
create_or_update(resource_group_name: str, namespace_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.NamespaceResource

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

  • namespace_name (str) – The namespace name. Required.

  • parameters (NamespaceCreateOrUpdateParameters or IO) – Parameters supplied to create a Namespace Resource. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, authorization_rule_name: str, parameters: _models.SharedAccessAuthorizationRuleCreateOrUpdateParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.SharedAccessAuthorizationRuleResource[source]
create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, authorization_rule_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.SharedAccessAuthorizationRuleResource

Creates an authorization rule for a namespace.

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

  • namespace_name (str) – The namespace name. Required.

  • authorization_rule_name (str) – Authorization Rule Name. Required.

  • parameters (SharedAccessAuthorizationRuleCreateOrUpdateParameters or IO) – The shared access authorization rule. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

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

  • namespace_name (str) – The namespace name. Required.

  • authorization_rule_name (str) – Authorization Rule Name. Required.

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

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

  • namespace_name (str) – The namespace name. Required.

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

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

  • namespace_name (str) – The namespace name. Required.

  • authorization_rule_name (str) – Authorization rule name. Required.

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

HttpResponseError

list(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.NamespaceResource][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. Required.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[NamespaceResource]

Raises

HttpResponseError

list_all(**kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.NamespaceResource][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 NamespaceResource or the result of cls(response)

Return type

ItemPaged[NamespaceResource]

Raises

HttpResponseError

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

Gets the authorization rules for a namespace.

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

  • namespace_name (str) – The namespace name. Required.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[SharedAccessAuthorizationRuleResource]

Raises

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

  • namespace_name (str) – The namespace name. Required.

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

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

HttpResponseError

patch(resource_group_name: str, namespace_name: str, parameters: _models.NamespacePatchParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.NamespaceResource[source]
patch(resource_group_name: str, namespace_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.NamespaceResource

Patches the existing namespace.

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

  • namespace_name (str) – The namespace name. Required.

  • parameters (NamespacePatchParameters or IO) – Parameters supplied to patch a Namespace Resource. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

regenerate_keys(resource_group_name: str, namespace_name: str, authorization_rule_name: str, parameters: _models.PolicykeyResource, *, content_type: str = "'application/json'", **kwargs: Any)_models.ResourceListKeys[source]
regenerate_keys(resource_group_name: str, namespace_name: str, authorization_rule_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.ResourceListKeys

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

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

  • namespace_name (str) – The namespace name. Required.

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

  • parameters (PolicykeyResource or IO) – Parameters supplied to regenerate the Namespace Authorization Rule Key. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

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(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through NotificationHubsManagementClient’s notification_hubs attribute.

check_notification_hub_availability(resource_group_name: str, namespace_name: str, parameters: _models.CheckAvailabilityParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.CheckAvailabilityResult[source]
check_notification_hub_availability(resource_group_name: str, namespace_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.CheckAvailabilityResult

Checks the availability of the given notificationHub in a namespace.

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

  • namespace_name (str) – The namespace name. Required.

  • parameters (CheckAvailabilityParameters or IO) – The notificationHub name. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

create_or_update(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: _models.NotificationHubCreateOrUpdateParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.NotificationHubResource[source]
create_or_update(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.NotificationHubResource

Creates/Update a NotificationHub in a namespace.

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

  • parameters (NotificationHubCreateOrUpdateParameters or IO) – Parameters supplied to the create/update a NotificationHub Resource. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, parameters: _models.SharedAccessAuthorizationRuleCreateOrUpdateParameters, *, content_type: str = "'application/json'", **kwargs: Any)_models.SharedAccessAuthorizationRuleResource[source]
create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.SharedAccessAuthorizationRuleResource

Creates/Updates an authorization rule for a NotificationHub.

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

  • authorization_rule_name (str) – Authorization Rule Name. Required.

  • parameters (SharedAccessAuthorizationRuleCreateOrUpdateParameters or IO) – The shared access authorization rule. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

debug_send(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: Optional[collections.abc.MutableMapping[str, 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. Required.

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

  • parameters (JSON) – Debug send parameters. Default value is None.

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

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

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

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

  • authorization_rule_name (str) – Authorization Rule Name. Required.

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

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

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

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

  • authorization_rule_name (str) – authorization rule name. Required.

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

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

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

HttpResponseError

list(resource_group_name: str, namespace_name: str, **kwargs: Any)Iterable[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. Required.

  • namespace_name (str) – The namespace name. Required.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[NotificationHubResource]

Raises

HttpResponseError

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

Gets the authorization rules for a NotificationHub.

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[SharedAccessAuthorizationRuleResource]

Raises

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

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

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

HttpResponseError

patch(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: Optional[_models.NotificationHubPatchParameters] = None, *, content_type: str = "'application/json'", **kwargs: Any)_models.NotificationHubResource[source]
patch(resource_group_name: str, namespace_name: str, notification_hub_name: str, parameters: Optional[IO] = None, *, content_type: str = "'application/json'", **kwargs: Any)_models.NotificationHubResource

Patch a NotificationHub in a namespace.

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

  • parameters (NotificationHubPatchParameters or IO) – Parameters supplied to patch a NotificationHub Resource. Is either a model type or a IO type. Default value is None.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

HttpResponseError

regenerate_keys(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, parameters: _models.PolicykeyResource, *, content_type: str = "'application/json'", **kwargs: Any)_models.ResourceListKeys[source]
regenerate_keys(resource_group_name: str, namespace_name: str, notification_hub_name: str, authorization_rule_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.ResourceListKeys

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

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

  • namespace_name (str) – The namespace name. Required.

  • notification_hub_name (str) – The notification hub name. Required.

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

  • parameters (PolicykeyResource or IO) – Parameters supplied to regenerate the NotificationHub Authorization Rule Key. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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

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(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through NotificationHubsManagementClient’s operations attribute.

list(**kwargs: Any)Iterable[azure.mgmt.notificationhubs.models._models_py3.Operation][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 Operation or the result of cls(response)

Return type

ItemPaged[Operation]

Raises

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'>