azure.mgmt.notificationhubs.operations module

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 objec 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:
Return type:

CheckAvailabilityResult

Return type:

ClientRawResponse if raw=true

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.
Return type:

NamespaceResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Creates an authorization rule for a namespace.

Parameters:
Return type:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, namespace_name, custom_headers=None, raw=False, **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) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

NamespaceResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

NamespaceResourcePaged

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:
Return type:

NamespaceResourcePaged

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.
Return type:

SharedAccessAuthorizationRuleResourcePaged

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.
Return type:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

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) – 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.
Return type:

NamespaceResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Bases: object

NameOperations operations.

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

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

check_availability(name, 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:
  • name (str) – Resource 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.
Return type:

CheckNameAvailabilityResponse

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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 objec model deserializer.
Variables:

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

check_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.
Return type:

CheckAvailabilityResult

Return type:

ClientRawResponse if raw=true

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.
Return type:

NotificationHubResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create_or_update_authorization_rule(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, 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.
  • parameters (SharedAccessAuthorizationRuleCreateOrUpdateParameters) – The shared access authorization rule.
  • 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.
Return type:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

NotificationHubResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

PnsCredentialsResource

Return type:

ClientRawResponse if raw=true

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.
Return type:

NotificationHubResourcePaged

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.
Return type:

SharedAccessAuthorizationRuleResourcePaged

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.
Return type:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

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.
Return type:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Bases: object

HubsOperations operations.

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

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

check_availability(resource_group_name, namespace_name, name, 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.
  • name (str) – Resource 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.
Return type:

CheckNameAvailabilityResponse

Return type:

ClientRawResponse if raw=true

Raises:

CloudError