Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:type key_type: str or ~azure.mgmt.eventhub.models.KeyType
:param key: Optional, if the key value provided, is set for KeyType or
autogenerated Key value set for keyType
:type key: str
: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: AccessKeys or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.eventhub.models.AccessKeys or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorResponseException`
"""
parameters = models.RegenerateAccessKeyParameters(key_type=key_type, key=key)
# Construct URL
url = self.regenerate_keys.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