azure.mgmt.notificationhubs.operations module

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

Bases: object

Operations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An object model deserializer.
Variables:

api_version – Client Api Version. Constant value: “2017-04-01”.

list(custom_headers=None, raw=False, **operation_config)[source]

Lists all of the available NotificationHubs REST API operations.

Parameters:
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Operation

Return type:

OperationPaged[Operation]

Raises:

ErrorResponseException

models = <module 'azure.mgmt.notificationhubs.models' from '/usr/lib/python3/dist-packages/azure/mgmt/notificationhubs/models/__init__.py'>
class azure.mgmt.notificationhubs.operations.NamespacesOperations(client, config, serializer, deserializer)[source]

Bases: object

NamespacesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An object model deserializer.
Variables:

api_version – Client Api Version. Constant value: “2017-04-01”.

check_availability(parameters, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

CheckAvailabilityResult or ClientRawResponse if raw=true

Return type:

CheckAvailabilityResult or ClientRawResponse

Raises:

CloudError

create_or_update(resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

NamespaceResource or ClientRawResponse if raw=true

Return type:

NamespaceResource or ClientRawResponse

Raises:

CloudError

create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, properties, custom_headers=None, raw=False, **operation_config)[source]

Creates an authorization rule for a namespace.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • authorization_rule_name (str) – Aauthorization Rule Name.
  • properties (SharedAccessAuthorizationRuleProperties) – Properties of the Namespace AuthorizationRules.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SharedAccessAuthorizationRuleResource or ClientRawResponse if raw=true

Return type:

SharedAccessAuthorizationRuleResource or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, namespace_name, custom_headers=None, raw=False, polling=True, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
Returns:

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type:

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises:

CloudError

delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

get(resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

NamespaceResource or ClientRawResponse if raw=true

Return type:

NamespaceResource or ClientRawResponse

Raises:

CloudError

get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SharedAccessAuthorizationRuleResource or ClientRawResponse if raw=true

Return type:

SharedAccessAuthorizationRuleResource or ClientRawResponse

Raises:

CloudError

list(resource_group_name, custom_headers=None, raw=False, **operation_config)[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
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of NamespaceResource

Return type:

NamespaceResourcePaged[NamespaceResource]

Raises:

CloudError

list_all(custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of NamespaceResource

Return type:

NamespaceResourcePaged[NamespaceResource]

Raises:

CloudError

list_authorization_rules(resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config)[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
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SharedAccessAuthorizationRuleResource

Return type:

SharedAccessAuthorizationRuleResourcePaged[SharedAccessAuthorizationRuleResource]

Raises:

CloudError

list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SharedAccessAuthorizationRuleListResult or ClientRawResponse if raw=true

Return type:

SharedAccessAuthorizationRuleListResult or ClientRawResponse

Raises:

CloudError

patch(resource_group_name, namespace_name, tags=None, sku=None, custom_headers=None, raw=False, **operation_config)[source]

Patches the existing namespace.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • tags (dict[str, str]) – Resource tags
  • sku (Sku) – The sku of the created namespace
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

NamespaceResource or ClientRawResponse if raw=true

Return type:

NamespaceResource or ClientRawResponse

Raises:

CloudError

regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, policy_key=None, custom_headers=None, raw=False, **operation_config)[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.
  • policy_key (str) – Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ResourceListKeys or ClientRawResponse if raw=true

Return type:

ResourceListKeys or ClientRawResponse

Raises:

CloudError

models = <module 'azure.mgmt.notificationhubs.models' from '/usr/lib/python3/dist-packages/azure/mgmt/notificationhubs/models/__init__.py'>
class azure.mgmt.notificationhubs.operations.NotificationHubsOperations(client, config, serializer, deserializer)[source]

Bases: object

NotificationHubsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An object model deserializer.
Variables:

api_version – Client Api Version. Constant value: “2017-04-01”.

check_notification_hub_availability(resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

CheckAvailabilityResult or ClientRawResponse if raw=true

Return type:

CheckAvailabilityResult or ClientRawResponse

Raises:

CloudError

create_or_update(resource_group_name, namespace_name, notification_hub_name, parameters, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

NotificationHubResource or ClientRawResponse if raw=true

Return type:

NotificationHubResource or ClientRawResponse

Raises:

CloudError

create_or_update_authorization_rule(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, properties, custom_headers=None, raw=False, **operation_config)[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.
  • properties (SharedAccessAuthorizationRuleProperties) – Properties of the Namespace AuthorizationRules.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SharedAccessAuthorizationRuleResource or ClientRawResponse if raw=true

Return type:

SharedAccessAuthorizationRuleResource or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

delete_authorization_rule(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

get(resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

NotificationHubResource or ClientRawResponse if raw=true

Return type:

NotificationHubResource or ClientRawResponse

Raises:

CloudError

get_authorization_rule(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SharedAccessAuthorizationRuleResource or ClientRawResponse if raw=true

Return type:

SharedAccessAuthorizationRuleResource or ClientRawResponse

Raises:

CloudError

get_pns_credentials(resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

PnsCredentialsResource or ClientRawResponse if raw=true

Return type:

PnsCredentialsResource or ClientRawResponse

Raises:

CloudError

list(resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of NotificationHubResource

Return type:

NotificationHubResourcePaged[NotificationHubResource]

Raises:

CloudError

list_authorization_rules(resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SharedAccessAuthorizationRuleResource

Return type:

SharedAccessAuthorizationRuleResourcePaged[SharedAccessAuthorizationRuleResource]

Raises:

CloudError

list_keys(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ResourceListKeys or ClientRawResponse if raw=true

Return type:

ResourceListKeys or ClientRawResponse

Raises:

CloudError

regenerate_keys(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, policy_key=None, custom_headers=None, raw=False, **operation_config)[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.
  • policy_key (str) – Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ResourceListKeys or ClientRawResponse if raw=true

Return type:

ResourceListKeys or ClientRawResponse

Raises:

CloudError

models = <module 'azure.mgmt.notificationhubs.models' from '/usr/lib/python3/dist-packages/azure/mgmt/notificationhubs/models/__init__.py'>