Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
:param value: The list of Kusto database principals.
:type value: list[~azure.mgmt.kusto.models.DatabasePrincipal]
: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: DatabasePrincipalListResult or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
database_principals_to_add = models.DatabasePrincipalListRequest(value=value)
# Construct URL
url = self.add_principals.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
'databaseName': self._serialize.url("database_name", database_name, 'str'),
'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
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
:param value: The list of Kusto database principals.
:type value: list[~azure.mgmt.kusto.models.DatabasePrincipal]
: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: DatabasePrincipalListResult or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
database_principals_to_remove = models.DatabasePrincipalListRequest(value=value)
# Construct URL
url = self.remove_principals.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
'databaseName': self._serialize.url("database_name", database_name, 'str'),
'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