Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param authorization_rule_name: The authorization rule name.
:type authorization_rule_name: str
:param rights: The rights associated with the rule.
:type rights: list[str or ~azure.mgmt.eventhub.models.AccessRights]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides`.
:return: AuthorizationRule or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.eventhub.models.AuthorizationRule or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorResponseException`
"""
parameters = models.AuthorizationRule(rights=rights)
# Construct URL
url = self.create_or_update_authorization_rule.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6),
'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers